[
  {
    "path": "README.md",
    "content": "Comprehensive Python Cheatsheet\n===============================\n<sup>[Download text file](https://raw.githubusercontent.com/gto76/python-cheatsheet/main/README.md), [Fork me on GitHub](https://github.com/gto76/python-cheatsheet) or [Check out FAQ](https://github.com/gto76/python-cheatsheet/wiki/Frequently-Asked-Questions).\n</sup>\n\n![Monty Python](web/image_888.jpeg)\n\n\nContents\n--------\n**&nbsp;&nbsp;&nbsp;** **1. Collections:** **&nbsp;&nbsp;** **[`List`](#list)**__,__ **[`Dictionary`](#dictionary)**__,__ **[`Set`](#set)**__,__ **[`Tuple`](#tuple)**__,__ **[`Range`](#range)**__,__ **[`Enumerate`](#enumerate)**__,__ **[`Iterator`](#iterator)**__,__ **[`Generator`](#generator)**__.__  \n**&nbsp;&nbsp;&nbsp;** **2. Types:** **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**  **[`Type`](#type)**__,__ **[`String`](#string)**__,__ **[`Regular_Exp`](#regex)**__,__ **[`Format`](#format)**__,__ **[`Numbers`](#numbers-1)**__,__ **[`Combinatorics`](#combinatorics)**__,__ **[`Datetime`](#datetime)**__.__  \n**&nbsp;&nbsp;&nbsp;** **3. Syntax:** **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**  **[`Function`](#function)**__,__ **[`Inline`](#inline)**__,__ **[`Import`](#imports)**__,__ **[`Decorator`](#decorator)**__,__ **[`Class`](#class)**__,__ **[`Duck_Type`](#duck-types)**__,__ **[`Enum`](#enum)**__,__ **[`Except`](#exceptions)**__.__  \n**&nbsp;&nbsp;&nbsp;** **4. System:** **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**  **[`Exit`](#exit)**__,__ **[`Print`](#print)**__,__ **[`Input`](#input)**__,__ **[`Command_Line_Arguments`](#command-line-arguments)**__,__ **[`Open`](#open)**__,__ **[`Path`](#paths)**__,__ **[`OS_Commands`](#os-commands)**__.__  \n**&nbsp;&nbsp;&nbsp;** **5. Data:** **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**  **[`JSON`](#json)**__,__ **[`Pickle`](#pickle)**__,__ **[`CSV`](#csv)**__,__ **[`SQLite`](#sqlite)**__,__ **[`Bytes`](#bytes)**__,__ **[`Struct`](#struct)**__,__ **[`Array`](#array)**__,__ **[`Memory_View`](#memory-view)**__,__ **[`Deque`](#deque)**__.__  \n**&nbsp;&nbsp;&nbsp;** **6. Advanced:** **&nbsp;&nbsp;&nbsp;&nbsp;**  **[`Operator`](#operator)**__,__ **[`Match_Statement`](#match-statement)**__,__ **[`Logging`](#logging)**__,__ **[`Introspection`](#introspection)**__,__ **[`Threads`](#threading)**__,__ **[`Asyncio`](#asyncio)**__.__  \n**&nbsp;&nbsp;&nbsp;** **7. Libraries:** **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**  **[`Progress_Bar`](#progress-bar)**__,__ **[`Plot`](#plot)**__,__ **[`Table`](#table)**__,__ **[`Console_App`](#console-app)**__,__ **[`GUI`](#gui-app)**__,__ **[`Scraping`](#scraping)**__,__ **[`Web`](#web-app)**__,__ **[`Profile`](#profiling)**__.__  \n**&nbsp;&nbsp;&nbsp;** **8. Multimedia:** **&nbsp;**  **[`NumPy`](#numpy)**__,__ **[`Image`](#image)**__,__ **[`Animation`](#animation)**__,__ **[`Audio`](#audio)**__,__ **[`Synthesizer`](#synthesizer)**__,__ **[`Pygame`](#pygame)**__,__ **[`Pandas`](#pandas)**__,__ **[`Plotly`](#plotly)**__.__\n\n\nMain\n----\n```python\nif __name__ == '__main__':      # Skips indented lines of code if file was imported.\n    main()                      # Executes user-defined `def main(): ...` function.\n```\n\n\nList\n----\n```python\n<list> = [<el_1>, <el_2>, ...]  # Creates new list object. E.g. `list_a = [1, 2, 3]`.\n```\n\n```python\n<el>   = <list>[index]          # First index is 0, last -1. Also `<list>[i] = <el>`.\n<list> = <list>[<slice>]        # Also <list>[from_inclusive : to_exclusive : ±step].\n```\n\n```python\n<list>.append(<el>)             # Appends element to the end. Also `<list> += [<el>]`.\n<list>.extend(<collection>)     # Appends multiple elements. Also `<list> += <coll>`.\n```\n\n```python\n<list>.sort(reverse=False)      # Sorts the elements of the list in ascending order.\n<list>.reverse()                # Reverses the order of elements. Takes linear time.\n<list> = sorted(<collection>)   # Returns a new sorted list. Accepts `reverse=True`.\n<iter> = reversed(<list>)       # Returns reversed iterator. Also list(<iterator>).\n```\n\n```python\n<el>  = max(<collection>)       # Returns the largest element. Also min(<el_1>, ...).\n<num> = sum(<collection>)       # Returns a sum of elements. Also math.prod(<coll>).\n```\n\n```python\nelementwise_sum  = [sum(pair) for pair in zip(list_a, list_b)]\nsorted_by_second = sorted(<coll>, key=lambda pair: pair[1])\nsorted_by_both   = sorted(<coll>, key=lambda p: (p[1], p[0]))\nflatter_list     = list(itertools.chain.from_iterable(<list>))\n```\n* **For details about sort(), sorted(), min() and max() see [Sortable](#sortable).**\n* **Module [operator](#operator) has function itemgetter() that can replace listed [lambdas](#lambda).**\n* **This text uses the term collection instead of [iterable](#abstract-base-classes). For rationale see [duck types](#iterable-duck-types).**\n\n```python\n<int> = len(<list/dict/set/…>)  # Returns number of items. Doesn't accept iterators.\n<int> = <list>.count(<el>)      # Counts occurrences. Also `if <el> in <coll>: ...`.\n<int> = <list>.index(<el>)      # Returns index of first occ. or raises ValueError.\n<el>  = <list>.pop()            # Removes item from the end (or at index if passed).\n<list>.insert(<int>, <el>)      # Inserts item at index and shifts remaining items.\n<list>.remove(<el>)             # Removes the first occurrence or raises ValueError.\n<list>.clear()                  # Removes all items. Also provided by dict and set.\n```\n\n\nDictionary\n----------\n```python\n<dict> = {key_1: val_1, key_2: val_2, ...}      # Use `<dict>[key]` to get or assign the value.\n```\n\n```python\n<view> = <dict>.keys()                          # A collection of keys reflecting all changes.\n<view> = <dict>.values()                        # A collection of values that reflects changes.\n<view> = <dict>.items()                         # Coll. of tuples. Each contains key and value.\n```\n\n```python\nvalue  = <dict>.get(key, default=None)          # Returns 'default' argument if key is missing.\nvalue  = <dict>.setdefault(key, default=None)   # Returns and writes 'default' if key is amiss.\n<dict> = collections.defaultdict(<type>)        # Dict with automatic default value `<type>()`.\n<dict> = collections.defaultdict(lambda: 1)     # Dictionary with automatic default value `1`.\n```\n\n```python\n<dict> = dict(<collection>)                     # Creates a dict from coll. of key-value pairs.\n<dict> = dict(zip(keys, values))                # Creates key-value pairs from two collections.\n<dict> = dict.fromkeys(keys [, value])          # Items get value None if only keys are passed.\n```\n\n```python\n<dict>.update(<dict>)                           # Adds items to dict. Passed dict has priority.\nvalue = <dict>.pop(key)                         # Removes item or raises KeyError when missing.\n{k for k, v in <dict>.items() if v == 123}      # Returns a set of keys whose value equals 123.\n{k: v for k, v in <dict>.items() if k in keys}  # Returns a dict of items with specified keys.\n```\n\n### Counter\n```python\n>>> from collections import Counter\n>>> counter = Counter(['blue', 'blue', 'red'])\n>>> counter['yellow'] += 3\n>>> print(counter.most_common())\n[('yellow', 3), ('blue', 2), ('red', 1)]\n```\n\n\nSet\n---\n```python\n<set> = {<el_1>, <el_2>, ...}           # Coll. of unique items. Also set(), set(<coll>).\n```\n\n```python\n<set>.add(<el>)                         # Adds item to the set. Same as `<set> |= {<el>}`.\n<set>.update(<collection> [, ...])      # Adds items to the set. Same as `<set> |= <set>`.\n```\n\n```python\n<set>  = <set>.union(<coll>)            # Returns a set of all items. Also <set> | <set>.\n<set>  = <set>.intersection(<coll>)     # Returns every shared item. Also <set> & <set>.\n<set>  = <set>.difference(<coll>)       # Returns set's unique items. Also <set> - <set>.\n<set>  = <set>.symmetric_diff…(<coll>)  # Returns all nonshared items. Also <set> ^ <set>.\n<bool> = <set>.issuperset(<coll>)       # Returns False when collection has unique items.\n<bool> = <set>.issubset(<coll>)         # Is collection a superset? Also <set> <= <set>.\n```\n\n```python\n<el> = <set>.pop()                      # Removes one of items. Raises KeyError if empty.\n<set>.remove(<el>)                      # Removes the item or raises KeyError if missing.\n<set>.discard(<el>)                     # Same as remove() but it doesn't raise an error.\n```\n\n### Frozen Set\n* **Frozenset is immutable and hashable version of the normal set.**\n* **That means it can be used as a key in a dictionary or as an item in a set.**\n```python\n<frozenset> = frozenset(<collection>)\n```\n\n\nTuple\n-----\n**Tuple is an immutable and hashable list.**\n```python\n<tuple> = ()                        # Returns an empty tuple. Also tuple(), tuple(<coll>).\n<tuple> = (<el>,)                   # Returns a tuple with single element. Same as `<el>,`.\n<tuple> = (<el_1>, <el_2> [, ...])  # Returns a tuple. Same as `<el_1>, <el_2> [, ...]`.\n```\n\n### Named Tuple\n**Tuple's subclass with named elements.**\n```python\n>>> from collections import namedtuple\n>>> Point = namedtuple('Point', 'x y')\n>>> p = Point(1, y=2)\n>>> print(p)\nPoint(x=1, y=2)\n>>> p.x, p[1]\n(1, 2)\n```\n\n\nRange\n-----\n**A sequence of evenly spaced integers.**\n```python\n<range> = range(stop)                # I.e. range(to_exclusive). Integers from 0 to `stop-1`.\n<range> = range(start, stop)         # I.e. range(from_inc, to_exc). From start to `stop-1`.\n<range> = range(start, stop, ±step)  # I.e. range(from_inclusive, to_exclusive, ±step_size).\n```\n\n```python\n>>> [i for i in range(3)]\n[0, 1, 2]\n```\n\n\nEnumerate\n---------\n```python\nfor i, el in enumerate(<coll>, start=0):  # Returns next element and its index on each pass.\n    ...\n```\n\n\nIterator\n--------\n**Potentially endless stream of elements.**\n\n```python\n<iter> = iter(<collection>)              # Iterator that returns passed elements one by one.\n<iter> = iter(<func>, to_exc)            # Calls `<func>()` until it receives 'to_exc' value.\n<iter> = (<expr> for <name> in <coll>)   # E.g. `(i+1 for i in range(3))`. Evaluates lazily.\n<el>   = next(<iter> [, default])        # Raises StopIteration or returns 'default' on end.\n<list> = list(<iter>)                    # Returns a list of iterator's remaining elements.\n```\n* **For loops call `'iter(<collection>)'` at the start and `'next(<iter>)'` on each pass.**\n* **Calling `'iter(<iter>)'` returns unmodified iterator. For details see [Iterator](#iterator-1) duck type.**\n\n```python\nimport itertools as it\n```\n\n```python\n<iter> = it.count(start=0, step=1)       # Returns updated 'start' endlessly. Accepts floats.\n<iter> = it.repeat(<obj> [, times])      # Returns passed element endlessly or 'times' times.\n<iter> = it.cycle(<collection>)          # Repeats the sequence endlessly. Accepts iterators.\n```\n\n```python\n<iter> = it.chain(<coll>, <coll>, ...)   # Returns each element of each collection in order.\n<iter> = it.chain.from_iterable(<coll>)  # Accepts collection (i.e. iterable) of collections.\n<iter> = it.islice(<coll>, stop)         # Also accepts 'start' and 'step'. Args can be None.\n<iter> = it.product(<coll>, <coll>)      # Same as `((a, b) for a in arg_1 for b in arg_2)`.\n```\n\n\nGenerator\n---------\n* **Any function that contains a yield statement returns a generator.**\n* **Generators and iterators are interchangeable.**\n\n```python\ndef count(start, step):\n    while True:\n        yield start\n        start += step\n```\n\n```python\n>>> counter = count(10, 2)\n>>> next(counter), next(counter), next(counter)\n(10, 12, 14)\n```\n\n\nType\n----\n* **Everything in Python is an object.**\n* **Every object has a certain type.**\n* **Type and class are synonymous.**\n\n```python\n<type> = type(<obj>)                  # Object's type. Same as `<obj>.__class__`.\n<bool> = isinstance(<obj>, <type>)    # Same as `issubclass(type(<obj>), <type>)`.\n```\n\n```python\n>>> type('a'), 'a'.__class__, str\n(<class 'str'>, <class 'str'>, <class 'str'>)\n```\n\n#### Some types do not have built-in names, so they must be imported:\n```python\nfrom types import FunctionType, MethodType, LambdaType, GeneratorType\n```\n\n### Abstract Base Classes\n**Each abstract base class specifies a set of virtual subclasses. These classes are then recognized by isinstance() and issubclass() as [subclasses](#subclass) of the ABC, although they are really not. An ABC can also manually decide whether or not a specific class is its virtual subclass, usually based on which methods that class has implemented. For instance, Iterable ABC looks for method iter(), while Collection ABC looks for iter(), contains() and len().**\n\n```python\n>>> from collections.abc import Iterable, Collection, Sequence\n>>> isinstance([1, 2, 3], Iterable)\nTrue\n```\n\n```text\n+------------------+------------+------------+------------+\n|                  |  Iterable  | Collection |  Sequence  |\n+------------------+------------+------------+------------+\n| list, range, str |    yes     |    yes     |    yes     |\n| dict, set        |    yes     |    yes     |            |\n| iter             |    yes     |            |            |\n+------------------+------------+------------+------------+\n```\n\n```python\n>>> from numbers import Number, Complex, Real, Rational, Integral\n>>> isinstance(123, Number)\nTrue\n```\n\n```text\n+--------------------+-----------+-----------+----------+----------+----------+\n|                    |   Number  |  Complex  |   Real   | Rational | Integral |\n+--------------------+-----------+-----------+----------+----------+----------+\n| int                |    yes    |    yes    |   yes    |   yes    |   yes    |\n| fractions.Fraction |    yes    |    yes    |   yes    |   yes    |          |\n| float              |    yes    |    yes    |   yes    |          |          |\n| complex            |    yes    |    yes    |          |          |          |\n| decimal.Decimal    |    yes    |           |          |          |          |\n+--------------------+-----------+-----------+----------+----------+----------+\n```\n\n\nString\n------\n**Immutable sequence of characters.**\n```python\n<str>  = 'abc'                               # Also \"abc\". Interprets \\n, \\t, \\x00-\\xff, etc.\n```\n\n```python\n<str>  = <str>.strip()                       # Strips all whitespace characters from both ends.\n<str>  = <str>.strip('<chars>')              # Strips passed characters. Also lstrip/rstrip().\n```\n\n```python\n<list> = <str>.split()                       # Splits it on one or more whitespace characters.\n<list> = <str>.split(sep=None, maxsplit=-1)  # Splits on 'sep' string at most 'maxsplit' times.\n<list> = <str>.splitlines(keepends=False)    # On [\\n\\r\\f\\v\\x1c-\\x1e\\x85\\u2028\\u2029] and \\r\\n.\n<str>  = <str>.join(<coll_of_strings>)       # Joins items by using the string as a separator.\n```\n\n```python\n<bool> = <sub_str> in <str>                  # Returns True if string contains the substring.\n<bool> = <str>.startswith(<sub_str>)         # Pass tuple of strings to give multiple options.\n<int>  = <str>.find(<sub_str>)               # Returns start index of the first match or `-1`.\n```\n\n```python\n<str>  = <str>.lower()                       # Lowers the case. Also upper/capitalize/title().\n<str>  = <str>.casefold()                    # Lower() that converts ẞ/ß to ss, Σ/ς to σ, etc.\n<str>  = <str>.replace(old, new [, count])   # Replaces 'old' with 'new' at most 'count' times.\n<str>  = <str>.translate(table)              # Use `str.maketrans(<dict>)` to generate table.\n```\n\n```python\n<str>  = chr(<int>)                          # Converts passed integer into Unicode character.\n<int>  = ord(<str>)                          # Converts passed Unicode character into integer.\n```\n* **Use `'unicodedata.normalize(\"NFC\", <str>)'` on strings like `'Motörhead'` before comparing them to other strings, because `'ö'` can be stored as one or two characters.**\n* **`'NFC'` converts such characters to a single character, while `'NFD'` converts them to two.**\n\n```python\n<bool> = <str>.isdecimal()                   # Checks all chars for [0-9]. Also [०-९], [٠-٩].\n<bool> = <str>.isdigit()                     # Checks for [²³¹…] and isdecimal(). Also [፩-፱].\n<bool> = <str>.isnumeric()                   # Checks for [¼½¾…] and isdigit(). Also [零〇一…].\n<bool> = <str>.isalnum()                     # Checks for [ABC…] and isnumeric(). Also [ªµº…].\n<bool> = <str>.isprintable()                 # Checks for [ !\"#…], basic emojis and isalnum().\n<bool> = <str>.isspace()                     # Checks for [ \\t\\n\\r\\f\\v\\x1c\\x1d\\x1e\\x1f\\x85…].\n```\n\n\nRegex\n-----\n**Functions for regular expression matching.**\n\n```python\nimport re\n<str>   = re.sub(r'<regex>', new, text)  # Substitutes occurrences with string 'new'.\n<list>  = re.findall(r'<regex>', text)   # Returns all occurrences as string objects.\n<list>  = re.split(r'<regex>', text)     # Add brackets around regex to keep matches.\n<Match> = re.search(r'<regex>', text)    # Returns first occ. of the pattern or None.\n<Match> = re.match(r'<regex>', text)     # Only searches at the start of the 'text'.\n<iter>  = re.finditer(r'<regex>', text)  # Returns all occurrences as Match objects.\n```\n\n* **Raw string literals do not interpret escape sequences, thus enabling us to use the regex-specific escape sequences that cause SyntaxWarning in normal string literals (since 3.12).**\n* **Argument `'new'` can also be a function that accepts a Match object and returns a string.**\n* **Argument `'flags=re.IGNORECASE'` can be used with all functions that are listed above.**\n* **Argument `'flags=re.MULTILINE'` makes `'^'` and `'$'` match the start/end of each line.**\n* **Argument `'flags=re.DOTALL'` makes `'.'` also accept the `'\\n'` (besides all other chars).**\n* **`'re.compile(r\"<regex>\")'` returns a Pattern object with methods sub(), findall(), etc.**\n\n### Match Object\n```python\n<str>   = <Match>.group()                # Returns the whole match. Also group(0).\n<str>   = <Match>.group(1)               # Returns part inside the first brackets.\n<tuple> = <Match>.groups()               # Returns all bracketed parts as strings.\n<int>   = <Match>.start()                # Returns start index of the whole match.\n<int>   = <Match>.end()                  # Returns the match's end index plus one.\n```\n\n### Special Sequences\n```python\n'\\d' == '[0-9]'                          # Also [०-९…]. Matches decimal character.\n'\\w' == '[a-zA-Z0-9_]'                   # Also [ª²³…]. Matches alphanumeric or _.\n'\\s' == '[ \\t\\n\\r\\f\\v]'                  # Also [\\x1c-\\x1f…]. Matches whitespace.\n```\n* **By default, decimal characters and alphanumerics from all alphabets are matched unless `'flags=re.ASCII'` is used. It restricts special sequence matches to the first 128 Unicode characters and also prevents `'\\s'` from accepting `'\\x1c'`, `'\\x1d'`, `'\\x1e'` and `'\\x1f'` (non-printable characters that divide text into files, tables, rows and fields, respectively).**\n* **Use a capital letter, i.e. `'\\D'`, `'\\W'` or `'\\S'`, for negation. All non-ASCII characters are matched if ASCII flag is used in conjunction with a capital letter.**\n\n\nFormat\n------\n```perl\n<str> = f'{<obj>}, {<obj>}'            # Curly brackets can contain any expression.\n<str> = '{}, {}'.format(<obj>, <obj>)  # Same as '{0}, {a}'.format(<obj>, a=<obj>).\n<str> = '%s, %s' % (<obj>, <obj>)      # Redundant and inferior C-style formatting.\n```\n\n### Example\n```python\n>>> Person = collections.namedtuple('Person', 'name height')\n>>> person = Person('Jean-Luc', 187)\n>>> f'{person.name} is {person.height / 100} meters tall.'\n'Jean-Luc is 1.87 meters tall.'\n```\n\n### General Options\n```python\n{<obj>:<10}                            # '<obj>     '.\n{<obj>:^10}                            # '  <obj>   '.\n{<obj>:>10}                            # '     <obj>'.\n{<obj>:.<10}                           # '<obj>.....'.\n{<obj>:0}                              # '<obj>'.\n```\n* **Objects are converted to strings with format() function, e.g. `'format(<obj>, \"<10\")'`.**\n* **Options can be generated dynamically via nested braces: `f'{<obj>:{<str/int>}[…]}'`.**\n* **Adding `'='` to the expression prepends it to its result, e.g. `f'{1+1=}'` returns `'1+1=2'`.**\n* **Adding `'!r'` to the expression first calls result's [repr()](#class) method and only then format().**\n\n### Strings\n```python\n{'abcde':10}                           # 'abcde     '.\n{'abcde':10.3}                         # 'abc       '.\n{'abcde':.3}                           # 'abc'.\n{'abcde'!r:10}                         # \"'abcde'   \".\n```\n\n### Numbers\n```python\n{123456:10}                            # '    123456'.\n{123456:10,}                           # '   123,456'.\n{123456:10_}                           # '   123_456'.\n{123456:+10}                           # '   +123456'.\n{123456:=+10}                          # '+   123456'.\n{123456: }                             # ' 123456'.\n{-123456: }                            # '-123456'.\n```\n\n### Floats\n```python\n{1.23456:10.3}                         # '      1.23'.\n{1.23456:10.3f}                        # '     1.235'.\n{1.23456:10.3e}                        # ' 1.235e+00'.\n{1.23456:10.3%}                        # '  123.456%'.\n```\n\n#### Comparison of presentation types:\n```text\n+--------------+----------------+----------------+----------------+----------------+\n|              |    {<float>}   |   {<float>:f}  |   {<float>:e}  |   {<float>:%}  |\n+--------------+----------------+----------------+----------------+----------------+\n|  0.000056789 |   '5.6789e-05' |    '0.000057'  | '5.678900e-05' |    '0.005679%' |\n|  0.00056789  |   '0.00056789' |    '0.000568'  | '5.678900e-04' |    '0.056789%' |\n|  0.0056789   |   '0.0056789'  |    '0.005679'  | '5.678900e-03' |    '0.567890%' |\n|  0.056789    |   '0.056789'   |    '0.056789'  | '5.678900e-02' |    '5.678900%' |\n|  0.56789     |   '0.56789'    |    '0.567890'  | '5.678900e-01' |   '56.789000%' |\n|  5.6789      |   '5.6789'     |    '5.678900'  | '5.678900e+00' |  '567.890000%' |\n| 56.789       |  '56.789'      |   '56.789000'  | '5.678900e+01' | '5678.900000%' |\n+--------------+----------------+----------------+----------------+----------------+\n```\n\n```text\n+--------------+----------------+----------------+----------------+----------------+\n|              |  {<float>:.2}  |  {<float>:.2f} |  {<float>:.2e} |  {<float>:.2%} |\n+--------------+----------------+----------------+----------------+----------------+\n|  0.000056789 |    '5.7e-05'   |      '0.00'    |   '5.68e-05'   |      '0.01%'   |\n|  0.00056789  |    '0.00057'   |      '0.00'    |   '5.68e-04'   |      '0.06%'   |\n|  0.0056789   |    '0.0057'    |      '0.01'    |   '5.68e-03'   |      '0.57%'   |\n|  0.056789    |    '0.057'     |      '0.06'    |   '5.68e-02'   |      '5.68%'   |\n|  0.56789     |    '0.57'      |      '0.57'    |   '5.68e-01'   |     '56.79%'   |\n|  5.6789      |    '5.7'       |      '5.68'    |   '5.68e+00'   |    '567.89%'   |\n| 56.789       |    '5.7e+01'   |     '56.79'    |   '5.68e+01'   |   '5678.90%'   |\n+--------------+----------------+----------------+----------------+----------------+\n```\n* **`'{<num>:g}'` is `'{<float>:.6}'` that strips `'.0'` and has exponent starting at `'1e+06'`.**\n* **When both rounding up and rounding down are possible, the one that returns result with even last digit is chosen. Hence `'{6.5:.0f}'` becomes a `'6'`, while `'{7.5:.0f}'` an `'8'`.**\n* **The last rule only effects numbers that can be represented exactly by a float (`.5`, `.25`, …).**\n\n### Ints\n```python\n{90:c}                                 # Converts 90 to Unicode character 'Z'.\n{90:b}                                 # Converts 90 to binary number '1011010'.\n{90:X}                                 # Converts 90 to hexadecimal number '5A'.\n```\n\n\nNumbers\n-------\n```python\n<int>      = int(<float/str/bool>)             # A whole number. Truncates floats.\n<float>    = float(<int/str/bool>)             # 64-bit decimal. Also <fl>e±<int>.\n<complex>  = complex(real=0, imag=0)           # Complex number. Also <fl> ± <fl>j.\n<Fraction> = fractions.Fraction(numer, denom)  # `<Fraction> = <Fraction> / <int>`.\n<Decimal>  = decimal.Decimal(<str/int/tuple>)  # `Decimal((1, (2,), 3)) == -2000`.\n```\n* **`'int(<str>)'` and `'float(<str>)'` raise ValueError exception if string is malformed.**\n* **Decimal objects store numbers exactly, unlike most floats where `'1.1 + 2.2 != 3.3'`.**\n* **Floats can be compared with: `'math.isclose(<float>, <float>, rel_tol=1e-9)'`.**\n* **Precision of decimal operations is set with: `'decimal.getcontext().prec = <int>'`.**\n* **Bools can be used anywhere ints can, since bool is a subclass of int: `'True + 1 == 2'`.**\n\n### Built-in Functions\n```python\n<num> = pow(<num>, <num>)                      # E.g. `pow(3, 4) == 3 ** 4 == 81`.\n<num> = abs(<num>)                             # E.g. `abs(-50) == abs(50) == 50`.\n<num> = round(<num> [, ±ndigits])              # E.g. `round(123.45, -1) == 120`.\n<num> = min(<coll_of_nums>)                    # Also `max(<num>, <num> [, ...])`.\n<num> = sum(<coll_of_nums>)                    # Also `math.prod(<coll_of_nums>)`.\n```\n\n### Math\n```python\nfrom math import floor, ceil, trunc            # Funcs that convert float into int.\nfrom math import pi, inf, nan, isnan           # `inf*0` and `nan+1` return `nan`.\nfrom math import sqrt, factorial               # `sqrt(-1)` will raise ValueError.\nfrom math import sin, cos, tan                 # Also: degrees, radians, asin, etc.\nfrom math import log, log10, log2              # Log() can accept 'base' argument.\n```\n\n### Statistics\n```python\nfrom statistics import mean, median, mode      # Mode returns most common element.\nfrom statistics import variance, stdev         # Also `cuts = quantiles(data, n)`.\n```\n\n### Random\n```python\nfrom random import random, randint, uniform    # Also: gauss, choice, shuffle, etc.\n```\n\n```python\n<float> = random()                             # Selects random float from [0, 1).\n<num>   = randint/uniform(a, b)                # Selects an int/float from [a, b].\n<float> = gauss(mean, stdev)                   # Also triangular(low, high, mode).\n<el>    = choice(<sequence>)                   # Doesn't modify. Also sample(p, n).\nshuffle(<list>)                                # Works with all mutable sequences.\n```\n\n### Hexadecimal Numbers\n```python\n<int> = 0x<hex>                                # E.g. `0xFf == 255`. Also 0b<bin>.\n<int> = int('±<hex>', 16)                      # Also int('±0x<hex>/±0b<bin>', 0).\n<str> = hex(<int>)                             # Returns '[-]0x<hex>'. Also bin().\n```\n\n### Bitwise Operators\n```python\n<int> = <int> & <int>                          # E.g. `0b1100 & 0b1010 == 0b1000`.\n<int> = <int> | <int>                          # E.g. `0b1100 | 0b1010 == 0b1110`.\n<int> = <int> ^ <int>                          # E.g. `0b1100 ^ 0b1010 == 0b0110`.\n<int> = <int> << n_bits                        # E.g. `0b1111 << 4 == 0b11110000`.\n<int> = ~<int>                                 # E.g. `~0b1 == -(0b1+1) == -0b10`.\n```\n\n\nCombinatorics\n-------------\n```python\nimport itertools as it\n```\n\n```python\n>>> list(it.product('abc', repeat=2))        #   a  b  c\n[('a', 'a'), ('a', 'b'), ('a', 'c'),         # a x  x  x\n ('b', 'a'), ('b', 'b'), ('b', 'c'),         # b x  x  x\n ('c', 'a'), ('c', 'b'), ('c', 'c')]         # c x  x  x\n```\n\n```python\n>>> list(it.permutations('abc', 2))          #   a  b  c\n[('a', 'b'), ('a', 'c'),                     # a .  x  x\n ('b', 'a'), ('b', 'c'),                     # b x  .  x\n ('c', 'a'), ('c', 'b')]                     # c x  x  .\n```\n\n```python\n>>> list(it.combinations('abc', 2))          #   a  b  c\n[('a', 'b'), ('a', 'c'),                     # a .  x  x\n ('b', 'c')                                  # b .  .  x\n]                                            # c .  .  .\n```\n\n\nDatetime\n--------\n**Provides 'date', 'time', 'datetime' and 'timedelta' classes. All are immutable and hashable.**\n\n```python\n# $ pip3 install python-dateutil\nfrom datetime import date, time, datetime, timedelta, timezone\nimport zoneinfo, dateutil.tz\n```\n\n```python\n<D>  = date(year, month, day)               # Only accepts valid dates between AD 1 and 9999.\n<T>  = time(hour=0, minute=0, second=0)     # Accepts `microsecond=0, tzinfo=None, fold=0`.\n<DT> = datetime(year, month, day, hour=0)   # Accepts `minute=0, second=0, microsecond=0, …`.\n<TD> = timedelta(weeks=0, days=0, hours=0)  # Accepts `minutes=0, seconds=0, microseconds=0`.\n```\n* **Times and datetimes that have defined timezone are called aware and ones that don't, naive. If time or datetime object is naive, it is presumed to be in the system's timezone.**\n* **`'fold=1'` means the second pass in case of time jumping back (usually for one hour).**\n* **Timedelta normalizes arguments to ±days, seconds (< 86 400) and microseconds (< 1M). Its str() method returns `'[±D, ]H:MM:SS[.…]'` and total_seconds() a float of seconds.**\n* **Use `'<D/DT>.weekday()'` to get the day of the week as an int (with Monday being 0).**\n\n### Now\n```python\n<D/DTn> = D/DT.today()                      # Current local date or naive DT. Also DT.now().\n<DTa>   = DT.now(<tzinfo>)                  # Aware DT from current time in passed timezone.\n```\n* **To extract time use `'<DTn>.time()'`, `'<DTa>.time()'` or `'<DTa>.timetz()'`.**\n\n### Timezones\n```python\n<tzinfo> = timezone.utc                     # Coordinated universal time. London without DST.\n<tzinfo> = timezone(<timedelta>)            # Timezone with fixed offset from universal time.\n<tzinfo> = dateutil.tz.tzlocal()            # Local timezone with dynamic offset from the UTC.\n<tzinfo> = zoneinfo.ZoneInfo('<iana_key>')  # 'Continent/City_Name' zone with dynamic offset.\n<DTa>    = <DT>.astimezone([<tzinfo>])      # Converts DT to the passed or local fixed zone.\n<Ta/DTa> = <T/DT>.replace(tzinfo=<tzinfo>)  # Changes the timezone object without conversion.\n```\n* **Timezones returned by tzlocal(), ZoneInfo(), and implicit local timezone of naive objects have offsets that vary through time due to DST and historical changes of the base offset.**\n* **To get ZoneInfo() to work on Windows run `'> pip3 install tzdata'`.**\n\n### Encode\n```python\n<D/T/DT> = D/T/DT.fromisoformat(<str>)      # Object from the ISO string. Raises ValueError.\n<DT>     = DT.strptime(<str>, '<format>')   # Naive or aware datetime from the custom string.\n<D/DTn>  = D/DT.fromordinal(<int>)          # Date or DT from days since the Gregorian NYE 1.\n<DTn>    = DT.fromtimestamp(<float>)        # A local naive DT from seconds since the epoch.\n<DTa>    = DT.fromtimestamp(<float>, <tz>)  # An aware datetime from seconds since the epoch.\n```\n* **ISO strings come in following forms: `'YYYY-MM-DD'`, `'HH:MM:SS.mmmuuu[±HH:MM]'`, or both separated by an arbitrary character. All parts following the hours are optional.**\n* **Python uses the Unix epoch: `'1970-01-01 00:00 UTC'`, `'1970-01-01 01:00 CET'`, ...**\n\n### Decode\n```python\n<str>    = <D/T/DT>.isoformat(sep='T')      # Also `timespec='auto/hours/minutes/seconds/…'`.\n<str>    = <D/T/DT>.strftime('<format>')    # Returns custom string representation of object.\n<int>    = <D/DT>.toordinal()               # Days since NYE 1, ignoring DT's time and zone.\n<float>  = <DTn>.timestamp()                # Seconds since the epoch from a local naive DT.\n<float>  = <DTa>.timestamp()                # Seconds since the epoch from an aware datetime.\n```\n\n### Format\n```python\n>>> dta = datetime.strptime('2025-08-14 23:39:00.00 +0200', '%Y-%m-%d %H:%M:%S.%f %z')\n>>> dta.strftime(\"%dth of %B '%y (%a), %I:%M %p %Z\")\n\"14th of August '25 (Thu), 11:39 PM UTC+02:00\"\n```\n* **`'%z'` accepts `'±HH[:]MM'` and returns `'±HHMM'` or empty string if object is naive.**\n* **`'%Z'` accepts `'UTC/GMT'` and local timezone's code and returns timezone's name, `'UTC[±HH:MM]'` if timezone is nameless, or an empty string if object is naive.**\n\n### Arithmetics\n```python\n<bool>   = <D/T/DTn> > <D/T/DTn>            # Ignores time jumps (fold attribute). Also `==`.\n<bool>   = <DTa>     > <DTa>                # Ignores time jumps if they share tzinfo object.\n<TD>     = <D/DTn>   - <D/DTn>              # Ignores jumps. Convert to UTC for actual delta.\n<TD>     = <DTa>     - <DTa>                # Ignores jumps if they share the tzinfo object.\n<D/DT>   = <D/DT>    ± <TD>                 # Returned datetime can fall into a missing hour.\n<TD>     = <TD>      * <float>              # Also `<TD> = <TD> ± <TD>`, `<TD> = abs(<TD>)`.\n<float>  = <TD>      / <TD>                 # Calling divmod(<TD>, <TD>) returns int and TD.\n```\n\n\nFunction\n--------\n**Independent block of code that returns a value when called.**\n\n```python\ndef <func_name>(<nondefault_args>): ...                  # E.g. `func(x, y):`.\ndef <func_name>(<default_args>): ...                     # E.g. `func(x=0, y=0):`.\ndef <func_name>(<nondefault_args>, <default_args>): ...  # E.g. `func(x, y=0):`.\n```\n* **Function returns None if it doesn't encounter the `'return <object/expr>'` statement.**\n* **Run `'global <var_name>'` inside the function before assigning to the global variable.**\n* **Value of a default argument is evaluated when function is first encountered in the scope.**\n* **Any mutation of a default argument value will persist between function invocations!**\n\n### Function Call\n\n```python\n<obj> = <function>(<positional_args>)                    # E.g. `func(0, 0)`.\n<obj> = <function>(<keyword_args>)                       # E.g. `func(x=0, y=0)`.\n<obj> = <function>(<positional_args>, <keyword_args>)    # E.g. `func(0, y=0)`.\n```\n\n\nSplat Operator\n--------------\n**Splat expands a collection into positional arguments, while splatty-splat expands a dictionary into keyword arguments.**\n```python\nargs, kwargs = (1, 2), {'z': 3}\nfunc(*args, **kwargs)\n```\n\n#### Is the same as:\n```python\nfunc(1, 2, z=3)\n```\n\n### Inside Function Definition\n**Splat combines zero or more positional arguments into a tuple, while splatty-splat combines zero or more keyword arguments into a dictionary.**\n```python\ndef add(*a):\n    return sum(a)\n```\n\n```python\n>>> add(1, 2, 3)\n6\n```\n\n#### Allowed compositions of arguments and the ways they can be called:\n```text\n+---------------------------+----------------+--------------+--------------+\n|                           | func(x=1, y=2) | func(1, y=2) |  func(1, 2)  |\n+---------------------------+----------------+--------------+--------------+\n| func(x, *args, **kwargs): |      yes       |     yes      |     yes      |\n| func(*args, y, **kwargs): |      yes       |     yes      |              |\n| func(*, x, **kwargs):     |      yes       |              |              |\n+---------------------------+----------------+--------------+--------------+\n```\n\n### Other Uses\n```python\n<list>  = [*<collection> [, ...]]  # Same as `list(<coll>) [+ ...]`.\n<tuple> = (*<collection>, [...])   # Same as `tuple(<coll>) [+ ...]`.\n<set>   = {*<collection> [, ...]}  # Same as `set(<coll>) [| ...]`.\n<dict>  = {**<dict> [, ...]}       # Last dict has priority. Also |.\n```\n\n```python\nhead, *body, tail = <collection>   # Head or tail can be omitted.\n```\n\n\nInline\n------\n### Lambda\n```python\n<func> = lambda: <return_value>                    # A single statement function.\n<func> = lambda <arg_1>, <arg_2>: <return_value>   # Also allows default arguments.\n```\n\n### Comprehensions\n```python\n<list> = [i+1 for i in range(5)]                   # Returns `[1, 2, 3, 4, 5]`.\n<iter> = (i for i in range(10) if i > 5)           # Returns `iter([6, 7, 8, 9])`.\n<set>  = {i+5 for i in range(5)}                   # Returns `{5, 6, 7, 8, 9}`.\n<dict> = {i: i**2 for i in range(1, 4)}            # Returns `{1: 1, 2: 4, 3: 9}`.\n```\n\n```python\n>>> [l+r for l in 'abc' for r in 'abc']            # Inner loop is on right side.\n['aa', 'ab', 'ac', ..., 'cc']\n```\n\n### Map, Filter, Reduce\n```python\nfrom functools import reduce\n```\n\n```python\n<iter> = map(lambda x: x + 1, range(5))            # Returns `iter([1, 2, 3, 4, 5])`.\n<iter> = filter(lambda x: x > 5, range(10))        # Returns `iter([6, 7, 8, 9])`.\n<obj>  = reduce(lambda out, x: out + x, range(5))  # Returns 10. Accepts 'initial'.\n```\n\n### Any, All\n```python\n<bool> = any(<collection>)                         # Is bool(<el>) True for any el?\n<bool> = all(<collection>)                         # Is it True for all (or empty)?\n```\n\n### Conditional Expression\n```python\n<obj> = <exp> if <condition> else <exp>            # Evaluates only one expression.\n```\n\n```python\n>>> [i if i else 'zero' for i in (0, 1, 2, 3)]     # `any(['', [], None])` is False.\n['zero', 1, 2, 3]\n```\n\n### And, Or\n```python\n<obj> = <exp> and <exp> [and ...]                  # Returns first false or last obj.\n<obj> = <exp> or <exp> [or ...]                    # Returns first true or last obj.\n```\n\n### Walrus Operator\n```python\n>>> [i for ch in '0123' if (i := int(ch)) > 0]     # Assigns to var in mid-sentence.\n[1, 2, 3]\n```\n\n### Named Tuple, Enum, Dataclass\n```python\nfrom collections import namedtuple\nPoint = namedtuple('Point', 'x y')                 # Creates tuple's subclass.\npoint = Point(0, 0)                                # Returns its instance.\n\nfrom enum import Enum\nDirection = Enum('Direction', 'N E S W')           # Creates an enumeration.\ndirection = Direction.N                            # Returns its member.\n\nfrom dataclasses import make_dataclass\nPlayer = make_dataclass('Player', ['loc', 'dir'])  # Creates a normal class.\nplayer = Player(point, direction)                  # Returns its instance.\n```\n\n\nImports\n-------\n**Mechanism that makes code in one file available to another file.**\n\n```python\nimport <module>                      # Imports a built-in module or the '<module>.py'.\nimport <package>                     # A built-in package or '<package>/__init__.py'.\nimport <package>.<module>            # A package's module or '<package>/<module>.py'.\nfrom <pkg/mod>[.…] import <obj>      # Imports a module, function, class or variable.\n```\n* **Package is a collection of modules, but it can also define its own functions, variables, etc. On a filesystem this corresponds to a directory of Python files with an optional init script.**\n* **`'import <package>'` only exposes modules that are imported inside `'__init__.py'`.**\n* **Directory of the file that is passed to python command serves as the root of local imports.**\n* **Use relative imports, i.e. `'from .[…][<pkg/mod>[.…]] import <obj>'`, if project has scattered entry points. Another option is to install the whole project by moving its code into 'src' dir, adding ['pyproject.toml'](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#basic-information) to its root, and running `'$ pip3 install -e .'`.**\n\n\nClosure\n-------\n**We have/get a closure in Python when a nested function references a value of its enclosing function and then the enclosing function returns its nested function (any value that is ref&shy;erenced from within multiple nested functions gets shared).**\n\n```python\ndef get_multiplier(a):\n    def out(b):\n        return a * b\n    return out\n```\n\n```python\n>>> multiply_by_3 = get_multiplier(3)\n>>> multiply_by_3(10)\n30\n```\n\n### Partial\n```python\nfrom functools import partial\n<function> = partial(<function> [, <arg_1> [, ...]])\n```\n\n```python\n>>> def multiply(a, b):\n...     return a * b\n>>> multiply_by_3 = partial(multiply, 3)\n>>> multiply_by_3(10)\n30\n```\n* **Partial is also useful in cases when a function needs to be passed as an argument because it enables us to set its arguments beforehand (`'collections.defaultdict(<func>)'`, `'iter(<func>, to_exc)'` and `'dataclasses.field(default_factory=<func>)'`).**\n\n### Non-Local\n**If variable is being assigned to anywhere in the scope (i.e., body of a function), it is treated as&nbsp;a local variable unless it is declared `'global'` or `'nonlocal'` before its first usage.**\n\n```python\ndef get_counter():\n    i = 0\n    def out():\n        nonlocal i\n        i += 1\n        return i\n    return out\n```\n\n```python\n>>> counter = get_counter()\n>>> counter(), counter(), counter()\n(1, 2, 3)\n```\n\n\nDecorator\n---------\n**A decorator takes a function, adds some functionality and returns it. It can be any [callable](#callable), but is usually implemented as a function that returns a [closure](#closure).**\n\n```python\n@decorator_name\ndef function_that_gets_passed_to_decorator():\n    ...\n```\n\n### Debugger Example\n**Decorator that prints function's name every time that function is called.**\n\n```python\nfrom functools import wraps\n\ndef debug(func):\n    @wraps(func)\n    def out(*args, **kwargs):\n        print(func.__name__)\n        return func(*args, **kwargs)\n    return out\n\n@debug\ndef add(x, y):\n    return x + y\n```\n* **Wraps is a helper decorator that copies the metadata of the passed function (func) to the function it is decorating (out). Without it, `'add.__name__'` would return string `'out'`.**\n\n### Cache\n**Decorator that stores return values. All arguments must be hashable.**\n\n```python\nfrom functools import cache\n\n@cache\ndef fibonacci(n):\n    return n if n < 2 else fibonacci(n-2) + fibonacci(n-1)\n```\n* **Potential problem with cache is that it can grow indefinitely. To clear stored values run `'<func>.cache_clear()'`, or use `'@lru_cache(maxsize=<int>)'` decorator instead.**\n* **CPython interpreter limits recursion depth to 3000 by default. To increase this limit run `'sys.setrecursionlimit(<int>)'`.**\n\n### Parametrized Decorator\n**Decorator that accepts arguments and returns a normal decorator.**\n```python\nfrom functools import wraps\n\ndef debug(print_result=False):\n    def decorator(func):\n        @wraps(func)\n        def out(*args, **kwargs):\n            result = func(*args, **kwargs)\n            print(func.__name__, result if print_result else '')\n            return result\n        return out\n    return decorator\n\n@debug(print_result=True)\ndef add(x, y):\n    return x + y\n```\n* **Using only `'@debug'` to decorate the add() function would not work here, because debug would then receive the add() function as a 'print_result' argument. Decorators can how&shy;ever manually check if the argument they received is a function and act accordingly.**\n\n\nClass\n-----\n**A template for creating user-defined objects.**\n\n```python\nclass MyClass:\n    def __init__(self, a):\n        self.a = a\n    def __str__(self):\n        return str(self.a)\n    def __repr__(self):\n        class_name = self.__class__.__name__\n        return f'{class_name}({self.a!r})'\n\n    @classmethod\n    def get_class_name(cls):\n        return cls.__name__\n```\n\n```python\n>>> obj = MyClass(1)\n>>> obj.a, str(obj), repr(obj)\n(1, '1', 'MyClass(1)')\n```\n* **Methods whose names start and end with two underscores are called special methods. They are executed when object is passed to a built-in function or used as an operand. For&nbsp;example, `'print(a)'` calls `'a.__str__()'` and `'a + b'` calls `'a.__add__(b)'`.**\n* **Methods that are decorated with `'@staticmethod'` receive neither 'self' nor 'cls' arg.**\n* **Return value of str() special method should be readable and of repr() unambiguous.**\n* **All calls to str() special method are dispatched to repr() when only repr() is provided.**\n\n#### Expressions that call the str() special method:\n```python\nf'{obj}'\nprint(obj)\nlogging.warning(obj)\n<csv_writer>.writerow([obj])\n```\n\n#### Expressions that call the repr() special method:\n```python\nf'{obj!r}'\nprint/str/repr([obj])\nprint/str/repr({obj: obj})\nprint/str/repr(MyDataClass(obj))\n```\n\n### Subclass\n* **Inheritance is a mechanism that enables a class to extend some other class (i.e. sub&shy;class&nbsp;to extend its parent), and by doing so inherit all of its methods and attributes.**\n* **Subclass can then add its own methods and attributes or override inherited ones by reusing their names.**\n\n```python\nclass Person:\n    def __init__(self, name):\n        self.name = name\n    def __repr__(self):\n        return f'Person({self.name!r})'\n    def __lt__(self, other):\n        return self.name < other.name\n\nclass Employee(Person):\n    def __init__(self, name, staff_num):\n        super().__init__(name)\n        self.staff_num = staff_num\n    def __repr__(self):\n        return f'Employee({self.name!r}, {self.staff_num})'\n```\n\n```python\n>>> people = [Person('Bob'), Employee('Ann', 0)]\n>>> sorted(people)\n[Employee('Ann', 0), Person('Bob')]\n```\n\n### Type Annotations\n* **They add type hints to variables, arguments and functions (`'def f() -> <type>:'`).**\n* **Hints are used by type checkers like [mypy](https://pypi.org/project/mypy/), data validation libraries such as [Pydantic](https://pypi.org/project/pydantic/) and lately also by [Cython](https://pypi.org/project/Cython/) compiler. However, they are not enforced by CPython interpreter.**\n```python\nfrom collections import abc\n\n<name>: <type> [| ...] [= <obj>]\n<name>: list/set/abc.Iterable/abc.Sequence[<type>] [= <obj>]\n<name>: tuple/dict[<type>, ...] [= <obj>]\n```\n\n### Dataclass\n**Decorator that uses class variables to generate init(), repr() and eq() special methods.**\n```python\nfrom dataclasses import dataclass, field, make_dataclass\n\n@dataclass(order=False, frozen=False)\nclass <class_name>:\n    <attr_name>: <type>\n    <attr_name>: <type> = <default_value>\n    <attr_name>: list/dict/set = field(default_factory=list/dict/set)\n```\n* **Objects can be made [sortable](#sortable) with `'order=True'` and immutable with `'frozen=True'`.**\n* **For object to be [hashable](#hashable), all attributes must be hashable and `'frozen'` must be `'True'`.**\n* **Function field() is needed because `'<attr_name>: list = []'` would make a list that is&nbsp;shared among all instances. Its 'default_factory' argument accepts any [callable](#callable) object.**\n* **For attributes/arguments of arbitrary type use `'typing.Any'`.**\n\n#### Inline:\n```python\nP = make_dataclass('P', ['x', 'y'])\nP = make_dataclass('P', [('x', float), ('y', float)])\nP = make_dataclass('P', [('x', float, 0), ('y', float, 0)])\n```\n\n### Property\n**Pythonic way of implementing getters and setters.**\n```python\nclass Person:\n    @property\n    def name(self):\n        return ' '.join(self._name)\n\n    @name.setter\n    def name(self, value):\n        self._name = value.split()\n```\n\n```python\n>>> person = Person()\n>>> person.name = '\\t Guido  van Rossum \\n'\n>>> person.name\n'Guido van Rossum'\n```\n\n### Slots\n**Mechanism that restricts objects to listed attributes.**\n\n```python\nclass Point:\n    __slots__ = ['x', 'y']\n```\n\n### Copy\n```python\nfrom copy import copy, deepcopy\n<object> = copy/deepcopy(<object>)\n```\n\n\nDuck Types\n----------\n**A duck type is an implicit type that prescribes a set of special methods. Any object that has those methods defined is considered a member of that duck type.**\n\n### Comparable\n* **If eq() method is not overridden, it returns `'id(self) == id(other)'`, which is the same as `'self is other'`. That means all user-defined objects compare not equal by default (because id() returns object's memory address that is guaranteed to be unique).**\n* **Only the left side object has eq() method called, unless it returns NotImplemented, in which case the right object is consulted. Result is False if both return NotImplemented.**\n* **Method ne() (called by `'!='`) automatically works on any object that has eq() defined.**\n\n```python\nclass MyComparable:\n    def __init__(self, a):\n        self.a = a\n    def __eq__(self, other):\n        if isinstance(other, type(self)):\n            return self.a == other.a\n        return NotImplemented\n```\n\n### Hashable\n* **Hashable object needs hash() and eq() methods and its hash value must never change.**\n* **Hashable objects that compare equal must have the same hash value, meaning default hash() that returns `'id(self)'` will not do. That is why Python automatically makes classes unhashable if you only implement the eq() method.**\n\n```python\nclass MyHashable:\n    def __init__(self, a):\n        self._a = a\n    @property\n    def a(self):\n        return self._a\n    def __eq__(self, other):\n        if isinstance(other, type(self)):\n            return self.a == other.a\n        return NotImplemented\n    def __hash__(self):\n        return hash(self.a)\n```\n\n### Sortable\n* **With 'total_ordering' decorator, you only need to provide eq() and one of lt(), gt(), le() or ge() special methods (called by <, >, <=, >=) and the rest will be automatically generated.**\n* **Built-in functions sorted() and min() only require lt() method, while max() only requires gt(). However, it's best to define them all so that confusion doesn't arise in other contexts.**\n* **When two lists, strings, or data classes are compared, their values get compared one by one until a pair of unequal values is found. The comparison of this two values is then re&shy;turned. The shorter sequence is considered smaller in case of all their values being equal.**\n* **To sort collection of strings in proper alphabetical order pass `'key=locale.strxfrm'` to sorted() after running `'locale.setlocale(locale.LC_COLLATE, \"en_US.UTF-8\")'`.**\n\n```python\nfrom functools import total_ordering\n\n@total_ordering\nclass MySortable:\n    def __init__(self, a):\n        self.a = a\n    def __eq__(self, other):\n        if isinstance(other, type(self)):\n            return self.a == other.a\n        return NotImplemented\n    def __lt__(self, other):\n        if isinstance(other, type(self)):\n            return self.a < other.a\n        return NotImplemented\n```\n\n### Iterator\n* **Any object that has methods next() and iter() is an iterator.**\n* **Next() should return next item or raise StopIteration exception.**\n* **Iter() should return unmodified iterator, i.e. the 'self' argument.**\n* **Any object that has iter() method can be used in a for loop.**\n```python\nclass Counter:\n    def __init__(self):\n        self.i = 0\n    def __next__(self):\n        self.i += 1\n        return self.i\n    def __iter__(self):\n        return self\n```\n\n```python\n>>> counter = Counter()\n>>> next(counter), next(counter), next(counter)\n(1, 2, 3)\n```\n\n#### Python has many different iterator objects:\n* **Sequence iterators returned by the [iter()](#iterator) function, such as list\\_iterator, etc.**\n* **Objects returned by the [itertools](#itertools) module, such as count, repeat and cycle.**\n* **Generators returned by the [generator functions](#generator) and [generator expressions](#comprehensions).**\n* **File objects returned by the [open()](#open) function, [SQLite](#sqlite) cursor objects, etc.**\n\n### Callable\n* **All functions and classes have a call() method that is executed when they are called.**\n* **Use `'callable(<obj>)'` or `'isinstance(<obj>, collections.abc.Callable)'` to&nbsp;check if object is callable. You can also call the object and see if it raised TypeError.**\n* **When this text uses `'<function>'` as an argument, it actually means `'<callable>'`.**\n```python\nclass Counter:\n    def __init__(self):\n        self.i = 0\n    def __call__(self):\n        self.i += 1\n        return self.i\n```\n\n```python\n>>> counter = Counter()\n>>> counter(), counter(), counter()\n(1, 2, 3)\n```\n\n### Context Manager\n* **With statements only work on objects that have enter() and exit() special methods.**\n* **Enter() should lock the resources and optionally return an object (file, socket, etc.).**\n* **Exit() should release the resources (for example close the file, release the lock, etc.).**\n* **Any exception that happens inside the with block is passed to exit() method. Exit() can&nbsp;then suppress this exception by returning a true value (not None, False, 0, etc.).**\n```python\nclass MyOpen:\n    def __init__(self, filename):\n        self.filename = filename\n    def __enter__(self):\n        self.file = open(self.filename)\n        return self.file\n    def __exit__(self, exc_type, exception, traceback):\n        self.file.close()\n```\n\n```python\n>>> with open('test.txt', 'w') as file:\n...     file.write('Hello World!')\n>>> with MyOpen('test.txt') as file:\n...     print(file.read())\nHello World!\n```\n\n\nIterable Duck Types\n-------------------\n### Iterable\n* **Only required method is iter(). It should return an iterator of object's items.**\n* **Method contains() automatically works on any object that has iter() defined.**\n```python\nclass MyIterable:\n    def __init__(self, a):\n        self.a = a\n    def __iter__(self):\n        return iter(self.a)\n    def __contains__(self, el):\n        return el in self.a\n```\n\n```python\n>>> obj = MyIterable([1, 2, 3])\n>>> [el for el in obj]\n[1, 2, 3]\n>>> 1 in obj\nTrue\n```\n\n### Collection\n* **Only required methods are iter() and len(). Len() should return the length of collection.**\n* **This text refers to all iterable objects as collections, which is technically incorrect. The term _iterable_ was avoided because it sounds scarier and more vague than _collection_. The main drawback of this decision is that the reader could think a certain function doesn't accept iterators when it actually does, since iterators are the only built-in objects that are&nbsp;iterable but are not collections.**\n```python\nclass MyCollection:\n    def __init__(self, a):\n        self.a = a\n    def __iter__(self):\n        return iter(self.a)\n    def __contains__(self, el):\n        return el in self.a\n    def __len__(self):\n        return len(self.a)\n```\n\n### Sequence\n* **Only required methods are getitem() and len(). Getitem() should return an item at the passed index or raise IndexError (it may also support negative indices and/or slices).**\n* **Iter() and contains() automatically work on any object with defined getitem() method.**\n* **Reversed() automatically works on any object that has getitem() and len() defined. It returns reversed iterator of object's items.**\n```python\nclass MySequence:\n    def __init__(self, a):\n        self.a = a\n    def __iter__(self):\n        return iter(self.a)\n    def __contains__(self, el):\n        return el in self.a\n    def __len__(self):\n        return len(self.a)\n    def __getitem__(self, i):\n        return self.a[i]\n    def __reversed__(self):\n        return reversed(self.a)\n```\n\n#### Discrepancies between glossary definitions and abstract base classes:\n* **Python's glossary defines iterable as any object with special methods iter() or getitem(), and sequence as any object with getitem() and len(). It doesn't define the term _collection_.**\n* **Passing ABC Iterable to isinstance() or issubclass() only checks whether object/class has special method iter(), while ABC Collection checks for iter(), contains() and len().**\n\n### ABC Sequence\n* **It's a richer interface than the basic sequence that also requires just getitem() and len().**\n* **Extending it generates iter(), contains(), reversed(), index() and count() special methods.**\n* **Unlike `'abc.Iterable'` and `'abc.Collection'`, it is not a duck type. That is why exp. `'issubclass(MySequence, abc.Sequence)'` would return False even if MySequence had all methods defined. It however recognizes list, tuple, range, string, bytes, bytearray, array, memoryview and deque, since they are registered as Sequence's virtual subclasses.**\n```python\nfrom collections import abc\n\nclass MyAbcSequence(abc.Sequence):\n    def __init__(self, a):\n        self.a = a\n    def __len__(self):\n        return len(self.a)\n    def __getitem__(self, i):\n        return self.a[i]\n```\n\n#### Table of required and automatically available special methods:\n```text\n+------------+------------+------------+------------+--------------+\n|            |  Iterable  | Collection |  Sequence  | abc.Sequence |\n+------------+------------+------------+------------+--------------+\n| iter()     |    REQ     |    REQ     |    Yes     |     Yes      |\n| contains() |    Yes     |    Yes     |    Yes     |     Yes      |\n| len()      |            |    REQ     |    REQ     |     REQ      |\n| getitem()  |            |            |    REQ     |     REQ      |\n| reversed() |            |            |    Yes     |     Yes      |\n| index()    |            |            |            |     Yes      |\n| count()    |            |            |            |     Yes      |\n+------------+------------+------------+------------+--------------+\n```\n* **Method iter() is required for `'isinstance(<obj>, abc.Iterable)'` to return True, however any object with getitem() method works with any code expecting an iterable.**\n* **MutableSequence, Set, MutableSet, Mapping and MutableMapping ABCs are also ex&shy;tendable. Use `'<abc>.__abstractmethods__'` to get names of required methods.**\n\n\nEnum\n----\n**Class of named constants called members.**\n\n```python\nfrom enum import Enum, auto\n```\n\n```python\nclass <enum_name>(Enum):\n    <member_name> = auto()              # An increment of last numeric value or 1.\n    <member_name> = <value>             # Values don't have to be hashable/unique.\n    <member_name> = <el_1>, <el_2>      # Value can be a collection, e.g. a tuple.\n```\n* **Methods receive the member they were called on as the 'self' argument.**\n* **Accessing a member named after a reserved keyword causes SyntaxError.**\n\n```python\n<member> = <enum>.<member_name>         # Accesses a member via enum's attribute.\n<member> = <enum>['<member_name>']      # Returns the member or raises KeyError.\n<member> = <enum>(<value>)              # Returns the member or raises ValueError.\n<str>    = <member>.name                # Returns the member's name as a string.\n<obj>    = <member>.value               # Value can't be a user-defined function.\n```\n\n```python\n<list>   = list(<enum>)                 # Returns a list containing every member.\n<list>   = <enum>._member_names_        # Returns a list containing member names.\n<list>   = [m.value for m in <enum>]    # Returns a list containing member values.\n```\n\n```python\n<enum>   = type(<member>)               # Returns an enum. Also <memb>.__class__.\n<iter>   = itertools.cycle(<enum>)      # Returns an endless iterator of members.\n<member> = random.choice(list(<enum>))  # Randomly selects one of enum's members.\n```\n\n### Inline\n```python\nCutlery = Enum('Cutlery', 'FORK KNIFE SPOON')\nCutlery = Enum('Cutlery', ['FORK', 'KNIFE', 'SPOON'])\nCutlery = Enum('Cutlery', {'FORK': 1, 'KNIFE': 2, 'SPOON': 3})\n```\n\n#### User-defined functions cannot be values, so they must be wrapped:\n```python\nfrom functools import partial\nLogicOp = Enum('LogicOp', {'AND': partial(lambda l, r: l and r),\n                           'OR':  partial(lambda l, r: l or r)})\n```\n\n\nExceptions\n----------\n```python\ntry:\n    <code>\nexcept <exception>:\n    <code>\n```\n\n### Complex Example\n```python\ntry:\n    <code_1>\nexcept <exception_a>:\n    <code_2_a>\nexcept <exception_b>:\n    <code_2_b>\nelse:\n    <code_2_c>\nfinally:\n    <code_3>\n```\n* **Code inside the `'else'` block will only be executed if `'try'` block had no exceptions.**\n* **Code inside the `'finally'` block will always be executed (unless a signal is received).**\n* **All variables that are initialized in executed blocks are also visible in all subsequent blocks, as well as outside the try statement (only the function block delimits scope).**\n* **To catch signals use `'signal.signal(signal_number, my_handler_function)'`.**\n\n### Catching Exceptions\n```python\nexcept <exception>: ...\nexcept <exception> as <name>: ...\nexcept (<exception>, [...]): ...\nexcept (<exception>, [...]) as <name>: ...\n```\n* **It also catches subclasses, e.g. `'ArithmeticError'` is caught by `'except Exception:'`.**\n* **Use `'traceback.print_exc()'` to print the full error message to standard error stream.**\n* **Use `'print(<name>)'` to print just the cause of the exception (its arguments) to stdout.**\n* **Use `'logging.exception(<str>)'` to log the passed message, followed by the full error message of the caught exception. For details about how to set up the logger see [Logging](#logging).**\n* **`'sys.exc_info()'` returns type, object and traceback of the caught exception as a tuple.**\n\n### Raising Exceptions\n```python\nraise <exception>\nraise <exception>()\nraise <exception>(<obj> [, ...])\n```\n\n#### Re-raising caught exception:\n```python\nexcept <exception> [as <name>]:\n    ...\n    raise\n```\n\n### Exception Object\n```python\narguments = <name>.args\nexc_type  = <name>.__class__\nfilename  = <name>.__traceback__.tb_frame.f_code.co_filename\nfunc_name = <name>.__traceback__.tb_frame.f_code.co_name\nline_str  = linecache.getline(filename, <name>.__traceback__.tb_lineno)\ntrace_str = ''.join(traceback.format_tb(<name>.__traceback__))\nerror_msg = ''.join(traceback.format_exception(*sys.exc_info()))\n```\n\n### Built-in Exceptions\n```text\nBaseException\n +-- SystemExit                   # Raised when `sys.exit()` is called. See #Exit for details.\n +-- KeyboardInterrupt            # Raised when the user hits the interrupt key, i.e. `ctrl-c`.\n +-- Exception                    # User-defined exceptions should be derived from this class.\n      +-- ArithmeticError         # Base class for arithmetic errors such as ZeroDivisionError.\n      +-- AssertionError          # Raised by `assert <exp>` if expression returns false value.\n      +-- AttributeError          # Raised when object doesn't have requested attribute/method.\n      +-- EOFError                # Raised by `input()` when it hits an end-of-file condition.\n      +-- LookupError             # Base class for errors when a collection can't find an item.\n      |    +-- IndexError         # Raised when index of a sequence (list/str) is out of range.\n      |    +-- KeyError           # Raised when a dictionary's key or a set element is missing.\n      +-- MemoryError             # Out of memory. May be too late to start deleting variables.\n      +-- NameError               # Raised when nonexistent name (variable/func/class) is used.\n      |    +-- UnboundLocalError  # Raised when a local name is used before it's being defined.\n      +-- OSError                 # Errors such as FileExistsError and TimeoutError. See #Open.\n      |    +-- ConnectionError    # Errors such as BrokenPipeError and ConnectionAbortedError.\n      +-- RuntimeError            # Is raised by errors that do not fit into other categories.\n      |    +-- NotImplementedEr…  # Can be raised by abstract methods or by an unfinished code.\n      |    +-- RecursionError     # Raised if max recursion depth is exceeded (3k by default).\n      +-- StopIteration           # Raised when exhausted (empty) iterator is passed to next().\n      +-- TypeError               # Raised when argument of wrong type is passed to a function.\n      +-- ValueError              # Raised when it has the right type but inappropriate value.\n```\n\n#### Collections and their exceptions:\n```text\n+-----------+------------+------------+------------+\n|           |    List    |    Set     |    Dict    |\n+-----------+------------+------------+------------+\n| getitem() | IndexError |            |  KeyError  |\n| pop()     | IndexError |  KeyError  |  KeyError  |\n| remove()  | ValueError |  KeyError  |            |\n| index()   | ValueError |            |            |\n+-----------+------------+------------+------------+\n```\n\n#### Useful built-in exceptions:\n```python\nraise TypeError('Function received argument of the wrong type!')\nraise ValueError('Argument has the right type but its value is off!')\nraise RuntimeError('I am too lazy to define my own exception!')\n```\n\n### User-defined Exceptions\n```python\nclass MyError(Exception): pass\nclass MyInputError(MyError): pass\n```\n\n\nExit\n----\n**Exits the interpreter by raising SystemExit exception.**\n```python\nimport sys\nsys.exit()                     # Exits with exit code 0 (success).\nsys.exit(<int>)                # Exits with the passed exit code.\nsys.exit(<obj>)                # Prints to stderr and exits with 1.\n```\n\n\nPrint\n-----\n```python\nprint(<el_1>, ..., sep=' ', end='\\n', file=sys.stdout, flush=False)\n```\n* **Use `'file=sys.stderr'` or `'sys.stderr.write(<str>)'` for messages about errors.**\n* **Stdout and stderr streams hold output in a buffer until they receive a string containing '\\n' or '\\r', buffer reaches 4096 characters, `'flush=True'` is used, or the program exits.**\n\n### Pretty Print\n```python\nfrom pprint import pprint\npprint(<collection>, width=80, depth=None, compact=False, sort_dicts=True)\n```\n* **Each item is printed on its own line if collection exceeds 'width' characters.**\n* **Nested collections that are `'depth=<int>'` levels deep get printed as `'...'`.**\n\n\nInput\n-----\n```python\n<str> = input()\n```\n* **Reads a line from the user input or pipe if present (trailing newline gets stripped).**\n* **If argument is passed, it gets printed to the standard output before input is read.**\n* **EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or stream is already exhausted.**\n\n\nCommand Line Arguments\n----------------------\n```python\nimport sys\nscripts_path = sys.argv[0]\narguments    = sys.argv[1:]\n```\n\n### Argument Parser\n```python\nfrom argparse import ArgumentParser\np = ArgumentParser(description=<str>)                       # Also accepts 'usage' str.\np.add_argument('-<char>', '--<name>', action='store_true')  # Flag (defaults to False).\np.add_argument('-<char>', '--<name>', type=<type>)          # Option (defaults to None).\np.add_argument('<name>', type=<type>, nargs=1)              # Mandatory first argument.\np.add_argument('<name>', type=<type>, nargs='+')            # Mandatory remaining args.\np.add_argument('<name>', type=<type>, nargs='?')            # Optional argument. Also *.\nargs  = p.parse_args()                                      # Exits on a parsing error.\n<obj> = args.<name>                                         # Returns `<type>(<arg>)`.\n```\n* **Use `'help=<str>'` to set argument description that is used by `'-h'`.**\n* **Use `'default=<obj>'` to set option's or argument's default value.**\n\n\nOpen\n----\n**Opens a file and returns the corresponding file object.**\n\n```python\n<file> = open(<path>, mode='r', encoding=None, newline=None)\n```\n* **`'encoding=None'` means that a default encoding is used, which is platform dependent. Best practice is to use `'encoding=\"utf-8\"'` until it becomes the default (Python 3.15).**\n* **`'newline=None'` means that all different end of line combinations are converted to '\\n' on read, while on write all '\\n' characters are converted to the system's default separator.**\n* **`'newline=\"\"'` means no conversions take place, but input is still broken into chunks by readline() on every '\\n', '\\r' and '\\r\\n'. Passing `'newline=\"\\n\"'` breaks input only on '\\n'.**\n* **`'newline=\"\\r\\n\"'` breaks input only on '\\r\\n' and converts every '\\n' to '\\r\\n' on write.**\n\n### Modes\n* **`'r'`  - Reads text from the file (the default option).**\n* **`'w'`  - Writes to the file. Deletes existing contents.**\n* **`'x'`  - Writes or raises FileExistsError if file exists.**\n* **`'a'`  - Appends. Creates new file if it doesn't exist.**\n* **`'w+'` - Reads and writes. Deletes existing contents.**\n* **`'r+'` - Reads and writes from the start of the file.**\n* **`'a+'` - Reads and writes from the end of the file.**\n* **`'rb'` - Reads [bytes objects](#bytes). Also `'wb'`, `'xb'`, etc.**\n\n### Exceptions\n* **`'FileNotFoundError'` can be raised when reading with `'r'` or `'r+'`.**\n* **`'FileExistsError'` exception can be raised when writing with `'x'`.**\n* **`'IsADirectoryError'`, `'PermissionError'` can be raised by any.**\n* **`'except OSError [as <name>]: …'` catches all listed exceptions.**\n\n### File Object\n```python\n<file>.seek(0)                      # Moves current position to the file's start.\n<file>.seek(offset)                 # Moves 'offset' chars/bytes from the start.\n<file>.seek(0, 2)                   # Moves current position to the end of file.\n<bin_file>.seek(±offset, origin)    # Origin: 0 start, 1 current position, 2 end.\n```\n\n```python\n<str/bytes> = <file>.read(size=-1)  # Reads 'size' chars/bytes or until the EOF.\n<str/bytes> = <file>.readline()     # Returns a line or empty string/bytes on EOF.\n<list>      = <file>.readlines()    # Returns remaining lines. Also list(<file>).\n<str/bytes> = next(<file>)          # Returns a line using the read-ahead buffer.\n```\n\n```python\n<file>.write(<str/bytes>)           # Writes str or bytes object to write buffer.\n<file>.writelines(<collection>)     # Writes a coll. of strings or bytes objects.\n<file>.flush()                      # Flushes write buff. Runs every 4096/8192 B.\n<file>.close()                      # Closes a file after flushing write buffer.\n```\n* **Methods do not add or strip trailing newlines, not even writelines().**\n\n### Read Text from File\n```python\ndef read_file(filename):\n    with open(filename, encoding='utf-8') as file:\n        return file.readlines()\n```\n\n### Write Text to File\n```python\ndef write_to_file(filename, text):\n    with open(filename, 'w', encoding='utf-8') as file:\n        file.write(text)\n```\n\n\nPaths\n-----\n```python\nimport os, glob\nfrom pathlib import Path\n```\n\n```python\n<str>  = os.getcwd()                # Returns working dir. Starts as shell's `$PWD`.\n<str>  = os.path.join(<path>, ...)  # Uses `os.sep` to join strings or Path objects.\n<str>  = os.path.realpath(<path>)   # Resolves symlinks and calls os.path.abspath().\n```\n\n```python\n<str>  = os.path.basename(<path>)   # Returns final component (filename or dirname).\n<str>  = os.path.dirname(<path>)    # Returns the path without its final component.\n<tup.> = os.path.splitext(<path>)   # Splits on last period of the final component.\n```\n\n```python\n<list> = os.listdir(path='.')       # Returns all file/dir names located at 'path'.\n<list> = glob.glob('<pattern>')     # Returns paths matching the wildcard pattern.\n```\n\n```python\n<bool> = os.path.exists(<path>)     # Checks if path exists. Also <Path>.exists().\n<bool> = os.path.isfile(<path>)     # Also <Path>.is_file(), <DirEntry>.is_file().\n<bool> = os.path.isdir(<path>)      # Also <Path>.is_dir() and <DirEntry>.is_dir().\n```\n\n```python\n<stat> = os.stat(<path>)            # A status object. Also <Path/DirEntry>.stat().\n<num>  = <stat>.st_size/st_mtime/…  # Returns size in bytes, modification time, ...\n```\n\n### DirEntry\n**Unlike listdir(), scandir() returns DirEntry objects that cache isfile, isdir, and on Windows also stat information, thus significantly increasing the performance of code that requires it.**\n\n```python\n<iter> = os.scandir(path='.')       # Returns DirEntry objects located at the path.\n<str>  = <DirEntry>.path            # Is absolute if 'path' argument was absolute.\n<str>  = <DirEntry>.name            # Returns the path's final component as string.\n<file> = open(<DirEntry>)           # Opens the file and returns its file object.\n```\n\n### Path Object\n```python\n<Path> = Path(<path> [, ...])       # Accepts strings, Paths, and DirEntry objects.\n<Path> = <path> / <path> [/ ...]    # First or second object must be a Path object.\n<Path> = <Path>.resolve()           # Returns absolute path with resolved symlinks.\n```\n\n```python\n<Path> = Path()                     # Returns current working dir. Also Path('.').\n<Path> = Path.cwd()                 # Returns absolute CWD. Also Path().resolve().\n<Path> = Path.home()                # Returns the user's absolute home directory.\n<Path> = Path(__file__).resolve()   # Returns module's path if CWD wasn't changed.\n```\n\n```python\n<Path> = <Path>.parent              # Returns the path without its final component.\n<str>  = <Path>.name                # Returns final component (i.e. file/dirname).\n<str>  = <Path>.suffix              # Returns the name's last extension with a dot.\n<str>  = <Path>.stem                # Returns the name without its last extension.\n<tup.> = <Path>.parts               # Starts with '/' or 'C:\\' if path is absolute.\n```\n\n```python\n<iter> = <Path>.iterdir()           # Returns directory contents as Path objects.\n<iter> = <Path>.glob('<pattern>')   # Returns Paths matching the wildcard pattern.\n```\n\n```python\n<str>  = str(<Path>)                # Returns path as string. Also <Path>.as_uri().\n<file> = open(<Path>)               # Also <Path>.read_text/write_bytes/…(<args>).\n```\n\n\nOS Commands\n-----------\n```python\nimport os, shutil\n```\n\n```python\nos.chdir(<path>)                 # Changes the current working directory (or CWD).\nos.mkdir(<path>, mode=0o777)     # Creates a directory. Permissions are in octal.\nos.makedirs(<path>, mode=0o777)  # Creates all path's dirs. Also `exist_ok=False`.\n```\n\n```python\nshutil.copy(from, to)            # Copies the file ('to' can exist or be a dir).\nshutil.copy2(from, to)           # Also copies the creation and modification time.\nshutil.copytree(from, to)        # Copies the directory ('to' should not exist).\n```\n\n```python\nos.rename(from, to)              # Renames or moves the file or directory 'from'.\nos.replace(from, to)             # Same, but overwrites file 'to' even on Windows.\nshutil.move(from, to)            # `rename()` that moves into 'to' if it's a dir.\n```\n\n```python\nos.remove(<path>)                # Deletes file. Also `$ pip3 install send2trash`.\nos.rmdir(<path>)                 # Deletes empty dir. Raises OSError if it's not.\nshutil.rmtree(<path>)            # Deletes the directory and all of its contents.\n```\n* **Passed paths can be either strings, Path objects, or DirEntry objects.**\n* **Functions report errors by raising OSError or one of its [subclasses](#exceptions-1).**\n\n\nShell Commands\n--------------\n```python\nimport os, subprocess, shlex\n```\n\n```python\n<int>  = os.system('<commands>')      # Runs commands in sh/cmd shell. Prints results.\n<proc> = subprocess.run('<command>')  # For arguments see examples. Prints by default.\n<pipe> = os.popen('<commands>')       # Prints only stderr. Soft deprecated since 3.14.\n<str>  = <pipe>.read(size=-1)         # Returns combined stdout. Provides readline/s().\n<int>  = <pipe>.close()               # Returns None if last command had returncode 0.\n```\n\n#### Sends \"1 + 1\" to the basic calculator and captures its stdout and stderr streams:\n```python\n>>> subprocess.run('bc', input='1 + 1\\n', capture_output=True, text=True)\nCompletedProcess(args='bc', returncode=0, stdout='2\\n', stderr='')\n```\n\n#### Sends test.in to the 'bc' running in standard mode and saves its stdout to test.out:\n```python\n>>> if os.system('echo 1 + 1 > test.in') == 0:\n...     with open('test.in') as file_in, open('test.out', 'w') as file_out:\n...         subprocess.run(shlex.split('bc -s'), stdin=file_in, stdout=file_out)\n...     print(open('test.out').read())\n2\n```\n\n\nJSON\n----\n```python\nimport json\n<str>  = json.dumps(<list/dict>)  # Converts collection to JSON string.\n<coll> = json.loads(<str>)        # Converts JSON string to collection.\n```\n\n### Read Collection from JSON File\n```python\ndef read_json_file(filename):\n    with open(filename, encoding='utf-8') as file:\n        return json.load(file)\n```\n\n### Write Collection to JSON File\n```python\ndef write_to_json_file(filename, collection):\n    with open(filename, 'w', encoding='utf-8') as file:\n        json.dump(collection, file, ensure_ascii=False, indent=2)\n```\n\n\nPickle\n------\n```python\nimport pickle\n<bytes>  = pickle.dumps(<object>)  # Converts object to bytes object.\n<object> = pickle.loads(<bytes>)   # Converts bytes object to object.\n```\n\n### Read Object from Pickle File\n```python\ndef read_pickle_file(filename):\n    with open(filename, 'rb') as file:\n        return pickle.load(file)\n```\n\n### Write Object to Pickle File\n```python\ndef write_to_pickle_file(filename, an_object):\n    with open(filename, 'wb') as file:\n        pickle.dump(an_object, file)\n```\n\n\nCSV\n---\n**Text file format for storing spreadsheets.**\n\n```python\nimport csv\n```\n\n```python\n<file>   = open(<path>, newline='')               # Opens the text file for reading.\n<reader> = csv.reader(<file>, dialect='excel')    # Also `delimiter=','`. See Params.\n<list>   = next(<reader>)                         # Returns a row as list of strings.\n<list>   = list(<reader>)                         # Returns a list of remaining rows.\n```\n* **Without the `'newline=\"\"'` argument, every '\\r\\n' sequence that is embedded inside a quoted field will get converted to '\\n'. For details about the newline argument see [Open](#open).**\n* **To nicely print the spreadsheet to the console use either [Tabulate](#table) or PrettyTable library.**\n* **For XML and binary Excel files (with extensions xlsx, xlsm and xlsb) use [Pandas](#file-formats) library.**\n* **Reader can consume any iterator or collection of strings, not just text files.**\n\n### Write\n```python\n<file>   = open(<path>, mode='a', newline='')     # Opens the text file for writing.\n<writer> = csv.writer(<file>, dialect='excel')    # Also `delimiter=','`. See Params.\n<writer>.writerow(<collection>)                   # Encodes objects using str(<obj>).\n<writer>.writerows(<coll_of_coll>)                # Appends rows to the opened file.\n```\n* **If file is opened without the `'newline=\"\"'` argument, '\\r' will be added in front of every '\\n' on platforms that use '\\r\\n' line endings. I.e., newlines may get doubled on Windows.**\n* **Open existing file with `'mode=\"a\"'` to append to it or `'mode=\"w\"'` to overwrite it.**\n\n### Parameters\n* **`'dialect'` - Master parameter that sets the default values. String or a _csv.Dialect_ object.**\n* **`'delimiter'` - A one-character string that separates fields. Comma, tab, semicolon, etc.**\n* **`'lineterminator'` - Sets how writer terminates rows. Reader looks for '\\n', '\\r' and '\\r\\n'.**\n* **`'quotechar'` - Character for quoting fields containing delimiters, quotechars, '\\n' or '\\r'.**\n* **`'escapechar'` - Character for escaping quotechars. Can be None if doublequote is True.**\n* **`'doublequote'` - Whether quotechars inside fields are/get doubled (instead of escaped).**\n* **`'quoting'` - 0: As necessary, 1: All, 2: All but numbers which are read as floats, 3: None.**\n* **`'skipinitialspace'` - Is space character at the start of the field stripped by the reader.**\n\n### Dialects\n```text\n+------------------+--------------+--------------+--------------+\n|                  |     excel    |   excel-tab  |     unix     |\n+------------------+--------------+--------------+--------------+\n| delimiter        |       ','    |      '\\t'    |       ','    |\n| lineterminator   |    '\\r\\n'    |    '\\r\\n'    |      '\\n'    |\n| quotechar        |       '\"'    |       '\"'    |       '\"'    |\n| escapechar       |      None    |      None    |      None    |\n| doublequote      |      True    |      True    |      True    |\n| quoting          |         0    |         0    |         1    |\n| skipinitialspace |     False    |     False    |     False    |\n+------------------+--------------+--------------+--------------+\n```\n\n### Read Rows from CSV File\n```python\ndef read_csv_file(filename, **csv_params):\n    with open(filename, encoding='utf-8', newline='') as file:\n        return list(csv.reader(file, **csv_params))\n```\n\n### Write Rows to CSV File\n```python\ndef write_to_csv_file(filename, rows, mode='w', **csv_params):\n    with open(filename, mode, encoding='utf-8', newline='') as file:\n        writer = csv.writer(file, **csv_params)\n        writer.writerows(rows)\n```\n\n\nSQLite\n------\n**A server-less database engine that stores each database into its own file.**\n\n```python\nimport sqlite3\n<con> = sqlite3.connect(<path>)             # Opens existing or new file. Also ':memory:'.\n<con>.close()                               # Closes connection. Discards uncommitted data.\n```\n\n### Read\n```python\n<cursor> = <con>.execute('SELECT …')        # Can raise a subclass of the `sqlite3.Error`.\n<tuple>  = <cursor>.fetchone()              # Returns the next row. Also next(<cursor>).\n<list>   = <cursor>.fetchall()              # Returns remaining rows. Also list(<cursor>).\n```\n\n### Write\n```python\n<con>.execute('INSERT …')                   # Can raise a subclass of the `sqlite3.Error`.\n<con>.commit()                              # Saves all the changes since the last commit.\n<con>.rollback()                            # Discards all changes since the last commit.\n```\n\n#### Or:\n```python\nwith <con>:                                 # Exits the block with commit() or rollback(),\n    <con>.execute('INSERT …')               # depending on whether any exception occurred.\n```\n\n### Placeholders\n```python\n<con>.execute('<sql>', <list/tuple>)        # Replaces every question mark with its item.\n<con>.execute('<sql>', <dict/namedtuple>)   # Replaces every :<key> with a matching value.\n<con>.executemany('<sql>', <coll_of_coll>)  # Executes statement once for each collection.\n```\n* **Accepts strings, ints, floats, bytes, None objects, and bools (stored as 1 or 0).**\n* **Columns are not restricted to any type unless table is declared as strict.**\n\n### Example\n**Values are not actually saved in this example because `'con.commit()'` is omitted!**\n```python\n>>> con = sqlite3.connect('test.db')\n>>> con.execute('CREATE TABLE person (name TEXT, height INTEGER) STRICT')\n>>> con.execute('INSERT INTO person VALUES (?, ?)', ('Jean-Luc', 187))\n>>> con.execute('SELECT rowid, * FROM person').fetchall()\n[(1, 'Jean-Luc', 187)]\n```\n\n### SQLAlchemy\n**Library for interacting with various DB systems via SQL, [method chaining](https://docs.sqlalchemy.org/en/latest/tutorial/data_select.html#the-select-sql-expression-construct) or [ORM](https://docs.sqlalchemy.org/en/latest/orm/quickstart.html#simple-select).**\n```python\n# $ pip3 install sqlalchemy\nfrom sqlalchemy import create_engine, text\n<engine> = create_engine('<url>')           # Url: 'dialect://user:password@host/dbname'.\n<con>    = <engine>.connect()               # Creates new connection. Also <con>.close().\n<cursor> = <con>.execute(text('<sql>'))     # Pass a dict to replace :<key> placeholders.\nwith <con>.begin(): ...                     # Exits the block with a commit or rollback.\n```\n\n```text\n+-----------------+--------------+----------------------------------+\n| Dialect         | pip3 install |           Dependencies           |\n+-----------------+--------------+----------------------------------+\n| mysql           | mysqlclient  | www.pypi.org/project/mysqlclient |\n| postgresql      | psycopg2     | www.pypi.org/project/psycopg2    |\n| mssql           | pyodbc       | www.pypi.org/project/pyodbc      |\n| oracle+oracledb | oracledb     | www.pypi.org/project/oracledb    |\n+-----------------+--------------+----------------------------------+\n```\n\n\nBytes\n-----\n**An immutable sequence of single bytes. Mutable version is called bytearray.**\n\n```python\n<bytes> = b'<str>'                       # Accepts ASCII characters and \\x00 to \\xff.\n<int>   = <bytes>[index]                 # Returns the byte as int between 0 and 255.\n<bytes> = <bytes>[<slice>]               # Returns bytes even if it has one element.\n<bytes> = <bytes>.join(<coll_of_bytes>)  # Joins elements using bytes as a separator.\n```\n\n### Encode\n```python\n<bytes> = bytes(<coll_of_ints>)          # Passed integers must be between 0 and 255.\n<bytes> = bytes(<str>, 'utf-8')          # Encodes the string. Same as <str>.encode().\n<bytes> = bytes.fromhex('<hex>')         # Hex pairs can be separated by whitespaces.\n<bytes> = <int>.to_bytes(n_bytes)        # Accepts `byteorder='little', signed=True`.\n```\n\n### Decode\n```python\n<list>  = list(<bytes>)                  # Returns a list of ints between 0 and 255.\n<str>   = str(<bytes>, 'utf-8')          # Returns a string. Same as <bytes>.decode().\n<str>   = <bytes>.hex()                  # Returns hex pairs separated by `sep=<str>`.\n<int>   = int.from_bytes(<bytes>)        # Accepts `byteorder='little', signed=True`.\n```\n\n\n### Read Bytes from File\n```python\ndef read_bytes(filename):\n    with open(filename, 'rb') as file:\n        return file.read()\n```\n\n### Write Bytes to File\n```python\ndef write_bytes(filename, bytes_obj):\n    with open(filename, 'wb') as file:\n        file.write(bytes_obj)\n```\n\n\nStruct\n------\n* **Module that performs conversions between a sequence of numbers and a bytes object.**\n* **System’s type sizes, byte order, and alignment rules are used by default.**\n\n```python\nfrom struct import pack, unpack\n\n<bytes> = pack('<format>', <num_1>, ...)  # Packs numbers according to format.\n<tuple> = unpack('<format>', <bytes>)     # Use `iter_unpack()` to get tuples.\n```\n\n```python\n>>> pack('>hhl', 1, 2, 3)\nb'\\x00\\x01\\x00\\x02\\x00\\x00\\x00\\x03'\n>>> unpack('bhh', b'\\x01\\x00\\x02\\x00\\x03\\x00')\n(1, 2, 3)\n```\n\n### Format\n#### For standard type sizes and manual alignment (padding) start format string with:\n* **`'='` - System's byte order (usually little-endian).**\n* **`'<'` - Little-endian (i.e. least significant byte first).**\n* **`'>'` - Big-endian (also `'!'`).**\n\n#### Besides numbers, pack() and unpack() also support bytes objects as a part of the sequence:\n* **`'c'` - A bytes object with a single element. For pad byte use `'x'`.**\n* **`'<n>s'` - A bytes object with n elements (not effected by byte order).**\n\n#### Integers. Use capital letter for unsigned type. Minimum/standard sizes are in brackets:\n* **`'b'` - char (1/1)**\n* **`'h'` - short (2/2)**\n* **`'i'` - int (2/4)**\n* **`'l'` - long (4/4)**\n* **`'q'` - long long (8/8)**\n\n#### Floating point types (struct always uses standard sizes):\n* **`'f'` - float (4/4)**\n* **`'d'` - double (8/8)**\n\n\nArray\n-----\n**List that can only hold numbers that fit into the passed C type. Available types and their min&shy;imum sizes in bytes are listed above. Type sizes and byte order are always determined by the system, how&shy;ever bytes of each element can be reversed (by calling the byteswap() method).**\n\n```python\nfrom array import array\n```\n\n```python\n<array> = array('<typecode>' [, <coll>])  # Creates array. Accepts collection of numbers.\n<array> = array('<typecode>', <bytes>)    # Copies passed bytes into the array's memory.\n<array> = array('<typecode>', <array>)    # Treats passed array as a sequence of numbers.\n<array>.fromfile(<file>, n_items)         # Appends file contents to the array's memory.\n```\n\n```python\n<bytes> = bytes(<array>)                  # Returns copy of the memory as a bytes object.\n<file>.write(<array>)                     # Appends the array's memory to a binary file.\n```\n\n\nMemory View\n-----------\n**A sequence object that points to the memory of another bytes-like object. Each element can reference a single or multiple consecutive bytes, depending on format. Order and number of elements can be changed with slicing.**\n\n```python\n<mview> = memoryview(<bytes/array>)       # Returns mutable memoryview if array is passed.\n<obj>   = <mview>[index]                  # Returns an int/float. Bytes if format is 'c'.\n<mview> = <mview>[<slice>]                # Returns a memoryview with rearranged elements.\n<mview> = <mview>.cast('<typecode>')      # Only works between B/b/c and the other types.\n<mview>.release()                         # Releases the memory buffer of the base object.\n```\n\n```python\n<bytes> = bytes(<mview>)                  # Returns a new bytes object. Also bytearray().\n<bytes> = <bytes>.join(<coll_of_mviews>)  # Joins memoryviews using bytes as a separator.\n<array> = array('<typecode>', <mview>)    # Treats passed mview as a sequence of numbers.\n<file>.write(<mview>)                     # Appends `bytes(<mview>)` to the binary file.\n```\n\n```python\n<list>  = list(<mview>)                   # Returns list of ints, floats or bytes objects.\n<str>   = str(<mview>, 'utf-8')           # Treats passed memoryview as `bytes(<mview>)`.\n<str>   = <mview>.hex()                   # Returns hex pairs separated with `sep=<str>`.\n```\n\n\nDeque\n-----\n**List with efficient appends and pops from either side.**\n\n```python\nfrom collections import deque\n```\n\n```python\n<deque> = deque(<collection>)     # Pass `maxlen=<int>` to set the size limit.\n<deque>.appendleft(<el>)          # Drops last element if maxlen is exceeded.\n<deque>.extendleft(<collection>)  # Prepends reversed collection to the deque.\n<deque>.rotate(n=1)               # Moves last element to the start of deque.\n<el> = <deque>.popleft()          # Removes and returns deque's first element.\n```\n\n\nOperator\n--------\n**Module of functions that provide the functionality of operators. Functions are grouped by operator precedence, from least to most binding. Functions and operators in first, third and fifth line are also ordered by precedence within a line.**\n```python\nimport operator as op\n```\n\n```python\n<bool> = op.not_(<obj>)                                      # or, and, not (or/and missing).\n<bool> = op.eq/ne/lt/ge/is_/is_not/contains(<obj>, <obj>)    # ==, !=, <, >=, is, is not, in.\n<obj>  = op.or_/xor/and_(<int/set>, <int/set>)               # |, ^, & (sorted by precedence).\n<int>  = op.lshift/rshift(<int>, <int>)                      # <<, >> (i.e. <int> << n_bits).\n<obj>  = op.add/sub/mul/truediv/floordiv/mod(<obj>, <obj>)   # +, -, *, /, //, % (two groups).\n<num>  = op.neg/invert(<num>)                                # -, ~ (negate and bitwise not).\n<num>  = op.pow(<num>, <num>)                                # ** (pow() accepts 3 arguments).\n<func> = op.itemgetter/attrgetter/methodcaller(<obj> [, …])  # [index/key], .name, .name([…]).\n```\n\n```python\nelementwise_sum  = map(op.add, list_a, list_b)\nsorted_by_second = sorted(<coll>, key=op.itemgetter(1))\nsorted_by_both   = sorted(<coll>, key=op.itemgetter(1, 0))\nfirst_element    = op.methodcaller('pop', 0)(<list>)\n```\n* **Most operators call the object's special method that is named after them (second object is passed as an argument), while logical operators call their own code that relies on bool().**\n* **`'and/or'` can't be emulated by a function because they might not evaluate all operands.**\n* **Comparisons can be chained: `'x < y < z'` gets converted to `'(x < y) and (y < z)'`.**\n\n\nMatch Statement\n---------------\n**Executes the first block with matching pattern.**\n\n```python\nmatch <object/expression>:\n    case <pattern> [if <condition>]:\n        <code>\n    ...\n```\n\n### Patterns\n```python\n<value_pattern> = 1/'abc'/True/None/math.pi        # Matches the literal or attribute's value.\n<class_pattern> = <type>()                         # Matches any object of that type (or ABC).\n<wildcard_patt> = _                                # Matches any object. Useful in last case.\n<capture_patt>  = <name>                           # Matches any object and binds it to name.\n<as_pattern>    = <pattern> as <name>              # Binds match to name. Also <type>(<name>).\n<or_pattern>    = <pattern> | <pattern> [| ...]    # Matches if any of listed patterns match.\n<sequence_patt> = [<pattern>, ...]                 # Matches a sequence. All items must match.\n<mapping_patt>  = {<value_pattern>: <patt>, ...}   # Matches a dict if it has matching items.\n<class_pattern> = <type>(<attr_name>=<patt>, ...)  # Matches object with matching attributes.\n```\n* **The sequence pattern can also be written as a tuple, either with or without the brackets.**\n* **Use `'*<name>'` and `'**<name>'` in sequence/mapping patterns to bind remaining items.**\n* **Patterns can be surrounded with brackets to override their precedence: `'|'` > `'as'` > `','`. For example, `'[1, 2]'` is matched by expression `'case 1|2, 2|3 as y if y == 2:'`.**\n* **All names that are bound in the matching case, as well as variables initialized in its body, are visible after the match statement (only function block delimits scope).**\n\n### Example\n```python\n>>> from pathlib import Path\n>>> match Path('/home/ken/python-cheatsheet/README.md'):\n...     case Path(\n...         parts=['/', 'home', user, *_]\n...     ) as p if p.name.lower().startswith('readme') and p.is_file():\n...         print(f'{p.name} is a readme file that belongs to user {user}.')\nREADME.md is a readme file that belongs to user ken.\n```\n\n\nLogging\n-------\n```python\nimport logging as log\n```\n\n```python\nlog.basicConfig(filename=<path>, level='WARNING')  # Configures the root logger (see Setup).\nlog.debug/info/warning/error/critical(<str>)       # Sends passed message to the root logger.\n<Logger> = log.getLogger(__name__)                 # Returns a logger named after the module.\n<Logger>.<level>(<str>)                            # Sends the message. Same levels as above.\n<Logger>.exception(<str>)                          # `error()` that appends caught exception.\n```\n\n### Setup\n```python\nlog.basicConfig(\n    filename=None,                                 # Prints to stderr when filename is None.\n    filemode='a',                                  # Use mode 'w' to overwrite existing file.\n    format='%(levelname)s:%(name)s:%(message)s',   # Using '%(asctime)s' adds local datetime.\n    level=log.WARNING,                             # Drops messages that have lower priority.\n    handlers=[log.StreamHandler(sys.stderr)]       # Uses FileHandler when 'filename' is set.\n)\n```\n\n```python\n<Formatter> = log.Formatter('<format>')            # Formats messages using the format str.\n<Handler> = log.FileHandler(<path>, mode='a')      # Appends to file. Also `encoding=None`.\n<Handler>.setFormatter(<Formatter>)                # Only outputs bare messages by default.\n<Handler>.setLevel(<str/int>)                      # Prints/saves every message by default.\n<Logger>.addHandler(<Handler>)                     # Loggers can have more than one handler.\n<Logger>.setLevel(<str/int>)                       # What's sent to its/ancestors' handlers.\n<Logger>.propagate = <bool>                        # Cuts off ancestors' handlers if False.\n```\n* **Parent logger can be specified by naming the child logger `'<parent_name>.<name>'`.**\n* **Logger will inherit the level from its parent if you don't set it via the setLevel() method.**\n* **Format string can contain: pathname, filename, funcName, lineno, thread and process.**\n* **RotatingFileHandler rotates files according to 'maxBytes' and 'backupCount' arguments.**\n* **An object with `'filter(<LogRecord>)'` method (or the method itself) can be added to loggers and handlers via addFilter(). Message is dropped if filter() returns a false value.**\n* **Logging messages generated by libraries are passed to the root's handlers. Level of the library's logger can be set with `'log.getLogger(\"<library>\").setLevel(<str>)'`.**\n\n#### Logger that writes messages to a file and sends them to the root's handler that prints warnings or higher:\n```python\n>>> logger = log.getLogger('my_module')\n>>> handler = log.FileHandler('test.log', encoding='utf-8')\n>>> format_str = '%(asctime)s %(levelname)s:%(name)s:%(message)s'\n>>> handler.setFormatter(log.Formatter(format_str))\n>>> logger.addHandler(handler)\n>>> logger.setLevel('DEBUG')\n>>> log.basicConfig()\n>>> roots_handler = log.root.handlers[0]\n>>> roots_handler.setLevel('WARNING')\n>>> logger.critical('Missing config file.')\nCRITICAL:my_module:Missing config file.\n>>> print(open('test.log').read())\n2023-02-07 23:21:01,430 CRITICAL:my_module:Missing config file.\n```\n\n\nIntrospection\n-------------\n```python\n<list> = dir()                     # Local names of objects (including functions and classes).\n<dict> = vars()                    # Dict of local names and their objects. Same as locals().\n<dict> = globals()                 # Dict of global names and their objects, e.g. __builtin__.\n```\n\n```python\n<list> = dir(<obj>)                # Returns names of object's attributes (including methods).\n<dict> = vars(<obj>)               # Returns dict of writable attributes. Also <obj>.__dict__.\n<bool> = hasattr(<obj>, '<name>')  # Checks if object possesses attribute of the passed name.\nvalue  = getattr(<obj>, '<name>')  # Returns the object's attribute or raises AttributeError.\nsetattr(<obj>, '<name>', value)    # Sets attribute. Only works on objects with __dict__ attr.\ndelattr(<obj>, '<name>')           # Deletes attribute from __dict__. Also `del <obj>.<name>`.\n```\n\n\nThreading\n---------\n**CPython interpreter can only run a single thread at a time. Using multiple threads won't result in a faster execution, unless at least one of the threads contains an I/O operation.**\n```python\nfrom threading import Thread, Lock, RLock, Semaphore, Event, Barrier\nfrom concurrent.futures import ThreadPoolExecutor, as_completed\n```\n\n### Thread\n```python\n<Thread> = Thread(target=<function>)          # Use `args=<coll>` to set function's arguments.\n<Thread>.start()                              # Runs function in background. Also is_alive().\n<Thread>.join()                               # Waits until the function finishes executing.\n```\n* **Use `'kwargs=<dict>'` to pass keyword arguments to the function, i.e. thread.**\n* **Use `'daemon=True'`, or the program won't be able to exit while the thread is alive.**\n\n### Lock\n```python\n<lock> = Lock/RLock()                         # RLock can only be released by acquirer thread.\n<lock>.acquire()                              # Blocks (waits) until lock becomes available.\n<lock>.release()                              # Releases the lock so it can be acquired again.\n```\n\n#### Or:\n```python\nwith <lock>:                                  # Enters the block by calling method acquire().\n    ...                                       # Exits it by calling release(), even on error.\n```\n\n### Semaphore, Event, Barrier\n```python\n<Semaphore> = Semaphore(value=1)              # Lock that can be acquired by 'value' threads.\n<Event>     = Event()                         # Method wait() blocks until set() is called.\n<Barrier>   = Barrier(<int>)                  # `wait()` blocks until it's called int times.\n```\n\n### Queue\n```python\n<Queue> = queue.Queue(maxsize=0)              # A first-in-first-out queue. It's thread safe.\n<Queue>.put(<obj>)                            # The call blocks until queue stops being full.\n<Queue>.put_nowait(<obj>)                     # Raises queue.Full exception if queue is full.\n<obj> = <Queue>.get()                         # The call blocks until queue stops being empty.\n<obj> = <Queue>.get_nowait()                  # Raises queue.Empty exception if it is empty.\n```\n\n### Thread Pool Executor\n```python\n<Exec> = ThreadPoolExec…(max_workers=None)    # Also `with ThreadPoolExecutor() as <name>: …`.\n<iter> = <Exec>.map(<func>, <args_1>, ...)    # Multithreaded and non-lazy map(). Keeps order.\n<Futr> = <Exec>.submit(<func>, <arg_1>, ...)  # Creates a thread and queues it for execution.\n<Exec>.shutdown()                             # Waits for all the threads to finish executing.\n```\n\n```python\n<bool> = <Future>.done()                      # Checks if the thread has finished executing.\n<obj>  = <Future>.result(timeout=None)        # Raises TimeoutError after 'timeout' seconds.\n<bool> = <Future>.cancel()                    # Just returns False if it is running/finished.\n<iter> = as_completed(<coll_of_Futures>)      # `next(<iter>)` returns next completed Future.\n```\n* **Map() and as\\_completed() also accept 'timeout' arg. It causes _futures.TimeoutError_ when next() is called or blocking. Map() times from original call and as_completed() from first call to next(). As\\_completed() fails if next() is called too late, even if all threads are done.**\n* **Exceptions that happen inside threads are raised when map's next() or Future's result() method is called. Future's exception() method returns caught exception object or None.**\n* **ProcessPoolExecutor provides true parallelism but: everything sent to and from workers must be [pickable](#pickle), queues must be sent using executor's 'initargs' and 'initializer' param&shy;eters, and executor should only be reachable via `'if __name__ == \"__main__\": …'`.**\n\n\nAsyncio\n-------\n* **Coroutines have a lot in common with threads, but unlike threads, they only give up control when they call another coroutine and they don’t consume as much memory.**\n* **Coroutine definition starts with `'async'` keyword and its call with `'await'` keyword.**\n* **Execute `'asyncio.run(<coroutine>)'` to start running the first/main coroutine.**\n\n```python\nimport asyncio as aio\n```\n\n```python\n<coro> = <async_function>(<args>)          # Creates a coroutine by calling async def function.\n<obj>  = await <coroutine>                 # Starts the coroutine. Returns its result or None.\n<task> = aio.create_task(<coroutine>)      # Schedules it for execution. Always keep the task.\n<obj>  = await <task>                      # Returns coroutine's result. Also <task>.cancel().\n```\n\n```python\n<coro> = aio.gather(<coro/task>, ...)      # Schedules coros. Returns list of results on await.\n<coro> = aio.wait(<tasks>, return_when=…)  # `'ALL/FIRST_COMPLETED'`. Returns (done, pending).\n<iter> = aio.as_completed(<coros/tasks>)   # Calling `await next(<iter>)` returns next result.\n```\n\n#### Runs a terminal game where you control an asterisk that must avoid numbers:\n```python\nimport asyncio, collections, curses, curses.textpad, enum, random\n\nP = collections.namedtuple('P', 'x y')     # Position (x and y coordinates).\nD = enum.Enum('D', 'n e s w')              # Direction (north, east, etc.).\nW, H = 15, 7                               # Width and height of the field.\n\ndef main(screen):\n    curses.curs_set(0)                     # Makes the cursor invisible.\n    screen.nodelay(True)                   # Makes getch() non-blocking.\n    asyncio.run(main_coroutine(screen))    # Starts running asyncio code.\n\nasync def main_coroutine(screen):\n    moves = asyncio.Queue()\n    state = {'*': P(0, 0)} | dict.fromkeys(range(10), P(W//2, H//2))\n    ai    = [random_controller(id_, moves) for id_ in range(10)]\n    mvc   = [controller(screen, moves), model(moves, state), view(state, screen)]\n    tasks = [asyncio.create_task(coro) for coro in ai + mvc]\n    await asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED)\n\nasync def random_controller(id_, moves):\n    while True:\n        d = random.choice(list(D))\n        moves.put_nowait((id_, d))\n        await asyncio.sleep(random.triangular(0.01, 0.65))\n\nasync def controller(screen, moves):\n    while True:\n        key_mappings = {258: D.s, 259: D.n, 260: D.w, 261: D.e}\n        if d := key_mappings.get(screen.getch()):\n            moves.put_nowait(('*', d))\n        await asyncio.sleep(0.005)\n\nasync def model(moves, state):\n    while state['*'] not in (state[id_] for id_ in range(10)):\n        id_, d = await moves.get()\n        deltas = {D.n: P(0, -1), D.e: P(1, 0), D.s: P(0, 1), D.w: P(-1, 0)}\n        state[id_] = P((state[id_].x + deltas[d].x) % W, (state[id_].y + deltas[d].y) % H)\n\nasync def view(state, screen):\n    offset = P(curses.COLS//2 - W//2, curses.LINES//2 - H//2)\n    while True:\n        screen.erase()\n        curses.textpad.rectangle(screen, offset.y-1, offset.x-1, offset.y+H, offset.x+W)\n        for id_, p in state.items():\n            screen.addstr(offset.y + (p.y - state['*'].y + H//2) % H,\n                          offset.x + (p.x - state['*'].x + W//2) % W, str(id_))\n        screen.refresh()\n        await asyncio.sleep(0.005)\n\nif __name__ == '__main__':\n    curses.wrapper(main)\n```\n<br>\n\n\nLibraries\n=========\n\nProgress Bar\n------------\n```python\n# $ pip3 install tqdm\n>>> import tqdm, time\n>>> for el in tqdm.tqdm([1, 2, 3], desc='Processing'):\n...     time.sleep(1)\nProcessing: 100%|████████████████████| 3/3 [00:03<00:00,  1.00s/it]\n```\n\n\nPlot\n----\n```python\n# $ pip3 install matplotlib\nimport matplotlib.pyplot as plt\n\nplt.plot/bar/scatter(x_data, y_data, label=None)  # Accepts plt.plot(y_data).\nplt.legend()                                      # Adds a legend of labels.\nplt.title/xlabel/ylabel(<str>)                    # Adds title or axis label.\nplt.show()                                        # Also plt.savefig(<path>).\nplt.clf()                                         # Clears the plot (figure).\n```\n\n\nTable\n-----\n#### Prints a CSV spreadsheet to the console:\n```python\n# $ pip3 install tabulate\nimport csv, tabulate\nwith open('test.csv', encoding='utf-8', newline='') as file:\n    rows = list(csv.reader(file))\nprint(tabulate.tabulate(rows, headers='firstrow'))\n```\n\n\nConsole App\n-----------\n#### Runs a basic file explorer in the console:\n```python\n# $ pip3 install windows-curses\nimport curses, os\nfrom curses import A_REVERSE, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT\n\ndef main(screen):\n    ch, first, selected, paths = 0, 0, 0, os.listdir()\n    while ch != ord('q'):\n        height, width = screen.getmaxyx()\n        screen.erase()\n        for y, filename in enumerate(paths[first : first+height]):\n            color = A_REVERSE if filename == paths[selected] else 0\n            screen.addnstr(y, 0, filename, width-1, color)\n        ch = screen.getch()\n        selected -= (ch == KEY_UP) and (selected > 0)\n        selected += (ch == KEY_DOWN) and (selected < len(paths)-1)\n        first -= (first > selected)\n        first += (first < selected-(height-1))\n        if ch in [KEY_LEFT, KEY_RIGHT, ord('\\n')]:\n            new_dir = '..' if ch == KEY_LEFT else paths[selected]\n            if os.path.isdir(new_dir):\n                os.chdir(new_dir)\n                first, selected, paths = 0, 0, os.listdir()\n\nif __name__ == '__main__':\n    curses.wrapper(main)\n```\n\n\nGUI App\n-------\n#### Runs a desktop app for converting weights from metric units into pounds:\n\n```python\n# $ pip3 install FreeSimpleGUI\nimport FreeSimpleGUI as sg\n\ntext_box = sg.Input(default_text='100', enable_events=True, key='QUANTITY')\ndropdown = sg.InputCombo(['g', 'kg', 't'], 'kg', readonly=True, enable_events=True, k='UNIT')\nlabel = sg.Text('100 kg is 220.462 lbs.', key='OUTPUT')\nwindow = sg.Window('GUI App', [[text_box, dropdown], [label], [sg.Button('Close')]])\n\nwhile True:\n    event, values = window.read()\n    if event in [sg.WIN_CLOSED, 'Close']:\n        break\n    try:\n        quantity = float(values['QUANTITY'])\n    except ValueError:\n        continue\n    unit = values['UNIT']\n    lbs = quantity * {'g': 0.001, 'kg': 1, 't': 1000}[unit] / 0.45359237\n    window['OUTPUT'].update(value=f'{quantity} {unit} is {lbs:g} lbs.')\nwindow.close()\n```\n\n\nScraping\n--------\n#### Scrapes Python's URL and logo from its Wikipedia page:\n```python\n# $ pip3 install requests beautifulsoup4\nimport requests, bs4, os\n\nget = lambda url: requests.get(url, headers={'User-Agent': 'cpc-bot'})\nresponse = get('https://en.wikipedia.org/wiki/Python_(programming_language)')\ndocument = bs4.BeautifulSoup(response.text, 'html.parser')\ntable = document.find('table', class_='infobox vevent')\npython_url = table.find('th', string='Website').next_sibling.a['href']\nlogo_url = table.find('img')['src']\nfilename = os.path.basename(logo_url)\nwith open(filename, 'wb') as file:\n    file.write(get(f'https:{logo_url}').content)\nprint(f'URL: {python_url}, logo: file://{os.path.abspath(filename)}')\n```\n\n### Selenium\n**Library for scraping websites with dynamic content.**\n```python\n# $ pip3 install selenium\nfrom selenium import webdriver\n```\n\n```python\n<Drv> = webdriver.Chrome/Firefox/Safari/Edge()  # Opens the browser. Also <Driver>.quit().\n<Drv>.implicitly_wait(seconds)                  # Sets timeout for find_element/s() methods.\n<Drv>.get('<url>')                              # Blocks until browser fires the load event.\n<str> = <Drv>.page_source                       # Returns HTML of the page's current state.\n<El>  = <Drv/El>.find_element('xpath', <str>)   # Accepts '//<tag>[@<attr_name>=\"<val>\"]…'.\n<str> = <El>.get_attribute('<name>')            # Returns attribute or a property if exists.\n<El>.click/clear()                              # Also <El>.text and <El>.send_keys(<str>).\n```\n\n#### XPath — also available in lxml, Scrapy, and browser's console via `'$x(\"<xpath>\")'`:\n```python\n<xpath>     = //<element>[/ or // <element>]    # E.g. …/child, …//descendant, …/../sibling.\n<xpath>     = //<element>/following::<element>  # Next element. Also preceding::, parent::.\n<element>   = <tag><conditions><index>          # Tag accepts */a/…. Use [1/2/…] for index.\n<condition> = [<sub_cond> [and/or <sub_cond>]]  # Use `not(<sub_cond>)` to negate condition.\n<sub_cond>  = @<attr>[=\"<val>\"]                 # `text()=` and `.=` match (complete) text.\n<sub_cond>  = contains(@<attr>, \"<val>\")        # Is <val> a substring of attribute's value?\n<sub_cond>  = [//]<element>                     # Has matching child? Descendant if //<el>.\n```\n\n\nWeb App\n-------\n**Flask is a micro web framework that also includes a simple WSGI/HTTP server. If you just want to open a HTML file in a web browser use `'webbrowser.open(<path>)'` instead.**\n```python\n# $ pip3 install flask\nimport flask as fl\n```\n\n```python\napp = fl.Flask(__name__)                   # Returns application obj. Put at the top.\napp.run(host=None, port=None, debug=None)  # Also `$ flask --app FILE run --ARG=VAL`.\n```\n* **Starts the app at `'http://localhost:5000'`. Use `'host=\"0.0.0.0\"'` to run externally.**\n* **Install a [WSGI](https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface) server like [Waitress](https://flask.palletsprojects.com/en/latest/deploying/waitress/) and a HTTP server such as [Nginx](https://flask.palletsprojects.com/en/latest/deploying/nginx/) to get better security.**\n* **Debug mode restarts the app whenever script changes and displays errors in the browser.**\n\n### Serving Files\n```python\n@app.route('/img/<path:filename>')\ndef serve_file(filename):\n    return fl.send_from_directory('DIRNAME', filename)\n```\n\n### Serving HTML\n```python\n@app.route('/<sport>')\ndef serve_html(sport):\n    return fl.render_template_string('<h1>{{title}}</h1>', title=sport)\n```\n* **`'fl.render_template(filename, <kwargs>)'` renders a file located in 'templates' dir.**\n* **`'fl.abort(<int>)'` returns error code and `'return fl.redirect(<url>)'` redirects.**\n* **`'fl.request.args[<str>]'` returns parameter from query string (URL part right of '?').**\n* **`'fl.session[<str>] = <obj>'` stores session data and `'fl.session.clear()'` clears it. A session cookie key needs to be set at the startup with `'app.secret_key = <str>'`.**\n\n### Serving JSON\n```python\n@app.post('/<sport>/odds')\ndef serve_json(sport):\n    team = fl.request.form['team']\n    return {'team': team, 'odds': [2.09, 3.74, 3.68]}\n```\n\n#### Starts the app in its own thread and queries its REST API:\n```python\n# $ pip3 install requests\n>>> import threading, requests\n>>> threading.Thread(target=app.run, daemon=True).start()\n>>> url = 'http://localhost:5000/football/odds'\n>>> response = requests.post(url, data={'team': 'arsenal f.c.'})\n>>> response.json()\n{'team': 'arsenal f.c.', 'odds': [2.09, 3.74, 3.68]}\n```\n\n\nProfiling\n---------\n\n```python\nfrom time import perf_counter\nstart_time = perf_counter()\n...\nduration_in_seconds = perf_counter() - start_time\n```\n\n### Timing a Snippet\n```python\n>>> from timeit import timeit\n>>> timeit('list(range(10000))', number=1000, globals=globals(), setup='pass')\n0.19373\n```\n\n### Profiling by Line\n```text\n$ pip3 install line_profiler\n$ echo '@profile\ndef main():\n    a = list(range(10000))\n    b = set(range(10000))\nmain()' > test.py\n$ kernprof -lv test.py\nLine #      Hits         Time  Per Hit   % Time  Line Contents\n==============================================================\n     1                                           @profile\n     2                                           def main():\n     3         1        253.4    253.4     32.2      a = list(range(10000))\n     4         1        534.1    534.1     67.8      b = set(range(10000))\n```\n\n### Call and Flame Graphs\n```bash\n$ apt install graphviz && pip3 install gprof2dot snakeviz  # Or install graphviz.exe.\n$ tail -n +2 test.py > test.tmp && mv test.tmp test.py     # Removes the first line.\n$ python3 -m cProfile -o test.prof test.py                 # Runs a tracing profiler.\n$ gprof2dot -f pstats test.prof | dot -T png -o test.png   # Generates a call graph.\n$ xdg-open test.png                                        # Displays the call graph.\n$ snakeviz test.prof                                       # Displays a flame graph.\n```\n\n### Sampling and Memory Profilers\n```text\n+--------------+------------+-------------------------------+-------+------+\n| pip3 install |   Target   |          How to run           | Lines | Live |\n+--------------+------------+-------------------------------+-------+------+\n| pyinstrument |    CPU     | pyinstrument test.py          |  No   | No   |\n| py-spy       |    CPU     | py-spy top -- python3 test.py |  No   | Yes  |\n| scalene      | CPU+Memory | scalene test.py               |  Yes  | No   |\n| memray       |   Memory   | memray run --live test.py     |  Yes  | Yes  |\n+--------------+------------+-------------------------------+-------+------+\n```\n\n\nNumPy\n-----\n**Array manipulation mini-language. It can run up to one hundred times faster than the equivalent Python code. An even faster alternative that runs on a GPU is called CuPy.**\n\n```python\n# $ pip3 install numpy\nimport numpy as np\n```\n\n```python\n<array> = np.array(<list/list_of_lists/…> [, dtype])  # NumPy array of one or more dimensions.\n<array> = np.zeros/ones/empty(shape)                  # Pass a tuple of ints (dimension sizes).\n<array> = np.arange(from_inc, to_exc, ±step)          # Also np.linspace(start, stop, length).\n<array> = np.random.randint(from_inc, to_exc, shape)  # Also random.uniform(low, high, shape).\n```\n\n```python\n<view>  = <array>.reshape(shape)                      # Also `<array>.shape = (<int>, [...])`.\n<array> = <array>.flatten()                           # Returns 1d copy. Also <array>.ravel().\n<view>  = <array>.transpose()                         # Flips the table over its main diagonal.\n```\n\n```python\n<array> = np.copy/abs/sqrt/log/int64(<array>)         # Returns a new array of the same shape.\n<array> = <array>.sum/max/mean/argmax/all(axis)       # Aggregates dimension with passed index.\n<array> = np.apply_along_axis(<func>, axis, <array>)  # Func. can return a scalar or an array.\n```\n\n```python\n<array> = np.concatenate(<list_of_arrays>, axis=0)    # Links arrays along first axis (rows).\n<array> = np.vstack/column_stack(<list_of_arrays>)    # A 1d array is treated as a row/column.\n<array> = np.tile/repeat(<array>, <int/s> [, axis])   # Tiles the array or repeats elements.\n```\n* **Shape is a tuple of dimension sizes. A 100x50 RGB image has shape (50, 100, 3).**\n* **Axis is an index of a dimension. Leftmost dimension has index 0. Summing the RGB&nbsp;image along axis 2 will return a greyscale image with shape (50, 100).**\n\n### Indexing\n```perl\n<el>       = <2d>[row_index, col_index]               # Also `<3d>[<int>, <int>, <int>]`.\n<1d_view>  = <2d>[row_index]                          # Also `<3d>[<int>, <int>, <slice>]`.\n<1d_view>  = <2d>[:, col_index]                       # Also `<3d>[<int>, <slice>, <int>]`.\n<2d_view>  = <2d>[from:to_row_i, from:to_col_i]       # Also `<3d>[<int>, <slice>, <slice>]`.\n```\n\n```perl\n<1d_array> = <2d>[row_indices, col_indices]           # Also `<3d>[<int/1d>, <1d>, <1d>]`.\n<2d_array> = <2d>[row_indices]                        # Also `<3d>[<int/1d>, <1d>, <slice>]`.\n<2d_array> = <2d>[:, col_indices]                     # Also `<3d>[<int/1d>, <slice>, <1d>]`.\n<2d_array> = <2d>[np.ix_(row_indices, col_indices)]   # Also `<3d>[<int/1d/2d>, <2d>, <2d>]`.\n```\n\n```perl\n<2d_bools> = <2d> > <el/1d/2d>                        # A 1d object must be a size of a row.\n<1/2d_arr> = <2d>[<2d/1d_bools>]                      # A 1d object must be a size of a col.\n```\n* **`':'` returns a slice of all dimension's indices. If dimension is omitted, it defaults to `':'`.**\n* **Passing two slices (line 4) works the same as when a slice and 1d array are passed (line 7).**\n* **Python converts `'obj[i, j]'` to `'obj[(i, j)]'`. This makes `'<2d>[row_i, col_i]'` and `'<2d>[row_indices]'` indistinguishable to NumPy if tuple of two indices is passed.**\n* **`'ix_([1, 2], [3, 4])'` returns `'[[1], [2]]'` and `'[[3, 4]]'`. Due to broadcasting rules, this is the same as indexing via `'[[1, 1], [2, 2]]'` and `'[[3, 4], [3, 4]]'`.**\n* **Any value that is broadcastable to the indexed shape can be assigned to the selection.**\n\n### Broadcasting\n**Array reshaping procedure used by arithmetic operations, etc.**\n```python\narray_a = np.array([0.1,  0.6,  0.8])                 # I.e. `array_a.shape == (3,)`.\narray_b = np.array([[0.1], [0.6], [0.8]])             # I.e. `array_b.shape == (3, 1)`.\n```\n\n#### 1. If array shapes differ in length, left-pad the shorter shape with ones:\n```python\narray_a = np.array([[0.1,  0.6,  0.8]])               # I.e. `array_a.shape == (1, 3)`.\narray_b = np.array([[0.1], [0.6], [0.8]])             # I.e. `array_b.shape == (3, 1)`.\n```\n\n#### 2. Expand dimensions with size 1 by duplicating their elements/arrays:\n```python\narray_a = np.array([[0.1,  0.6,  0.8],                # I.e. `array_a.shape == (3, 3)`.\n                    [0.1,  0.6,  0.8],\n                    [0.1,  0.6,  0.8]])\n\narray_b = np.array([[0.1,  0.1,  0.1],                # I.e. `array_b.shape == (3, 3)`.\n                    [0.6,  0.6,  0.6],\n                    [0.8,  0.8,  0.8]])\n```\n\n### Example\n#### For each point returns index of its nearest point (`[0.1, 0.6, 0.8] => [1, 2, 1]`):\n\n```python\n>>> print(points := np.array([0.1, 0.6, 0.8]))\n[0.1  0.6  0.8]\n>>> print(wrapped_points := points.reshape(3, 1))\n[[0.1]\n [0.6]\n [0.8]]\n>>> print(deltas := points - wrapped_points)\n[[ 0.   0.5  0.7]\n [-0.5  0.   0.2]\n [-0.7 -0.2  0. ]]\n>>> deltas[range(3), range(3)] = np.inf\n>>> print(distances := np.abs(deltas))\n[[inf  0.5  0.7]\n [0.5  inf  0.2]\n [0.7  0.2  inf]]\n>>> print(distances.argmin(axis=1))\n[1 2 1]\n```\n\n\nImage\n-----\n```python\n# $ pip3 install pillow\nfrom PIL import Image\n```\n\n```python\n<Image> = Image.new('RGB', (width, height))   # Creates an image. Also `color=<tuple_of_ints>`.\n<Image> = Image.open(<path>)                  # Identifies format based on the file's contents.\n<Image> = <Image>.convert('<mode>')           # Converts the image to the new mode (see Modes).\n<Image>.save(<path>)                          # Also `quality=<int>` if extension is jpg/jpeg.\n<Image>.show()                                # Displays image in system's default preview app.\n```\n\n```python\n<int/tup> = <Image>.getpixel((x, y))          # Returns the pixel's value, that is, its color.\n<ImgCore> = <Image>.getdata()                 # Returns a flattened view of the pixel values.\n<Image>.putpixel((x, y), <int/tuple>)         # Updates pixel's value. Clips passed integer/s.\n<Image>.putdata(<list/ImgCore>)               # Updates pixels with a copy of passed sequence.\n<Image>.paste(<Image>, (x, y))                # Draws passed image at the specified location.\n```\n\n```python\n<Image> = <Image>.filter(<Filter>)            # Accepts ImageFilter.BLUR/SHARPEN/FIND_EDGES/….\n<Image> = <Enhance>.enhance(<float>)          # E.g. `ImageEnhance.Contrast/Color/…(<Image>)`.\n```\n\n```python\n<array> = np.array(<Image>)                   # Creates a 2d or 3d NumPy array from the image.\n<Image> = Image.fromarray(np.uint8(<array>))  # Use `<array>.clip(0, 255)` to clip the values.\n```\n\n### Modes\n* **`'L'` - Lightness (greyscale image). Each pixel is stored as an int between 0 and 255.**\n* **`'RGB'` - Red, green, blue (true color image). Each pixel is a tuple of three integers.**\n* **`'RGBA'` - RGB with alpha. Low alpha (i.e. fourth int) makes pixel more transparent.**\n* **`'HSV'` - Hue, saturation, value. Three ints representing color in HSV color space.**\n\n\n### Examples\n#### Creates a PNG image of a rainbow gradient:\n```python\nWIDTH, HEIGHT = 100, 100\nn_pixels = WIDTH * HEIGHT\nhues = (255 * i/n_pixels for i in range(n_pixels))\nimg = Image.new('HSV', (WIDTH, HEIGHT))\nimg.putdata([(int(h), 255, 255) for h in hues])\nimg.convert('RGB').save('test.png')\n```\n\n#### Adds noise to the PNG image and displays it:\n```python\nfrom random import randint\nadd_noise = lambda value: max(0, min(255, value + randint(-20, 20)))\nimg = Image.open('test.png').convert('HSV')\nimg.putdata([(add_noise(h), s, v) for h, s, v in img.getdata()])\nimg.show()\n```\n\n### Image Draw\n```python\nfrom PIL import ImageDraw\n<Draw> = ImageDraw.Draw(<Image>)              # An object for adding 2D graphics to the image.\n<Draw>.point((x, y))                          # Draws a point. Accepts `fill=<int/tuple/str>`.\n<Draw>.line((x1, y1, x2, y2 [, ...]))         # To get anti-aliasing use <Img>.resize((w, h)).\n<Draw>.arc((x1, y1, x2, y2), deg1, deg2)      # Draws arc of an ellipse in clockwise direction.\n<Draw>.rectangle((x1, y1, x2, y2))            # Also rounded_rectangle() and regular_polygon().\n<Draw>.polygon((x1, y1, x2, y2, ...))         # The last point gets connected to the first one.\n<Draw>.ellipse((x1, y1, x2, y2))              # To rotate it use <Image>.rotate(anticlock_deg).\n<Draw>.text((x, y), <str>)                    # Accepts `font=ImageFont.truetype(path, size)`.\n```\n* **Pass `'fill=<color>'` to set primary color of the figure.**\n* **Pass `'width=<int>'` to set the width of lines or contours.**\n* **Pass `'outline=<color>'` to set the color of the contours.**\n* **Color can be an int, tuple, `'#rrggbb[aa]'` or color name.**\n\n\nAnimation\n---------\n#### Creates a GIF of a bouncing ball:\n```python\n# $ pip3 install imageio\nfrom PIL import Image, ImageDraw\nimport imageio\n\nWIDTH, HEIGHT, R = 126, 126, 10\nframes = []\nfor velocity in range(1, 16):\n    y = sum(range(velocity))\n    frame = Image.new('L', (WIDTH, HEIGHT))\n    draw = ImageDraw.Draw(frame)\n    draw.ellipse((WIDTH/2-R, y, WIDTH/2+R, y+R*2), fill='white')\n    frames.append(frame)\nframes += reversed(frames[1:-1])\nimageio.mimsave('test.gif', frames, duration=0.03)\n```\n\n\nAudio\n-----\n```python\nimport wave\n```\n\n```python\n<Wave>  = wave.open('<path>')               # Opens specified WAV file for reading.\n<int>   = <Wave>.getframerate()             # Returns number of frames per second.\n<int>   = <Wave>.getnchannels()             # Returns number of samples per frame.\n<int>   = <Wave>.getsampwidth()             # Returns number of bytes per sample.\n<tuple> = <Wave>.getparams()                # Returns namedtuple of all parameters.\n<bytes> = <Wave>.readframes(nframes)        # Returns all frames if `-1` is passed.\n```\n\n```python\n<Wave> = wave.open('<path>', 'wb')          # Creates/truncates a file for writing.\n<Wave>.setframerate(<int>)                  # Pass 44100, or 48000 for video track.\n<Wave>.setnchannels(<int>)                  # Pass 1 for mono, 2 for stereo signal.\n<Wave>.setsampwidth(<int>)                  # Pass 2 for CD, 3 for hi-res quality.\n<Wave>.setparams(<tuple>)                   # Passed tuple must contain all params.\n<Wave>.writeframes(<bytes>)                 # Appends passed frames to audio file.\n```\n* **The bytes object contains a sequence of frames, each consisting of one or more samples.**\n* **In stereo signal, first sample of a frame belongs to the left channel (second to the right).**\n* **Each sample consists of one or more bytes (depending on sample width) that, when con&shy;verted to an integer, indicate the displacement of a speaker membrane at that moment.**\n* **If sample width is one byte, then the integer should be encoded unsigned. For all other sizes, the integer should be encoded signed with little-endian byte order.**\n\n### Sample Values\n```text\n+-----------+-----------+------+-----------+\n| sampwidth |    min    | zero |    max    |\n+-----------+-----------+------+-----------+\n|     1     |         0 |  128 |       255 |\n|     2     |    -32768 |    0 |     32767 |\n|     3     |  -8388608 |    0 |   8388607 |\n+-----------+-----------+------+-----------+\n```\n\n### Read Float Samples from WAV File\n```python\ndef read_wav_file(filename):\n    def get_int(bytes_obj):\n        an_int = int.from_bytes(bytes_obj, 'little', signed=(p.sampwidth != 1))\n        return an_int - (128 * (p.sampwidth == 1))\n    with wave.open(filename) as file:\n        p = file.getparams()\n        frames = file.readframes(-1)\n    samples_b = (frames[i : i + p.sampwidth] for i in range(0, len(frames), p.sampwidth))\n    return [get_int(b) / pow(2, (p.sampwidth * 8) - 1) for b in samples_b], p\n```\n\n### Write Float Samples to WAV File\n```python\ndef write_to_wav_file(filename, samples_f, p=None, nchannels=1, sampwidth=2, fs=44100):\n    def get_bytes(a_float):\n        a_float = max(-1, min(1 - 2e-16, a_float)) + (p.sampwidth == 1)\n        a_float *= pow(2, (p.sampwidth * 8) - 1)\n        return int(a_float).to_bytes(p.sampwidth, 'little', signed=(p.sampwidth != 1))\n    if p is None:\n        p = wave._wave_params(nchannels, sampwidth, fs, 0, 'NONE', 'not compressed')\n    with wave.open(filename, 'wb') as file:\n        file.setparams(p)\n        file.writeframes(b''.join(get_bytes(f) for f in samples_f))\n```\n\n### Examples\n#### Saves a 440 Hz sine wave to a mono WAV file:\n```python\nfrom math import sin, pi\nget_sin = lambda i: sin(i * 2 * pi * 440 / 44100) * 0.2\nwrite_to_wav_file('test.wav', (get_sin(i) for i in range(100_000)))\n```\n\n#### Adds noise to the WAV file:\n```python\nfrom random import uniform\nsamples_f, prms = read_wav_file('test.wav')\nsamples_f = (f + uniform(-0.02, 0.02) for f in samples_f)\nwrite_to_wav_file('test.wav', samples_f, p=prms)\n```\n\n### Audio Player\n```python\n# $ pip3 install nava\nfrom nava import play\nplay('test.wav')\n```\n\n### Text to Speech\n```python\n# $ pip3 install piper-tts sounddevice\nimport os, piper, sounddevice\nos.system('python3 -m piper.download_voices en_US-lessac-high')\nvoice = piper.PiperVoice.load('en_US-lessac-high.onnx')\nfor sentence in voice.synthesize('Sally sells seashells by the seashore.'):\n    sounddevice.wait()\n    sounddevice.play(sentence.audio_float_array, sentence.sample_rate)\nsounddevice.wait()\n```\n\n\nSynthesizer\n-----------\n#### Plays Popcorn by Gershon Kingsley:\n```python\n# $ pip3 install numpy sounddevice\nimport itertools as it, math, numpy as np, sounddevice\n\ndef play_notes(notes, bpm=132, fs=44100, volume=0.1):\n    beat_len  = 60/bpm * fs\n    get_pause = lambda n_beats: it.repeat(0, int(n_beats * beat_len))\n    get_sinus = lambda i, hz: math.sin(i * 2 * math.pi * hz / fs) * volume\n    get_wave  = lambda hz, n_beats: (get_sinus(i, hz) for i in range(int(n_beats * beat_len)))\n    get_hertz = lambda note: 440 * 2 ** ((int(note[:2]) - 69) / 12)\n    get_beats = lambda note: 1/2 if '♩' in note else 1/4 if '♪' in note else 1\n    get_samps = lambda n: get_wave(get_hertz(n), get_beats(n)) if n else get_pause(1/4)\n    samples_f = it.chain(get_pause(1/2), *(get_samps(n) for n in notes.split(',')))\n    sounddevice.play(np.fromiter(samples_f, np.float32), fs, blocking=True)\n\nplay_notes('83♩,81♪,,83♪,,78♪,,74♪,,78♪,,71♪,,,,83♪,,81♪,,83♪,,78♪,,74♪,,78♪,,71♪,,,,'\n           '83♩,85♪,,86♪,,85♪,,86♪,,83♪,,85♩,83♪,,85♪,,81♪,,83♪,,81♪,,83♪,,79♪,,83♪,,,,')\n```\n\n\nPygame\n------\n#### Opens a window and draws a square that can be moved with arrow keys:\n```python\n# $ pip3 install pygame\nimport pygame as pg\n\npg.init()\nscreen = pg.display.set_mode((500, 500))\nrect = pg.Rect(240, 240, 20, 20)\nwhile not pg.event.get(pg.QUIT):\n    for event in pg.event.get(pg.KEYDOWN):\n        dx = (event.key == pg.K_RIGHT) - (event.key == pg.K_LEFT)\n        dy = (event.key == pg.K_DOWN) - (event.key == pg.K_UP)\n        rect = rect.move((dx * 20, dy * 20))\n    screen.fill(pg.Color('black'))\n    pg.draw.rect(screen, pg.Color('white'), rect)\n    pg.display.flip()\npg.quit()\n```\n\n### Rect\n**Object for storing rectangular coordinates.**\n```python\n<Rect> = pg.Rect(x, y, width, height)           # Creates Rect object. Truncates passed floats.\n<int>  = <Rect>.x/y/centerx/centery/…           # `top/right/bottom/left`. Allows assignments.\n<tup.> = <Rect>.topleft/center/…                # `topright/bottomright/bottomleft/size`. Same.\n<Rect> = <Rect>.move((delta_x, delta_y))        # Use move_ip() to move the rectangle in-place.\n```\n\n```python\n<bool> = <Rect>.collidepoint((x, y))            # Returns True if rectangle contains the point.\n<bool> = <Rect>.colliderect(<Rect>)             # Returns True if the rectangles are colliding.\n<int>  = <Rect>.collidelist(<list_of_Rect>)     # Returns index of first colliding Rect or -1.\n<list> = <Rect>.collidelistall(<list_of_Rect>)  # Returns indices of all colliding rectangles.\n```\n\n### Surface\n**Object for representing images.**\n```python\n<Surf> = pg.display.set_mode((width, height))   # Opens new window and returns surface object.\n<Surf> = pg.Surface((width, height))            # New RGB surface. RGBA if `flags=pg.SRCALPHA`.\n<Surf> = pg.image.load(<path/file>)             # Loads the image. Also get_width/get_height().\n<Surf> = pg.surfarray.make_surface(<np_array>)  # Also `<np_arr> = surfarray.pixels3d(<Surf>)`.\n<Surf> = <Surf>.subsurface(<Rect>)              # Creates a new surface object from the cutout.\n```\n\n```python\n<Surf>.fill(color)                              # Pass tuple of ints or pg.Color('<name/hex>').\n<Surf>.set_at((x, y), color)                    # Updates a pixel. Also <Surf>.get_at((x, y)).\n<Surf>.blit(<Surf>, (x, y))                     # Draws passed surface at a specified location.\n```\n\n```python\nfrom pygame.transform import scale, rotate      # Also flip, smoothscale, scale_by, rotozoom.\n<Surf> = scale(<Surf>, (width, height))         # Scales the surface. `smoothscale()` blurs it.\n<Surf> = rotate(<Surf>, angle)                  # Rotates the surface for counterclock degrees.\n<Surf> = flip(<Surf>, flip_x=True)              # Mirrors over the y axis. Also `flip_y=True`.\n```\n\n```python\nfrom pygame.draw import line, arc, rect         # Also ellipse, circle, polygon, lines, aaline.\nline(<Surf>, color, (x1, y1), (x2, y2))         # Draws line to surface. Accepts `width=<int>`.\narc(<Surf>, color, <Rect>, from_rad, to_rad)    # Also ellipse(<Surf>, color, <Rect>, width=0).\nrect(<Surf>, color, <Rect>, width=0)            # Also polygon(<Surf>, color, points, width=0).\n```\n\n```python\n<Font> = pg.font.Font(<path/file>, size)        # Loads a TTF file. Pass None for default font.\n<Surf> = <Font>.render(text, antialias, color)  # Accepts background color via fourth argument.\n```\n\n### Sound\n```python\n<Sound> = pg.mixer.Sound(<path/file/bytes>)     # Accepts WAV file or array of short integers.\n<Sound>.play/stop()                             # Also set_volume(<float>) and fadeout(msec).\n```\n\n### Basic Mario Brothers Example\n```python\nimport collections, dataclasses, enum, io, itertools as it, pygame as pg, urllib.request\nfrom random import randint\n\nP = collections.namedtuple('P', 'x y')          # Position (x and y coordinates).\nD = enum.Enum('D', 'n e s w')                   # Direction (north, east, etc.).\nW, H, MAX_S = 50, 50, P(5, 10)                  # Width, height, maximum speed.\n\ndef main():\n    def get_screen():\n        pg.init()\n        return pg.display.set_mode((W*16, H*16))\n    def get_images():\n        url = 'https://gto76.github.io/python-cheatsheet/web/mario_bros.png'\n        img = pg.image.load(io.BytesIO(urllib.request.urlopen(url).read()))\n        return [img.subsurface(get_rect(x, 0)) for x in range(img.get_width() // 16)]\n    def get_mario():\n        Mario = dataclasses.make_dataclass('Mario', 'rect spd facing_left frame_cycle'.split())\n        return Mario(get_rect(1, 1), P(0, 0), False, it.cycle(range(3)))\n    def get_tiles():\n        border = [(x, y) for x in range(W) for y in range(H) if x in [0, W-1] or y in [0, H-1]]\n        platforms = [(randint(1, W-2), randint(2, H-2)) for _ in range(W*H // 10)]\n        return [get_rect(x, y) for x, y in border + platforms]\n    def get_rect(x, y):\n        return pg.Rect(x*16, y*16, 16, 16)\n    run(get_screen(), get_images(), get_mario(), get_tiles())\n\ndef run(screen, images, mario, tiles):\n    clock = pg.time.Clock()\n    pressed = set()\n    while not pg.event.get(pg.QUIT):\n        clock.tick(28)\n        pressed |= {e.key for e in pg.event.get(pg.KEYDOWN)}\n        pressed -= {e.key for e in pg.event.get(pg.KEYUP)}\n        update_speed(mario, tiles, pressed)\n        update_position(mario, tiles)\n        draw(screen, images, mario, tiles)\n    pg.quit()\n\ndef update_speed(mario, tiles, pressed):\n    x, y = mario.spd\n    x += 2 * ((pg.K_RIGHT in pressed) - (pg.K_LEFT in pressed))\n    x += (x < 0) - (x > 0)\n    y += 1 if D.s not in get_boundaries(mario.rect, tiles) else (pg.K_UP in pressed) * -10\n    mario.spd = P(x=max(-MAX_S.x, min(MAX_S.x, x)), y=max(-MAX_S.y, min(MAX_S.y, y)))\n\ndef update_position(mario, tiles):\n    x, y = mario.rect.topleft\n    n_steps = max(abs(s) for s in mario.spd)\n    for _ in range(n_steps):\n        mario.spd = stop_on_collision(mario.spd, get_boundaries(mario.rect, tiles))\n        mario.rect.topleft = x, y = x + (mario.spd.x / n_steps), y + (mario.spd.y / n_steps)\n\ndef get_boundaries(rect, tiles):\n    deltas = {D.n: P(0, -1), D.e: P(1, 0), D.s: P(0, 1), D.w: P(-1, 0)}\n    return {d for d, delta in deltas.items() if rect.move(delta).collidelist(tiles) != -1}\n\ndef stop_on_collision(spd, bounds):\n    return P(x=0 if (D.w in bounds and spd.x < 0) or (D.e in bounds and spd.x > 0) else spd.x,\n             y=0 if (D.n in bounds and spd.y < 0) or (D.s in bounds and spd.y > 0) else spd.y)\n\ndef draw(screen, images, mario, tiles):\n    screen.fill((85, 168, 255))\n    mario.facing_left = mario.spd.x < 0 if mario.spd.x else mario.facing_left\n    is_airborne = D.s not in get_boundaries(mario.rect, tiles)\n    image_index = 4 if is_airborne else next(mario.frame_cycle) if mario.spd.x else 6\n    screen.blit(images[image_index + (mario.facing_left * 9)], mario.rect)\n    for tile in tiles:\n        is_border = tile.x in [0, (W-1)*16] or tile.y in [0, (H-1)*16]\n        screen.blit(images[18 if is_border else 19], tile)\n    pg.display.flip()\n\nif __name__ == '__main__':\n    main()\n```\n\n\nPandas\n------\n**Data analysis library. For examples see [Plotly](#plotly).**\n\n```python\n# $ pip3 install pandas matplotlib\nimport pandas as pd, matplotlib.pyplot as plt\n```\n\n### Series\n**Ordered dictionary with a name.**\n\n```python\n>>> s = pd.Series([1, 2], index=['x', 'y'], name='a'); s\nx    1\ny    2\nName: a, dtype: int64\n```\n\n```python\n<S>  = pd.Series(<list>)                       # Uses list's indices for 'index'.\n<S>  = pd.Series(<dict>)                       # Uses dictionary's keys for 'index'.\n```\n\n```python\n<el> = <S>.loc[key]                            # Or: <S>.iloc[i]\n<S>  = <S>.loc[coll_of_keys]                   # Or: <S>.iloc[coll_of_i]\n<S>  = <S>.loc[from_key : to_key_inc]          # Or: <S>.iloc[from_i : to_i_exc]\n```\n\n```python\n<el> = <S>[key/i]                              # Or: <S>.<key>\n<S>  = <S>[coll_of_keys/coll_of_i]             # Or: <S>[key/i : key/i]\n<S>  = <S>[<S_of_bools>]                       # Or: <S>.loc/iloc[<S_of_bools>]\n```\n\n```python\n<S>  = <S> > <el/S>                            # Returns S of bools. For logic use &, |, ~.\n<S>  = <S> + <el/S>                            # Items with non-matching keys get value NaN.\n```\n\n```python\n<S>  = <S>.head/describe/sort_values()         # Also <S>.unique/value_counts/round/dropna().\n<S>  = <S>.str.strip/lower/contains/replace()  # Also split().str[i] or split(expand=True).\n<S>  = <S>.dt.year/month/day/hour              # Use pd.to_datetime(<S>) to get S of datetimes.\n<S>  = <S>.dt.to_period('y/m/d/h')             # Quantizes datetimes into Period objects.\n```\n\n```python\n<S>.plot.line/area/bar/pie/hist()              # Generates a plot. Accepts `title=<str>`.\nplt.show()                                     # Displays the plot. Also plt.savefig(<path>).\n```\n* **Use `'print(<S>.to_string())'` to print a Series that has more than sixty items.**\n* **Use `'<S>.index'` to get collection of keys and `'<S>.index = <coll>'` to update them.**\n* **Only pass a list or Series to loc/iloc because `'obj[x, y]'` is converted to `'obj[(x, y)]'` and `'<S>.loc[key_1, key_2]'` is how you retrieve a value from a multi-indexed Series.**\n* **Pandas uses NumPy types like `'np.int64'`. Series is converted to `'float64'` if np.nan is assigned to any item. Use `'<S>.astype(<str/type>)'` to get converted Series.**\n\n#### Series — Aggregate, Transform, Map:\n```python\n<el> = <S>.sum/max/mean/std/idxmax/count()     # Or: <S>.agg(lambda <S>: <el>)\n<S>  = <S>.rank/diff/cumsum/ffill/interpol…()  # Or: <S>.agg/transform(lambda <S>: <S>)\n<S>  = <S>.isna/fillna/isin([<el/coll>])       # Or: <S>.agg/transform/map(lambda <el>: <el>)\n```\n\n```text\n+--------------+-------------+-------------+---------------+\n|              |    'sum'    |   ['sum']   | {'s': 'sum'}  |\n+--------------+-------------+-------------+---------------+\n| s.apply(…)   |      3      |    sum  3   |     s  3      |\n| s.agg(…)     |             |             |               |\n+--------------+-------------+-------------+---------------+\n```\n\n```text\n+--------------+-------------+-------------+---------------+\n|              |    'rank'   |   ['rank']  | {'r': 'rank'} |\n+--------------+-------------+-------------+---------------+\n| s.apply(…)   |             |      rank   |               |\n| s.agg(…)     |    x  1.0   |   x   1.0   |   r  x  1.0   |\n|              |    y  2.0   |   y   2.0   |      y  2.0   |\n+--------------+-------------+-------------+---------------+\n```\n\n### DataFrame\n**Table with labeled rows and columns.**\n\n```python\n>>> df = pd.DataFrame([[1, 2], [3, 4]], index=['a', 'b'], columns=['x', 'y']); df\n   x  y\na  1  2\nb  3  4\n```\n\n```python\n<DF>   = pd.DataFrame(<list_of_rows>)          # Rows can be either lists, dicts or series.\n<DF>   = pd.DataFrame(<dict_of_columns>)       # Columns can be either lists, dicts or series.\n```\n\n```python\n<el>   = <DF>.loc[row_key, col_key]            # Or: <DF>.iloc[row_i, col_i]\n<S/DF> = <DF>.loc[row_key/s]                   # Or: <DF>.iloc[row_i/s]\n<S/DF> = <DF>.loc[:, col_key/s]                # Or: <DF>.iloc[:, col_i/s]\n<DF>   = <DF>.loc[row_bools, col_bools]        # Or: <DF>.iloc[row_bools, col_bools]\n```\n\n```python\n<S/DF> = <DF>[col_key/s]                       # Or: <DF>.<col_key>\n<DF>   = <DF>[<S_of_bools>]                    # Filters rows. For example `df[df.x > 1]`.\n<DF>   = <DF>[<DF_of_bools>]                   # Assigns NaN to items that are False in bools.\n```\n\n```python\n<DF>   = <DF> > <el/S/DF>                      # Returns DF of bools. Treats series as a row.\n<DF>   = <DF> + <el/S/DF>                      # Items with non-matching keys get value NaN.\n```\n\n```python\n<DF>   = <DF>.set_index(col_key)               # Replaces row keys with column's values.\n<DF>   = <DF>.reset_index(drop=False)          # Drops or moves row keys to column named index.\n<DF>   = <DF>.sort_index(ascending=True)       # Sorts rows by row keys. Use `axis=1` for cols.\n<DF>   = <DF>.sort_values(col_key/s)           # Sorts rows by passed column/s. Also `axis=1`.\n```\n\n```python\n<DF>   = <DF>.head/tail/sample(<int>)          # Returns first, last, or random n rows.\n<DF>   = <DF>.describe()                       # Describes columns. Also info(), corr(), shape.\n<DF>   = <DF>.query('<query>')                 # Filters rows. For example `df.query('x > 1')`.\n```\n\n```python\n<DF>.plot.line/area/bar/scatter(x=col_key, …)  # `y=col_key/s`. Also hist/box(column/by=col_k).\nplt.show()                                     # Displays the plot. Also plt.savefig(<path>).\n```\n\n#### DataFrame — Merge, Join, Concat:\n```python\n>>> df_2 = pd.DataFrame([[4, 5], [6, 7]], index=['b', 'c'], columns=['y', 'z']); df_2\n   y  z\nb  4  5\nc  6  7\n```\n\n```text\n+-----------------------+---------------+------------+------------+---------------------------+\n|                       |    'outer'    |   'inner'  |   'left'   |       Description         |\n+-----------------------+---------------+------------+------------+---------------------------+\n| df.merge(df_2,        |    x   y   z  | x   y   z  | x   y   z  | Merges on column if 'on'  |\n|          on='y',      | 0  1   2   .  | 3   4   5  | 1   2   .  | or 'left_on/right_on' are |\n|          how=…)       | 1  3   4   5  |            | 3   4   5  | set, else on shared cols. |\n|                       | 2  .   6   7  |            |            | Uses 'inner' by default.  |\n+-----------------------+---------------+------------+------------+---------------------------+\n| df.join(df_2,         |    x yl yr  z |            | x yl yr  z | Merges on row keys.       |\n|         lsuffix='l',  | a  1  2  .  . | x yl yr  z | 1  2  .  . | Uses 'left' by default.   |\n|         rsuffix='r',  | b  3  4  4  5 | 3  4  4  5 | 3  4  4  5 | If Series is passed, it   |\n|         how=…)        | c  .  .  6  7 |            |            | is treated as a column.   |\n+-----------------------+---------------+------------+------------+---------------------------+\n| pd.concat([df, df_2], |    x   y   z  |     y      |            | Adds rows at the bottom.  |\n|           axis=0,     | a  1   2   .  |     2      |            | Uses 'outer' by default.  |\n|           join=…)     | b  3   4   .  |     4      |            | A Series is treated as a  |\n|                       | b  .   4   5  |     4      |            | column. To add a row use  |\n|                       | c  .   6   7  |     6      |            | pd.concat([df, DF([s])]). |\n+-----------------------+---------------+------------+------------+---------------------------+\n| pd.concat([df, df_2], |    x  y  y  z |            |            | Adds columns at the       |\n|           axis=1,     | a  1  2  .  . | x  y  y  z |            | right end. Uses 'outer'   |\n|           join=…)     | b  3  4  4  5 | 3  4  4  5 |            | by default. A Series is   |\n|                       | c  .  .  6  7 |            |            | treated as a column.      |\n+-----------------------+---------------+------------+------------+---------------------------+\n```\n\n#### DataFrame — Aggregate, Transform, Map:\n```python\n<S>  = <DF>.sum/max/mean/std/idxmax/count()    # Or: <DF>.apply/agg(lambda <S>: <el>)\n<DF> = <DF>.rank/diff/cumsum/ffill/interpo…()  # Or: <DF>.apply/agg/transform(lambda <S>: <S>)\n<DF> = <DF>.isna/fillna/isin([<el/coll>])      # Or: <DF>.applymap(lambda <el>: <el>)\n```\n\n```text\n+-----------------+---------------+---------------+---------------+\n|                 |     'sum'     |    ['sum']    | {'x': 'sum'}  |\n+-----------------+---------------+---------------+---------------+\n| df.apply(…)     |      x  4     |        x  y   |     x  4      |\n| df.agg(…)       |      y  6     |   sum  4  6   |               |\n+-----------------+---------------+---------------+---------------+\n```\n\n```text\n+-----------------+---------------+---------------+---------------+\n|                 |     'rank'    |    ['rank']   | {'x': 'rank'} |\n+-----------------+---------------+---------------+---------------+\n| df.apply(…)     |               |       x    y  |               |\n| df.agg(…)       |       x    y  |    rank rank  |         x     |\n| df.transform(…) |  a  1.0  1.0  |  a  1.0  1.0  |    a  1.0     |\n|                 |  b  2.0  2.0  |  b  2.0  2.0  |    b  2.0     |\n+-----------------+---------------+---------------+---------------+\n```\n* **Listed methods process the columns unless they receive `'axis=1'`. Exceptions to this rule are `'<DF>.dropna()'`, `'<DF>.drop(row_key/s)'` and `'<DF>.rename(<dict/func>)'`.**\n* **Fifth result's columns are indexed with a multi-index. This means we need a tuple of column keys to specify a column: `'<DF>.loc[row_key, (col_key_1, col_key_2)]'`.**\n\n### Multi-Index\n```python\n<DF> = <DF>.loc[row_key_1]                     # Or: <DF>.xs(row_key_1)\n<DF> = <DF>.loc[:, (slice(None), col_key_2)]   # Or: <DF>.xs(col_key_2, axis=1, level=1)\n<DF> = <DF>.set_index(col_keys)                # Creates index from cols. Also `append=False`.\n<DF> = <DF>.pivot_table(index=col_key/s)       # `columns=key/s, values=key/s, aggfunc='mean'`.\n<S>  = <DF>.stack/unstack(level=-1)            # Combines col keys with row keys or vice versa.\n```\n\n### File Formats\n```python\n<S/DF> = pd.read_json/pickle(<path/url/file>)  # Also io.StringIO(<str>), io.BytesIO(<bytes>).\n<DF>   = pd.read_csv/excel(<path/url/file>)    # Also `header/index_col/dtype/usecols/…=<obj>`.\n<list> = pd.read_html(<path/url/file>)         # Raises ImportError if webpage has zero tables.\n<S/DF> = pd.read_parquet/feather/hdf(<path…>)  # Function read_hdf() accepts `key=<s/df_name>`.\n<DF>   = pd.read_sql('<table/query>', <conn>)  # Pass SQLite3/Alchemy connection. See #SQLite.\n```\n\n```python\n<DF>.to_json/csv/html/latex/parquet(<path>)    # Returns a string/bytes if path is omitted.\n<DF>.to_pickle/excel/feather/hdf(<path>)       # Method to_hdf() requires `key=<s/df_name>`.\n<DF>.to_sql('<table_name>', <connection>)      # Also `if_exists='fail/replace/append'`.\n```\n* **`'$ pip3 install \"pandas[excel]\" odfpy lxml pyarrow'` installs dependencies.**\n* **Csv functions use the same dialect as standard library's csv module (e.g. `'sep=\",\"'`).**\n* **Read\\_csv() only parses dates of columns that are listed in 'parse\\_dates'. It automatically tries to detect the format, but it can be helped with 'date\\_format' or 'dayfirst' arguments.**\n* **We get a dataframe with DatetimeIndex if 'parse_dates' argument includes 'index\\_col'. Its `'resample(\"y/m/d/h\")'` method returns Resampler object that is similar to GroupBy.**\n\n### GroupBy\n**Object that groups together rows of a dataframe based on the value of the passed column.**\n\n```python\n<GB> = <DF>.groupby(col_key/s)                 # Splits DF into groups based on passed column.\n<DF> = <GB>.apply/filter(<func>)               # Filter drops a group if func returns False.\n<DF> = <GB>.get_group(<el>)                    # Selects a group by grouping column's value.\n<S>  = <GB>.size()                             # S of group sizes. Same keys as get_group().\n<GB> = <GB>[col_key]                           # Single column GB. All operations return S.\n```\n\n```python\n<DF> = <GB>.sum/max/mean/std/idxmax/count()    # Or: <GB>.agg(lambda <S>: <el>)\n<DF> = <GB>.rank/diff/cumsum/ffill()           # Or: <GB>.transform(lambda <S>: <S>)\n<DF> = <GB>.fillna(<el>)                       # Or: <GB>.transform(lambda <S>: <S>)\n```\n\n#### Divides rows into groups and sums their columns. Result has a named index that creates column `'z'` on reset_index():\n```python\n>>> df = pd.DataFrame([[1, 2, 3], [4, 5, 6], [7, 8, 6]], list('abc'), list('xyz'))\n>>> gb = df.groupby('z'); gb.apply(print)\n   x  y  z\na  1  2  3\n   x  y  z\nb  4  5  6\nc  7  8  6\n>>> gb.sum()\n    x   y\nz\n3   1   2\n6  11  13\n```\n\n### Rolling\n**Object for rolling window calculations.**\n\n```python\n<RS/RDF/RGB> = <S/DF/GB>.rolling(win_size)     # Also: `min_periods=None, center=False`.\n<RS/RDF/RGB> = <RDF/RGB>[col_key/s]            # Or: <RDF/RGB>.<col_key>\n<S/DF>       = <R>.mean/sum/max()              # Or: <R>.apply/agg(<agg_func/str>)\n```\n\n\nPlotly\n------\n```python\n# $ pip3 install plotly kaleido pandas\nimport plotly.express as px, pandas as pd\n```\n\n```python\n<Fig> = px.line(<DF> [, y=col_key/s [, x=col_key]])   # Also px.line(y=<list> [, x=<list>]).\n<Fig>.update_layout(paper_bgcolor='#rrggbb')          # Also `margin=dict(t=0, r=0, b=0, l=0)`.\n<Fig>.write_html/json/image('<path>')                 # Use <Fig>.show() to display the plot.\n```\n\n```python\n<Fig> = px.area/bar/box(<DF>, x=col_key, y=col_keys)  # Also `color=col_key`. All are optional.\n<Fig> = px.scatter(<DF>, x=col_key, y=col_keys)       # Also `color/size/symbol=col_key`. Same.\n<Fig> = px.scatter_3d(<DF>, x=col_key, y=col_key, …)  # `z=col_key`. Also color, size, symbol.\n<Fig> = px.histogram(<DF>, x=col_keys, y=col_key)     # Also color, nbins. All are optional.\n```\n\n#### Displays a line chart of total COVID-19 deaths per million grouped by continent:\n\n![Covid Deaths](web/covid_deaths.png)\n<div id=\"2a950764-39fc-416d-97fe-0a6226a3095f\" class=\"plotly-graph-div\" style=\"height:312px; width:914px;\"></div>\n\n```python\ncovid = pd.read_csv('https://raw.githubusercontent.com/owid/covid-19-data/8dde8ca49b'\n                    '6e648c17dd420b2726ca0779402651/public/data/owid-covid-data.csv',\n                    usecols=['iso_code', 'date', 'population', 'total_deaths'])\ncontinents = pd.read_csv('https://gto76.github.io/python-cheatsheet/web/continents.csv',\n                         usecols=['Three_Letter_Country_Code', 'Continent_Name'])\ndf = pd.merge(covid, continents, left_on='iso_code', right_on='Three_Letter_Country_Code')\ndf = df.groupby(['Continent_Name', 'date']).sum().reset_index()\ndf['Total Deaths per Million'] = df.total_deaths * 1e6 / df.population\ndf = df[df.date > '2020-03-14']\ndf = df.rename({'date': 'Date', 'Continent_Name': 'Continent'}, axis='columns')\npx.line(df, x='Date', y='Total Deaths per Million', color='Continent')\n```\n\n#### Displays a multi-axis line chart of total COVID-19 cases and changes in prices of Bitcoin, Dow Jones and gold:\n\n![Covid Cases](web/covid_cases.png)\n<div id=\"e23ccacc-a456-478b-b467-7282a2165921\" class=\"plotly-graph-div\" style=\"height:285px; width:935px;\"></div>\n\n```python\n# $ pip3 install pandas lxml selenium plotly\nimport pandas as pd, selenium.webdriver, io, plotly.graph_objects as go\n\ndef main():\n    covid, (bitcoin, gold, dow) = get_covid_cases(), get_tickers()\n    df = wrangle_data(covid, bitcoin, gold, dow)\n    display_data(df)\n\ndef get_covid_cases():\n    url = 'https://catalog.ourworldindata.org/garden/covid/latest/compact/compact.csv'\n    df = pd.read_csv(url, parse_dates=['date'])\n    df = df[df.country == 'World']\n    s = df.set_index('date').total_cases\n    return s.rename('Total Cases')\n\ndef get_tickers():\n    with selenium.webdriver.Chrome() as driver:\n        driver.implicitly_wait(10)\n        symbols = {'Bitcoin': 'BTC-USD', 'Gold': 'GC=F', 'Dow Jones': '%5EDJI'}\n        return [get_ticker(driver, name, symbol) for name, symbol in symbols.items()]\n\ndef get_ticker(driver, name, symbol):\n    url = f'https://finance.yahoo.com/quote/{symbol}/history/'\n    driver.get(url + '?period1=1579651200&period2=9999999999')\n    if buttons := driver.find_elements('xpath', '//button[@name=\"reject\"]'):\n        buttons[0].click()\n    html = io.StringIO(driver.page_source)\n    dataframes = pd.read_html(html, parse_dates=['Date'])\n    s = dataframes[0].set_index('Date').Open\n    return s.rename(name)\n\ndef wrangle_data(covid, bitcoin, gold, dow):\n    df = pd.concat([bitcoin, gold, dow], axis=1)  # Creates table by joining columns on dates.\n    df = df.sort_index().interpolate()            # Sorts rows by date and interpolates NaN-s.\n    df = df.loc['2020-02-23':'2021-12-20']        # Keeps rows between specified dates.\n    df = (df / df.iloc[0]) * 100                  # Calculates percentages relative to day 1.\n    df = df.join(covid)                           # Adds column with covid cases.\n    return df.sort_values(df.index[-1], axis=1)   # Sorts columns by last day's value.\n\ndef display_data(df):\n    figure = go.Figure()\n    for col_name in reversed(df.columns):\n        yaxis = 'y1' if col_name == 'Total Cases' else 'y2'\n        trace = go.Scatter(x=df.index, y=df[col_name], yaxis=yaxis, name=col_name)\n        figure.add_trace(trace)\n    figure.update_layout(\n        width=944,\n        height=423,\n        yaxis1=dict(title='Total Cases', rangemode='tozero'),\n        yaxis2=dict(title='%', rangemode='tozero', overlaying='y', side='right'),\n        colorway=['#EF553B', '#636EFA', '#00CC96', '#FFA152'],\n        legend=dict(x=1.08)\n    )\n    figure.show()\n\nif __name__ == '__main__':\n    main()\n```\n\n\nAppendix\n--------\n### Cython\n**Library that compiles Python-like code into C.**\n\n```python\n# $ pip3 install cython\nimport pyximport; pyximport.install()                # Module that runs Cython scripts.\nimport <cython_script>                               # Script must have '.pyx' extension.\n```\n\n#### All `'cdef'` definitions are optional, but they contribute to the speed-up:\n```python\ncdef <type> <var_name> [= <obj/var>]                 # Either Python or C type variable.\ncdef <ctype> *<pointer_name> [= &<var>]              # Use <pointer>[0] to get the value.\ncdef <ctype>[size] <array_name> [= <coll/array>]     # Also `<ctype>[:] <mview> = <array>`.\ncdef <ctype> *<array_name> [= <coll/array/pointer>]  # E.g. `<<ctype> *> malloc(n_bytes)`.\n```\n\n```python\ncdef <type> <func_name>(<type> [*]<arg_name>): ...   # Omitted types default to `object`.\n```\n\n```python\ncdef class <class_name>:                             # Also `cdef struct <struct_name>:`.\n    cdef public <type> [*]<attr_name>                # Also `... <ctype> [*]<field_name>`.\n    def __init__(self, <type> <arg_name>):           # Also `cdef __dealloc__(self):`.\n        self.<attr_name> = <arg_name>                # Also `... free(<array/pointer>)`.\n```\n\n### Virtual Environments\n**System for installing libraries directly into project's directory.**\n\n```perl\n$ python3 -m venv NAME         # Creates virtual environment in current directory.\n$ source NAME/bin/activate     # Activates it. On Windows run `NAME\\Scripts\\activate`.\n$ pip3 install LIBRARY         # Installs the library into active environment.\n$ python3 FILE                 # Runs the script in active environment. Also `./FILE`.\n$ deactivate                   # Deactivates the active virtual environment.\n```\n\n### Basic Script Template\n**Run the script with `'$ python3 FILE'` or `'$ chmod u+x FILE; ./FILE'`. To automatically start the debugger when uncaught exception occurs run `'$ python3 -m pdb -cc FILE'`.**\n```python\n#!/usr/bin/env python3\n#\n# Usage: .py\n#\n\nfrom sys import argv, exit\nfrom collections import defaultdict, namedtuple\nfrom dataclasses import make_dataclass\nfrom enum import Enum\nimport functools as ft, itertools as it, operator as op, re\n\n\ndef main():\n    pass\n\n\n###\n##  UTIL\n#\n\ndef read_file(filename):\n    with open(filename, encoding='utf-8') as file:\n        return file.readlines()\n\n\nif __name__ == '__main__':\n    main()\n```\n\n\nIndex\n-----\n* **Ctrl+F / ⌘F is usually sufficient.**\n* **Searching `'#<title>'` on the [webpage](https://gto76.github.io/python-cheatsheet/) will limit the search to the titles.**\n* **Click on the title's `'🔗'` to get a link to its section.**\n"
  },
  {
    "path": "index.html",
    "content": "<!DOCTYPE html>\n<html class=\"ocks-org do-not-copy\" lang=\"en\">\n\n<head>\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1\" />\n  <title>Comprehensive Python Cheatsheet</title>\n  <meta name=\"description\" content=\"Exhaustive, simple, beautiful and concise. A truly Pythonic cheat sheet about Python programming language.\">\n  <link rel=\"icon\" href=\"web/favicon.png\">\n\n  <link rel=\"stylesheet\" href=\"web/default.min.css\">\n  <link rel=\"stylesheet\" href=\"https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css\">\n  <link rel=\"stylesheet\" href=\"web/style.css\">\n\n  <script>\n    // Uses dark theme 3 if it's specified in query string orbrowser prefers dark mode and \n    // theme is not explicitly set.\n    if ((window.location.search.search(/[?&]theme=dark3/) !== -1) || ((window.location.search.search(/[?&]theme=/) == -1) && (window.matchMedia('(prefers-color-scheme: dark)').matches))) {\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/default_dark3.min.css\\\">\");\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/style_dark3.css\\\">\");\n    }\n    else if (window.location.search.search(/[?&]theme=dark2/) !== -1) {\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/default_dark2.min.css\\\">\");\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/style_dark2.css\\\">\");\n    }\n    else if (window.location.search.search(/[?&]theme=dark1/) !== -1) {\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/default_dark1.min.css\\\">\");\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/style_dark1.css\\\">\");\n    }    \n    else if (window.location.search.search(/[?&]theme=dark/) !== -1) {\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/default_dark.min.css\\\">\");\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/style_dark.css\\\">\");\n    }\n  </script>\n\n  <meta name=\"twitter:card\" content=\"summary_large_image\">\n  <meta name=\"twitter:title\" content=\"Comprehensive Python Cheatsheet\">\n  <meta name=\"twitter:description\" content=\"Exhaustive, simple, beautiful and concise. A truly Pythonic cheat sheet about Python programming language.\">\n  <meta name=\"twitter:image\" content=\"https://gto76.github.io/python-cheatsheet/web/image_social_4.png\">\n\n  <meta property=\"og:url\" content=\"https://gto76.github.io/python-cheatsheet/\">\n  <meta property=\"og:title\" content=\"Comprehensive Python Cheatsheet\">\n  <meta property=\"og:description\" content=\"Exhaustive, simple, beautiful and concise. A truly Pythonic cheat sheet about Python programming language.\">\n  <meta property=\"og:site_name\" content=\"gto76.github.io\">\n  <meta property=\"og:image\" content=\"https://gto76.github.io/python-cheatsheet/web/image_social_4.png\">\n  <meta property=\"og:type\" content=\"article\">\n\n  <meta itemprop=\"url\" content=\"https://gto76.github.io/python-cheatsheet/\">\n  <meta itemprop=\"name\" content=\"Comprehensive Python Cheatsheet\">\n  <meta itemprop=\"description\" content=\"Exhaustive, simple, beautiful and concise. A truly Pythonic cheat sheet about Python programming language.\">\n  <meta itemprop=\"image\" content=\"https://gto76.github.io/python-cheatsheet/web/image_social_4.png\">\n\n  <meta name=\"google-site-verification\" content=\"w3rvuG0D1kUm_w20qsJecSEZh59Am8jK4eSPVU83e_M\">\n  <meta name=\"viewport\" id=\"viewport-meta\">\n</head>\n\n<body>\n  <header>\n    <aside>March 19, 2026</aside>\n    <a href=\"https://gto76.github.io\" rel=\"author\">Jure Šorn</a>\n  </header>\n\n   <div><h1 id=\"comprehensivepythoncheatsheet\">Comprehensive Python Cheatsheet</h1><p class=\"banner\"><sup><a href=\"https://raw.githubusercontent.com/gto76/python-cheatsheet/main/README.md\">Download text file</a>, <a href=\"https://github.com/gto76/python-cheatsheet\">Fork me on GitHub</a>, <a href=\"https://github.com/gto76/python-cheatsheet/wiki/Frequently-Asked-Questions\">Check out FAQ</a> or <a href=\"index.html?theme=dark3\">Switch to dark theme</a>.\n</sup></p><p class=\"banner\" style=\"margin-bottom: 20px; padding-bottom: 7px;\"><img src=\"web/image_888.jpeg\" alt=\"Monty Python\"></p><script>\n  // Changes the banner image and link-to-theme if \"theme=dark\" is in query string\n  // or if browser prefers dark mode and theme is not explicitly set.\n\nconst theme_not_set_in_query = window.location.search.search(/[?&]theme=light/) == -1\nconst browser_prefers_dark = window.matchMedia('(prefers-color-scheme: dark)').matches;\n\n  if ((window.location.search.search(/[?&]theme=dark/) !== -1) || \n      (theme_not_set_in_query && browser_prefers_dark)) {\n    activateDarkMode();\n  }\n\n  function activateDarkMode() {\n    var link_to_theme = document.createElement(\"a\")\n    link_to_theme.href = \"index.html?theme=light\"\n    link_to_theme.text = \"Switch to light theme\"\n    document.getElementsByClassName(\"banner\")[0].firstChild.children[3].replaceWith(link_to_theme)\n\n    var img_dark = document.createElement(\"img\");\n    img_dark.src = \"web/image_orig_blue6.png\";\n    img_dark.alt = \"Monthy Python\";\n    if ((window.location.search.search(/[?&]theme=dark2/) !== -1) ||\n        (window.location.search.search(/[?&]theme=dark3/) !== -1) ||\n        (theme_not_set_in_query && browser_prefers_dark)) {\n      img_dark.style = \"width: 910px;\";\n    } else {\n      img_dark.style = \"width: 960px;\";\n    }\n    document.getElementsByClassName(\"banner\")[1].firstChild.replaceWith(img_dark);\n  }\n</script><pre style=\"border-left: none;padding-left: 1.9px;\"><code class=\"hljs bash\" style=\"line-height: 1.327em;\"><strong>ToC</strong> = {\n    <strong><span class=\"hljs-string\"><span class=\"hljs-string\">'1. Collections'</span></span></strong>: [<a href=\"#list\">List</a>, <a href=\"#dictionary\">Dictionary</a>, <a href=\"#set\">Set</a>, <a href=\"#tuple\">Tuple</a>, <a href=\"#range\">Range</a>, <a href=\"#enumerate\">Enumerate</a>, <a href=\"#iterator\">Iterator</a>, <a href=\"#generator\">Generator</a>],\n    <strong><span class=\"hljs-string\"><span class=\"hljs-string\">'2. Types'</span></span></strong>:       [<a href=\"#type\">Type</a>, <a href=\"#string\">String</a>, <a href=\"#regex\">Regular_Exp</a>, <a href=\"#format\">Format</a>, <a href=\"#numbers\">Numbers</a>, <a href=\"#combinatorics\">Combinatorics</a>, <a href=\"#datetime\">Datetime</a>],\n    <strong><span class=\"hljs-string\"><span class=\"hljs-string\">'3. Syntax'</span></span></strong>:      [<a href=\"#function\">Function</a>, <a href=\"#inline\">Inline</a>, <a href=\"#imports\">Import</a>, <a href=\"#decorator\">Decorator</a>, <a href=\"#class\">Class</a>, <a href=\"#ducktypes\">Duck_Type</a>, <a href=\"#enum\">Enum</a>, <a href=\"#exceptions\">Except</a>],\n    <strong><span class=\"hljs-string\"><span class=\"hljs-string\">'4. System'</span></span></strong>:      [<a href=\"#exit\">Exit</a>, <a href=\"#print\">Print</a>, <a href=\"#input\">Input</a>, <a href=\"#commandlinearguments\">Command_Line_Arguments</a>, <a href=\"#open\">Open</a>, <a href=\"#paths\">Path</a>, <a href=\"#oscommands\">OS_Commands</a>],\n    <strong><span class=\"hljs-string\"><span class=\"hljs-string\">'5. Data'</span></span></strong>:        [<a href=\"#json\">JSON</a>, <a href=\"#pickle\">Pickle</a>, <a href=\"#csv\">CSV</a>, <a href=\"#sqlite\">SQLite</a>, <a href=\"#bytes\">Bytes</a>, <a href=\"#struct\">Struct</a>, <a href=\"#array\">Array</a>, <a href=\"#memoryview\">Memory_View</a>, <a href=\"#deque\">Deque</a>],\n    <strong><span class=\"hljs-string\"><span class=\"hljs-string\">'6. Advanced'</span></span></strong>:    [<a href=\"#operator\">Operator</a>, <a href=\"#matchstatement\">Match_Statement</a>, <a href=\"#logging\">Logging</a>, <a href=\"#introspection\">Introspection</a>, <a href=\"#threading\">Threads</a>, <a href=\"#asyncio\">Asyncio</a>],\n    <strong><span class=\"hljs-string\"><span class=\"hljs-string\">'7. Libraries'</span></span></strong>:   [<a href=\"#progressbar\">Progress_Bar</a>, <a href=\"#plot\">Plot</a>, <a href=\"#table\">Table</a>, <a href=\"#consoleapp\">Console_App</a>, <a href=\"#guiapp\">GUI</a>, <a href=\"#scraping\">Scraping</a>, <a href=\"#webapp\">Web</a>, <a href=\"#profiling\">Profile</a>],\n    <strong><span class=\"hljs-string\"><span class=\"hljs-string\">'8. Multimedia'</span></span></strong>:  [<a href=\"#numpy\">NumPy</a>, <a href=\"#image\">Image</a>, <a href=\"#animation\">Animation</a>, <a href=\"#audio\">Audio</a>, <a href=\"#synthesizer\">Synthesizer</a>, <a href=\"#pygame\">Pygame</a>, <a href=\"#pandas\">Pandas</a>, <a href=\"#plotly\">Plotly</a>]\n}\n</code></pre></div>\n\n\n\n\n\n<div><h2 id=\"main\"><a href=\"#main\" name=\"main\">#</a>Main</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">if</span> __name__ == <span class=\"hljs-string\">'__main__'</span>:      <span class=\"hljs-comment\"># Skips indented lines of code if file was imported.</span>\n    main()                      <span class=\"hljs-comment\"># Executes user-defined `def main(): ...` function.</span>\n</code></pre></div>\n\n<div><h2 id=\"list\"><a href=\"#list\" name=\"list\">#</a>List</h2><pre><code class=\"python language-python hljs\">&lt;list&gt; = [&lt;el_1&gt;, &lt;el_2&gt;, ...]  <span class=\"hljs-comment\"># Creates new list object. E.g. `list_a = [1, 2, 3]`.</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;el&gt;   = &lt;list&gt;[index]          <span class=\"hljs-comment\"># First index is 0, last -1. Also `&lt;list&gt;[i] = &lt;el&gt;`.</span>\n&lt;list&gt; = &lt;list&gt;[&lt;slice&gt;]        <span class=\"hljs-comment\"># Also &lt;list&gt;[from_inclusive : to_exclusive : ±step].</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;list&gt;.append(&lt;el&gt;)             <span class=\"hljs-comment\"># Appends element to the end. Also `&lt;list&gt; += [&lt;el&gt;]`.</span>\n&lt;list&gt;.extend(&lt;collection&gt;)     <span class=\"hljs-comment\"># Appends multiple elements. Also `&lt;list&gt; += &lt;coll&gt;`.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;list&gt;.sort(reverse=<span class=\"hljs-keyword\">False</span>)      <span class=\"hljs-comment\"># Sorts the elements of the list in ascending order.</span>\n&lt;list&gt;.reverse()                <span class=\"hljs-comment\"># Reverses the order of elements. Takes linear time.</span>\n&lt;list&gt; = sorted(&lt;collection&gt;)   <span class=\"hljs-comment\"># Returns a new sorted list. Accepts `reverse=True`.</span>\n&lt;iter&gt; = reversed(&lt;list&gt;)       <span class=\"hljs-comment\"># Returns reversed iterator. Also list(&lt;iterator&gt;).</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;el&gt;  = max(&lt;collection&gt;)       <span class=\"hljs-comment\"># Returns the largest element. Also min(&lt;el_1&gt;, ...).</span>\n&lt;num&gt; = sum(&lt;collection&gt;)       <span class=\"hljs-comment\"># Returns a sum of elements. Also math.prod(&lt;coll&gt;).</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">elementwise_sum  = [sum(pair) <span class=\"hljs-keyword\">for</span> pair <span class=\"hljs-keyword\">in</span> zip(list_a, list_b)]\nsorted_by_second = sorted(&lt;coll&gt;, key=<span class=\"hljs-keyword\">lambda</span> pair: pair[<span class=\"hljs-number\">1</span>])\nsorted_by_both   = sorted(&lt;coll&gt;, key=<span class=\"hljs-keyword\">lambda</span> p: (p[<span class=\"hljs-number\">1</span>], p[<span class=\"hljs-number\">0</span>]))\nflatter_list     = list(itertools.chain.from_iterable(&lt;list&gt;))\n</code></pre>\n<ul>\n<li><strong>For details about sort(), sorted(), min() and max() see <a href=\"#sortable\">Sortable</a>.</strong></li>\n<li><strong>Module <a href=\"#operator\">operator</a> has function itemgetter() that can replace listed <a href=\"#lambda\">lambdas</a>.</strong></li>\n<li><strong>This text uses the term collection instead of <a href=\"#abstractbaseclasses\">iterable</a>. For rationale see <a href=\"#iterableducktypes\">duck types</a>.</strong></li>\n</ul>\n<pre><code class=\"python language-python hljs\">&lt;int&gt; = len(&lt;list/dict/set/…&gt;)  <span class=\"hljs-comment\"># Returns number of items. Doesn't accept iterators.</span>\n&lt;int&gt; = &lt;list&gt;.count(&lt;el&gt;)      <span class=\"hljs-comment\"># Counts occurrences. Also `if &lt;el&gt; in &lt;coll&gt;: ...`.</span>\n&lt;int&gt; = &lt;list&gt;.index(&lt;el&gt;)      <span class=\"hljs-comment\"># Returns index of first occ. or raises ValueError.</span>\n&lt;el&gt;  = &lt;list&gt;.pop()            <span class=\"hljs-comment\"># Removes item from the end (or at index if passed).</span>\n&lt;list&gt;.insert(&lt;int&gt;, &lt;el&gt;)      <span class=\"hljs-comment\"># Inserts item at index and shifts remaining items.</span>\n&lt;list&gt;.remove(&lt;el&gt;)             <span class=\"hljs-comment\"># Removes the first occurrence or raises ValueError.</span>\n&lt;list&gt;.clear()                  <span class=\"hljs-comment\"># Removes all items. Also provided by dict and set.</span>\n</code></pre>\n<div><h2 id=\"dictionary\"><a href=\"#dictionary\" name=\"dictionary\">#</a>Dictionary</h2><pre><code class=\"python language-python hljs\">&lt;dict&gt; = {key_1: val_1, key_2: val_2, ...}      <span class=\"hljs-comment\"># Use `&lt;dict&gt;[key]` to get or assign the value.</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;view&gt; = &lt;dict&gt;.keys()                          <span class=\"hljs-comment\"># A collection of keys reflecting all changes.</span>\n&lt;view&gt; = &lt;dict&gt;.values()                        <span class=\"hljs-comment\"># A collection of values that reflects changes.</span>\n&lt;view&gt; = &lt;dict&gt;.items()                         <span class=\"hljs-comment\"># Coll. of tuples. Each contains key and value.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">value  = &lt;dict&gt;.get(key, default=<span class=\"hljs-keyword\">None</span>)          <span class=\"hljs-comment\"># Returns 'default' argument if key is missing.</span>\nvalue  = &lt;dict&gt;.setdefault(key, default=<span class=\"hljs-keyword\">None</span>)   <span class=\"hljs-comment\"># Returns and writes 'default' if key is amiss.</span>\n&lt;dict&gt; = collections.defaultdict(&lt;type&gt;)        <span class=\"hljs-comment\"># Dict with automatic default value `&lt;type&gt;()`.</span>\n&lt;dict&gt; = collections.defaultdict(<span class=\"hljs-keyword\">lambda</span>: <span class=\"hljs-number\">1</span>)     <span class=\"hljs-comment\"># Dictionary with automatic default value `1`.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;dict&gt; = dict(&lt;collection&gt;)                     <span class=\"hljs-comment\"># Creates a dict from coll. of key-value pairs.</span>\n&lt;dict&gt; = dict(zip(keys, values))                <span class=\"hljs-comment\"># Creates key-value pairs from two collections.</span>\n&lt;dict&gt; = dict.fromkeys(keys [, value])          <span class=\"hljs-comment\"># Items get value None if only keys are passed.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;dict&gt;.update(&lt;dict&gt;)                           <span class=\"hljs-comment\"># Adds items to dict. Passed dict has priority.</span>\nvalue = &lt;dict&gt;.pop(key)                         <span class=\"hljs-comment\"># Removes item or raises KeyError when missing.</span>\n{k <span class=\"hljs-keyword\">for</span> k, v <span class=\"hljs-keyword\">in</span> &lt;dict&gt;.items() <span class=\"hljs-keyword\">if</span> v == <span class=\"hljs-number\">123</span>}      <span class=\"hljs-comment\"># Returns a set of keys whose value equals 123.</span>\n{k: v <span class=\"hljs-keyword\">for</span> k, v <span class=\"hljs-keyword\">in</span> &lt;dict&gt;.items() <span class=\"hljs-keyword\">if</span> k <span class=\"hljs-keyword\">in</span> keys}  <span class=\"hljs-comment\"># Returns a dict of items with specified keys.</span>\n</code></pre>\n<div><h3 id=\"counter\">Counter</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">from</span> collections <span class=\"hljs-keyword\">import</span> Counter\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>counter = Counter([<span class=\"hljs-string\">'blue'</span>, <span class=\"hljs-string\">'blue'</span>, <span class=\"hljs-string\">'red'</span>])\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>counter[<span class=\"hljs-string\">'yellow'</span>] += <span class=\"hljs-number\">3</span>\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>print(counter.most_common())\n[(<span class=\"hljs-string\">'yellow'</span>, <span class=\"hljs-number\">3</span>), (<span class=\"hljs-string\">'blue'</span>, <span class=\"hljs-number\">2</span>), (<span class=\"hljs-string\">'red'</span>, <span class=\"hljs-number\">1</span>)]\n</code></pre></div>\n\n<div><h2 id=\"set\"><a href=\"#set\" name=\"set\">#</a>Set</h2><pre><code class=\"python language-python hljs\">&lt;set&gt; = {&lt;el_1&gt;, &lt;el_2&gt;, ...}           <span class=\"hljs-comment\"># Coll. of unique items. Also set(), set(&lt;coll&gt;).</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;set&gt;.add(&lt;el&gt;)                         <span class=\"hljs-comment\"># Adds item to the set. Same as `&lt;set&gt; |= {&lt;el&gt;}`.</span>\n&lt;set&gt;.update(&lt;collection&gt; [, ...])      <span class=\"hljs-comment\"># Adds items to the set. Same as `&lt;set&gt; |= &lt;set&gt;`.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;set&gt;  = &lt;set&gt;.union(&lt;coll&gt;)            <span class=\"hljs-comment\"># Returns a set of all items. Also &lt;set&gt; | &lt;set&gt;.</span>\n&lt;set&gt;  = &lt;set&gt;.intersection(&lt;coll&gt;)     <span class=\"hljs-comment\"># Returns every shared item. Also &lt;set&gt; &amp; &lt;set&gt;.</span>\n&lt;set&gt;  = &lt;set&gt;.difference(&lt;coll&gt;)       <span class=\"hljs-comment\"># Returns set's unique items. Also &lt;set&gt; - &lt;set&gt;.</span>\n&lt;set&gt;  = &lt;set&gt;.symmetric_diff…(&lt;coll&gt;)  <span class=\"hljs-comment\"># Returns all nonshared items. Also &lt;set&gt; ^ &lt;set&gt;.</span>\n&lt;bool&gt; = &lt;set&gt;.issuperset(&lt;coll&gt;)       <span class=\"hljs-comment\"># Returns False when collection has unique items.</span>\n&lt;bool&gt; = &lt;set&gt;.issubset(&lt;coll&gt;)         <span class=\"hljs-comment\"># Is collection a superset? Also &lt;set&gt; &lt;= &lt;set&gt;.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;el&gt; = &lt;set&gt;.pop()                      <span class=\"hljs-comment\"># Removes one of items. Raises KeyError if empty.</span>\n&lt;set&gt;.remove(&lt;el&gt;)                      <span class=\"hljs-comment\"># Removes the item or raises KeyError if missing.</span>\n&lt;set&gt;.discard(&lt;el&gt;)                     <span class=\"hljs-comment\"># Same as remove() but it doesn't raise an error.</span>\n</code></pre>\n<div><h3 id=\"frozenset\">Frozen Set</h3><ul>\n<li><strong>Frozenset is immutable and hashable version of the normal set.</strong></li>\n<li><strong>That means it can be used as a key in a dictionary or as an item in a set.</strong></li>\n</ul><pre><code class=\"python language-python hljs\">&lt;frozenset&gt; = frozenset(&lt;collection&gt;)\n</code></pre></div>\n\n\n<div><h2 id=\"tuple\"><a href=\"#tuple\" name=\"tuple\">#</a>Tuple</h2><p><strong>Tuple is an immutable and hashable list.</strong></p><pre><code class=\"python language-python hljs\">&lt;tuple&gt; = ()                        <span class=\"hljs-comment\"># Returns an empty tuple. Also tuple(), tuple(&lt;coll&gt;).</span>\n&lt;tuple&gt; = (&lt;el&gt;,)                   <span class=\"hljs-comment\"># Returns a tuple with single element. Same as `&lt;el&gt;,`.</span>\n&lt;tuple&gt; = (&lt;el_1&gt;, &lt;el_2&gt; [, ...])  <span class=\"hljs-comment\"># Returns a tuple. Same as `&lt;el_1&gt;, &lt;el_2&gt; [, ...]`.</span>\n</code></pre></div>\n\n\n<div><h3 id=\"namedtuple\">Named Tuple</h3><p><strong>Tuple's subclass with named elements.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">from</span> collections <span class=\"hljs-keyword\">import</span> namedtuple\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>Point = namedtuple(<span class=\"hljs-string\">'Point'</span>, <span class=\"hljs-string\">'x y'</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>p = Point(<span class=\"hljs-number\">1</span>, y=<span class=\"hljs-number\">2</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>print(p)\nPoint(x=<span class=\"hljs-number\">1</span>, y=<span class=\"hljs-number\">2</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>p.x, p[<span class=\"hljs-number\">1</span>]\n(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>)\n</code></pre></div>\n\n\n<div><h2 id=\"range\"><a href=\"#range\" name=\"range\">#</a>Range</h2><p><strong>A sequence of evenly spaced integers.</strong></p><pre><code class=\"python language-python hljs\">&lt;range&gt; = range(stop)                <span class=\"hljs-comment\"># I.e. range(to_exclusive). Integers from 0 to `stop-1`.</span>\n&lt;range&gt; = range(start, stop)         <span class=\"hljs-comment\"># I.e. range(from_inc, to_exc). From start to `stop-1`.</span>\n&lt;range&gt; = range(start, stop, ±step)  <span class=\"hljs-comment\"># I.e. range(from_inclusive, to_exclusive, ±step_size).</span>\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>[i <span class=\"hljs-keyword\">for</span> i <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">3</span>)]\n[<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>]\n</code></pre>\n<div><h2 id=\"enumerate\"><a href=\"#enumerate\" name=\"enumerate\">#</a>Enumerate</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">for</span> i, el <span class=\"hljs-keyword\">in</span> enumerate(&lt;coll&gt;, start=<span class=\"hljs-number\">0</span>):  <span class=\"hljs-comment\"># Returns next element and its index on each pass.</span>\n    ...\n</code></pre></div>\n\n<div><h2 id=\"iterator\"><a href=\"#iterator\" name=\"iterator\">#</a>Iterator</h2><p><strong>Potentially endless stream of elements.</strong></p><pre><code class=\"python language-python hljs\">&lt;iter&gt; = iter(&lt;collection&gt;)              <span class=\"hljs-comment\"># Iterator that returns passed elements one by one.</span>\n&lt;iter&gt; = iter(&lt;func&gt;, to_exc)            <span class=\"hljs-comment\"># Calls `&lt;func&gt;()` until it receives 'to_exc' value.</span>\n&lt;iter&gt; = (&lt;expr&gt; <span class=\"hljs-keyword\">for</span> &lt;name&gt; <span class=\"hljs-keyword\">in</span> &lt;coll&gt;)   <span class=\"hljs-comment\"># E.g. `(i+1 for i in range(3))`. Evaluates lazily.</span>\n&lt;el&gt;   = next(&lt;iter&gt; [, default])        <span class=\"hljs-comment\"># Raises StopIteration or returns 'default' on end.</span>\n&lt;list&gt; = list(&lt;iter&gt;)                    <span class=\"hljs-comment\"># Returns a list of iterator's remaining elements.</span>\n</code></pre></div>\n\n\n<ul>\n<li><strong>For loops call <code class=\"python hljs\"><span class=\"hljs-string\">'iter(&lt;collection&gt;)'</span></code> at the start and <code class=\"python hljs\"><span class=\"hljs-string\">'next(&lt;iter&gt;)'</span></code> on each pass.</strong></li>\n<li><strong>Calling <code class=\"python hljs\"><span class=\"hljs-string\">'iter(&lt;iter&gt;)'</span></code> returns unmodified iterator. For details see <a href=\"#iterator-1\">Iterator</a> duck type.</strong></li>\n</ul>\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> itertools <span class=\"hljs-keyword\">as</span> it\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;iter&gt; = it.count(start=<span class=\"hljs-number\">0</span>, step=<span class=\"hljs-number\">1</span>)       <span class=\"hljs-comment\"># Returns updated 'start' endlessly. Accepts floats.</span>\n&lt;iter&gt; = it.repeat(&lt;obj&gt; [, times])      <span class=\"hljs-comment\"># Returns passed element endlessly or 'times' times.</span>\n&lt;iter&gt; = it.cycle(&lt;collection&gt;)          <span class=\"hljs-comment\"># Repeats the sequence endlessly. Accepts iterators.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;iter&gt; = it.chain(&lt;coll&gt;, &lt;coll&gt;, ...)   <span class=\"hljs-comment\"># Returns each element of each collection in order.</span>\n&lt;iter&gt; = it.chain.from_iterable(&lt;coll&gt;)  <span class=\"hljs-comment\"># Accepts collection (i.e. iterable) of collections.</span>\n&lt;iter&gt; = it.islice(&lt;coll&gt;, stop)         <span class=\"hljs-comment\"># Also accepts 'start' and 'step'. Args can be None.</span>\n&lt;iter&gt; = it.product(&lt;coll&gt;, &lt;coll&gt;)      <span class=\"hljs-comment\"># Same as `((a, b) for a in arg_1 for b in arg_2)`.</span>\n</code></pre>\n<div><h2 id=\"generator\"><a href=\"#generator\" name=\"generator\">#</a>Generator</h2><ul>\n<li><strong>Any function that contains a yield statement returns a generator.</strong></li>\n<li><strong>Generators and iterators are interchangeable.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">count</span><span class=\"hljs-params\">(start, step)</span>:</span>\n    <span class=\"hljs-keyword\">while</span> <span class=\"hljs-keyword\">True</span>:\n        <span class=\"hljs-keyword\">yield</span> start\n        start += step\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>counter = count(<span class=\"hljs-number\">10</span>, <span class=\"hljs-number\">2</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>next(counter), next(counter), next(counter)\n(<span class=\"hljs-number\">10</span>, <span class=\"hljs-number\">12</span>, <span class=\"hljs-number\">14</span>)\n</code></pre>\n<div><h2 id=\"type\"><a href=\"#type\" name=\"type\">#</a>Type</h2><ul>\n<li><strong>Everything in Python is an object.</strong></li>\n<li><strong>Every object has a certain type.</strong></li>\n<li><strong>Type and class are synonymous.</strong></li>\n</ul><pre><code class=\"python language-python hljs\">&lt;type&gt; = type(&lt;obj&gt;)                  <span class=\"hljs-comment\"># Object's type. Same as `&lt;obj&gt;.__class__`.</span>\n&lt;bool&gt; = isinstance(&lt;obj&gt;, &lt;type&gt;)    <span class=\"hljs-comment\"># Same as `issubclass(type(&lt;obj&gt;), &lt;type&gt;)`.</span>\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>type(<span class=\"hljs-string\">'a'</span>), <span class=\"hljs-string\">'a'</span>.__class__, str\n(&lt;<span class=\"hljs-class\"><span class=\"hljs-title\">class</span> '<span class=\"hljs-title\">str</span>'&gt;, &lt;<span class=\"hljs-title\">class</span> '<span class=\"hljs-title\">str</span>'&gt;, &lt;<span class=\"hljs-title\">class</span> '<span class=\"hljs-title\">str</span>'&gt;)\n</span></code></pre>\n<div><h4 id=\"sometypesdonothavebuiltinnamessotheymustbeimported\">Some types do not have built-in names, so they must be imported:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> types <span class=\"hljs-keyword\">import</span> FunctionType, MethodType, LambdaType, GeneratorType\n</code></pre></div>\n\n<div><h3 id=\"abstractbaseclasses\">Abstract Base Classes</h3><p><strong>Each abstract base class specifies a set of virtual subclasses. These classes are then recognized by isinstance() and issubclass() as <a href=\"#subclass\">subclasses</a> of the ABC, although they are really not. An ABC can also manually decide whether or not a specific class is its virtual subclass, usually based on which methods that class has implemented. For instance, Iterable ABC looks for method iter(), while Collection ABC looks for iter(), contains() and len().</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">from</span> collections.abc <span class=\"hljs-keyword\">import</span> Iterable, Collection, Sequence\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>isinstance([<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>], Iterable)\n<span class=\"hljs-keyword\">True</span>\n</code></pre></div>\n\n\n<pre><code class=\"text language-text\">┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┓\n┃                  │  Iterable  │ Collection │  Sequence  ┃\n┠──────────────────┼────────────┼────────────┼────────────┨\n┃ list, range, str │     ✓      │     ✓      │     ✓      ┃\n┃ dict, set        │     ✓      │     ✓      │            ┃\n┃ iter             │     ✓      │            │            ┃\n┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┛\n</code></pre>\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">from</span> numbers <span class=\"hljs-keyword\">import</span> Number, Complex, Real, Rational, Integral\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>isinstance(<span class=\"hljs-number\">123</span>, Number)\n<span class=\"hljs-keyword\">True</span>\n</code></pre>\n<pre><code class=\"text language-text\">┏━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n┃                    │   Number  │  Complex  │   Real   │ Rational │ Integral ┃\n┠────────────────────┼───────────┼───────────┼──────────┼──────────┼──────────┨\n┃ int                │     ✓     │     ✓     │    ✓     │    ✓     │    ✓     ┃\n┃ fractions.Fraction │     ✓     │     ✓     │    ✓     │    ✓     │          ┃\n┃ float              │     ✓     │     ✓     │    ✓     │          │          ┃\n┃ complex            │     ✓     │     ✓     │          │          │          ┃\n┃ decimal.Decimal    │     ✓     │           │          │          │          ┃\n┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\n</code></pre>\n<div><h2 id=\"string\"><a href=\"#string\" name=\"string\">#</a>String</h2><p><strong>Immutable sequence of characters.</strong></p><pre><code class=\"python language-python hljs\">&lt;str&gt;  = <span class=\"hljs-string\">'abc'</span>                               <span class=\"hljs-comment\"># Also \"abc\". Interprets \\n, \\t, \\x00-\\xff, etc.</span>\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;str&gt;  = &lt;str&gt;.strip()                       <span class=\"hljs-comment\"># Strips all whitespace characters from both ends.</span>\n&lt;str&gt;  = &lt;str&gt;.strip(<span class=\"hljs-string\">'&lt;chars&gt;'</span>)              <span class=\"hljs-comment\"># Strips passed characters. Also lstrip/rstrip().</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;list&gt; = &lt;str&gt;.split()                       <span class=\"hljs-comment\"># Splits it on one or more whitespace characters.</span>\n&lt;list&gt; = &lt;str&gt;.split(sep=<span class=\"hljs-keyword\">None</span>, maxsplit=<span class=\"hljs-number\">-1</span>)  <span class=\"hljs-comment\"># Splits on 'sep' string at most 'maxsplit' times.</span>\n&lt;list&gt; = &lt;str&gt;.splitlines(keepends=<span class=\"hljs-keyword\">False</span>)    <span class=\"hljs-comment\"># On [\\n\\r\\f\\v\\x1c-\\x1e\\x85\\u2028\\u2029] and \\r\\n.</span>\n&lt;str&gt;  = &lt;str&gt;.join(&lt;coll_of_strings&gt;)       <span class=\"hljs-comment\"># Joins items by using the string as a separator.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;bool&gt; = &lt;sub_str&gt; <span class=\"hljs-keyword\">in</span> &lt;str&gt;                  <span class=\"hljs-comment\"># Returns True if string contains the substring.</span>\n&lt;bool&gt; = &lt;str&gt;.startswith(&lt;sub_str&gt;)         <span class=\"hljs-comment\"># Pass tuple of strings to give multiple options.</span>\n&lt;int&gt;  = &lt;str&gt;.find(&lt;sub_str&gt;)               <span class=\"hljs-comment\"># Returns start index of the first match or `-1`.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;str&gt;  = &lt;str&gt;.lower()                       <span class=\"hljs-comment\"># Lowers the case. Also upper/capitalize/title().</span>\n&lt;str&gt;  = &lt;str&gt;.casefold()                    <span class=\"hljs-comment\"># Lower() that converts ẞ/ß to ss, Σ/ς to σ, etc.</span>\n&lt;str&gt;  = &lt;str&gt;.replace(old, new [, count])   <span class=\"hljs-comment\"># Replaces 'old' with 'new' at most 'count' times.</span>\n&lt;str&gt;  = &lt;str&gt;.translate(table)              <span class=\"hljs-comment\"># Use `str.maketrans(&lt;dict&gt;)` to generate table.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;str&gt;  = chr(&lt;int&gt;)                          <span class=\"hljs-comment\"># Converts passed integer into Unicode character.</span>\n&lt;int&gt;  = ord(&lt;str&gt;)                          <span class=\"hljs-comment\"># Converts passed Unicode character into integer.</span>\n</code></pre>\n<ul>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'unicodedata.normalize(\"NFC\", &lt;str&gt;)'</span></code> on strings like <code class=\"python hljs\"><span class=\"hljs-string\">'Motörhead'</span></code> before comparing them to other strings, because <code class=\"python hljs\"><span class=\"hljs-string\">'ö'</span></code> can be stored as one or two characters.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'NFC'</span></code> converts such characters to a single character, while <code class=\"python hljs\"><span class=\"hljs-string\">'NFD'</span></code> converts them to two.</strong></li>\n</ul>\n<pre><code class=\"python language-python hljs\">&lt;bool&gt; = &lt;str&gt;.isdecimal()                   <span class=\"hljs-comment\"># Checks all chars for [0-9]. Also [०-९], [٠-٩].</span>\n&lt;bool&gt; = &lt;str&gt;.isdigit()                     <span class=\"hljs-comment\"># Checks for [²³¹…] and isdecimal(). Also [፩-፱].</span>\n&lt;bool&gt; = &lt;str&gt;.isnumeric()                   <span class=\"hljs-comment\"># Checks for [¼½¾…] and isdigit(). Also [零〇一…].</span>\n&lt;bool&gt; = &lt;str&gt;.isalnum()                     <span class=\"hljs-comment\"># Checks for [ABC…] and isnumeric(). Also [ªµº…].</span>\n&lt;bool&gt; = &lt;str&gt;.isprintable()                 <span class=\"hljs-comment\"># Checks for [ !\"#…], basic emojis and isalnum().</span>\n&lt;bool&gt; = &lt;str&gt;.isspace()                     <span class=\"hljs-comment\"># Checks for [ \\t\\n\\r\\f\\v\\x1c\\x1d\\x1e\\x1f\\x85…].</span>\n</code></pre>\n<div><h2 id=\"regex\"><a href=\"#regex\" name=\"regex\">#</a>Regex</h2><p><strong>Functions for regular expression matching.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> re\n&lt;str&gt;   = re.sub(<span class=\"hljs-string\">r'&lt;regex&gt;'</span>, new, text)  <span class=\"hljs-comment\"># Substitutes occurrences with string 'new'.</span>\n&lt;list&gt;  = re.findall(<span class=\"hljs-string\">r'&lt;regex&gt;'</span>, text)   <span class=\"hljs-comment\"># Returns all occurrences as string objects.</span>\n&lt;list&gt;  = re.split(<span class=\"hljs-string\">r'&lt;regex&gt;'</span>, text)     <span class=\"hljs-comment\"># Add brackets around regex to keep matches.</span>\n&lt;Match&gt; = re.search(<span class=\"hljs-string\">r'&lt;regex&gt;'</span>, text)    <span class=\"hljs-comment\"># Returns first occ. of the pattern or None.</span>\n&lt;Match&gt; = re.match(<span class=\"hljs-string\">r'&lt;regex&gt;'</span>, text)     <span class=\"hljs-comment\"># Only searches at the start of the 'text'.</span>\n&lt;iter&gt;  = re.finditer(<span class=\"hljs-string\">r'&lt;regex&gt;'</span>, text)  <span class=\"hljs-comment\"># Returns all occurrences as Match objects.</span>\n</code></pre></div>\n\n\n<ul>\n<li><strong>Raw string literals do not interpret escape sequences, thus enabling us to use the regex-specific escape sequences that cause SyntaxWarning in normal string literals (since 3.12).</strong></li>\n<li><strong>Argument <code class=\"python hljs\"><span class=\"hljs-string\">'new'</span></code> can also be a function that accepts a Match object and returns a string.</strong></li>\n<li><strong>Argument <code class=\"python hljs\"><span class=\"hljs-string\">'flags=re.IGNORECASE'</span></code> can be used with all functions that are listed above.</strong></li>\n<li><strong>Argument <code class=\"python hljs\"><span class=\"hljs-string\">'flags=re.MULTILINE'</span></code> makes <code class=\"python hljs\"><span class=\"hljs-string\">'^'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'$'</span></code> match the start/end of each line.</strong></li>\n<li><strong>Argument <code class=\"python hljs\"><span class=\"hljs-string\">'flags=re.DOTALL'</span></code> makes <code class=\"python hljs\"><span class=\"hljs-string\">'.'</span></code> also accept the <code class=\"python hljs\"><span class=\"hljs-string\">'\\n'</span></code> (besides all other chars).</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'re.compile(r\"&lt;regex&gt;\")'</span></code> returns a Pattern object with methods sub(), findall(), etc.</strong></li>\n</ul>\n<div><h3 id=\"matchobject\">Match Object</h3><pre><code class=\"python language-python hljs\">&lt;str&gt;   = &lt;Match&gt;.group()                <span class=\"hljs-comment\"># Returns the whole match. Also group(0).</span>\n&lt;str&gt;   = &lt;Match&gt;.group(<span class=\"hljs-number\">1</span>)               <span class=\"hljs-comment\"># Returns part inside the first brackets.</span>\n&lt;tuple&gt; = &lt;Match&gt;.groups()               <span class=\"hljs-comment\"># Returns all bracketed parts as strings.</span>\n&lt;int&gt;   = &lt;Match&gt;.start()                <span class=\"hljs-comment\"># Returns start index of the whole match.</span>\n&lt;int&gt;   = &lt;Match&gt;.end()                  <span class=\"hljs-comment\"># Returns the match's end index plus one.</span>\n</code></pre></div>\n\n<div><h3 id=\"specialsequences\">Special Sequences</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-string\">'\\d'</span> == <span class=\"hljs-string\">'[0-9]'</span>                          <span class=\"hljs-comment\"># Also [०-९…]. Matches decimal character.</span>\n<span class=\"hljs-string\">'\\w'</span> == <span class=\"hljs-string\">'[a-zA-Z0-9_]'</span>                   <span class=\"hljs-comment\"># Also [ª²³…]. Matches alphanumeric or _.</span>\n<span class=\"hljs-string\">'\\s'</span> == <span class=\"hljs-string\">'[ \\t\\n\\r\\f\\v]'</span>                  <span class=\"hljs-comment\"># Also [\\x1c-\\x1f…]. Matches whitespace.</span>\n</code></pre></div>\n\n<ul>\n<li><strong>By default, decimal characters and alphanumerics from all alphabets are matched unless <code class=\"python hljs\"><span class=\"hljs-string\">'flags=re.ASCII'</span></code> is used. It restricts special sequence matches to the first 128 Unicode characters and also prevents <code class=\"python hljs\"><span class=\"hljs-string\">'\\s'</span></code> from accepting <code class=\"python hljs\"><span class=\"hljs-string\">'\\x1c'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">'\\x1d'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">'\\x1e'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'\\x1f'</span></code> (non-printable characters that divide text into files, tables, rows and fields, respectively).</strong></li>\n<li><strong>Use a capital letter, i.e. <code class=\"python hljs\"><span class=\"hljs-string\">'\\D'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">'\\W'</span></code> or <code class=\"python hljs\"><span class=\"hljs-string\">'\\S'</span></code>, for negation. All non-ASCII characters are matched if ASCII flag is used in conjunction with a capital letter.</strong></li>\n</ul>\n<div><h2 id=\"format\"><a href=\"#format\" name=\"format\">#</a>Format</h2><pre><code class=\"python hljs\">&lt;str&gt; = <span class=\"hljs-string\">f'<span class=\"hljs-subst\">{&lt;obj&gt;}</span>, <span class=\"hljs-subst\">{&lt;obj&gt;}</span>'</span>            <span class=\"hljs-comment\"># Curly brackets can contain any expression.</span>\n&lt;str&gt; = <span class=\"hljs-string\">'{}, {}'</span>.format(&lt;obj&gt;, &lt;obj&gt;)  <span class=\"hljs-comment\"># Same as '{0}, {a}'.format(&lt;obj&gt;, a=&lt;obj&gt;).</span>\n&lt;str&gt; = <span class=\"hljs-string\">'%s, %s'</span> % (&lt;obj&gt;, &lt;obj&gt;)      <span class=\"hljs-comment\"># Redundant and inferior C-style formatting.</span>\n</code></pre></div>\n\n<div><h3 id=\"example\">Example</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>Person = collections.namedtuple(<span class=\"hljs-string\">'Person'</span>, <span class=\"hljs-string\">'name height'</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>person = Person(<span class=\"hljs-string\">'Jean-Luc'</span>, <span class=\"hljs-number\">187</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-string\">f'<span class=\"hljs-subst\">{person.name}</span> is <span class=\"hljs-subst\">{person.height / <span class=\"hljs-number\">100</span>}</span> meters tall.'</span>\n<span class=\"hljs-string\">'Jean-Luc is 1.87 meters tall.'</span>\n</code></pre></div>\n\n<div><h3 id=\"generaloptions\">General Options</h3><pre><code class=\"python language-python hljs\">{&lt;obj&gt;:&lt;<span class=\"hljs-number\">10</span>}                            <span class=\"hljs-comment\"># '&lt;obj&gt;     '.</span>\n{&lt;obj&gt;:^<span class=\"hljs-number\">10</span>}                            <span class=\"hljs-comment\"># '  &lt;obj&gt;   '.</span>\n{&lt;obj&gt;:&gt;<span class=\"hljs-number\">10</span>}                            <span class=\"hljs-comment\"># '     &lt;obj&gt;'.</span>\n{&lt;obj&gt;:.&lt;<span class=\"hljs-number\">10</span>}                           <span class=\"hljs-comment\"># '&lt;obj&gt;.....'.</span>\n{&lt;obj&gt;:<span class=\"hljs-number\">0</span>}                              <span class=\"hljs-comment\"># '&lt;obj&gt;'.</span>\n</code></pre></div>\n\n<ul>\n<li><strong>Objects are converted to strings with format() function, e.g. <code class=\"python hljs\"><span class=\"hljs-string\">'format(&lt;obj&gt;, \"&lt;10\")'</span></code>.</strong></li>\n<li><strong>Options can be generated dynamically via nested braces: <code class=\"python hljs\"><span class=\"hljs-string\">f'<span class=\"hljs-subst\">{&lt;obj&gt;:{&lt;str/int&gt;}</span>[…]}'</span></code>.</strong></li>\n<li><strong>Adding <code class=\"python hljs\"><span class=\"hljs-string\">'='</span></code> to the expression prepends it to its result, e.g. <code class=\"python hljs\"><span class=\"hljs-string\">f'<span class=\"hljs-subst\">{<span class=\"hljs-number\">1</span>+<span class=\"hljs-number\">1</span>=}</span>'</span></code> returns <code class=\"python hljs\"><span class=\"hljs-string\">'1+1=2'</span></code>.</strong></li>\n<li><strong>Adding <code class=\"python hljs\"><span class=\"hljs-string\">'!r'</span></code> to the expression first calls result's <a href=\"#class\">repr()</a> method and only then format().</strong></li>\n</ul>\n<div><h3 id=\"strings\">Strings</h3><pre><code class=\"python language-python hljs\">{<span class=\"hljs-string\">'abcde'</span>:<span class=\"hljs-number\">10</span>}                           <span class=\"hljs-comment\"># 'abcde     '.</span>\n{<span class=\"hljs-string\">'abcde'</span>:<span class=\"hljs-number\">10.3</span>}                         <span class=\"hljs-comment\"># 'abc       '.</span>\n{<span class=\"hljs-string\">'abcde'</span>:<span class=\"hljs-number\">.3</span>}                           <span class=\"hljs-comment\"># 'abc'.</span>\n{<span class=\"hljs-string\">'abcde'</span>!r:<span class=\"hljs-number\">10</span>}                         <span class=\"hljs-comment\"># \"'abcde'   \".</span>\n</code></pre></div>\n\n<div><h3 id=\"numbers-1\">Numbers</h3><pre><code class=\"python language-python hljs\">{<span class=\"hljs-number\">123456</span>:<span class=\"hljs-number\">10</span>}                            <span class=\"hljs-comment\"># '    123456'.</span>\n{<span class=\"hljs-number\">123456</span>:<span class=\"hljs-number\">10</span>,}                           <span class=\"hljs-comment\"># '   123,456'.</span>\n{<span class=\"hljs-number\">123456</span>:<span class=\"hljs-number\">10</span>_}                           <span class=\"hljs-comment\"># '   123_456'.</span>\n{<span class=\"hljs-number\">123456</span>:+<span class=\"hljs-number\">10</span>}                           <span class=\"hljs-comment\"># '   +123456'.</span>\n{<span class=\"hljs-number\">123456</span>:=+<span class=\"hljs-number\">10</span>}                          <span class=\"hljs-comment\"># '+   123456'.</span>\n{<span class=\"hljs-number\">123456</span>: }                             <span class=\"hljs-comment\"># ' 123456'.</span>\n{<span class=\"hljs-number\">-123456</span>: }                            <span class=\"hljs-comment\"># '-123456'.</span>\n</code></pre></div>\n\n<div><h3 id=\"floats\">Floats</h3><pre><code class=\"python language-python hljs\">{<span class=\"hljs-number\">1.23456</span>:<span class=\"hljs-number\">10.3</span>}                         <span class=\"hljs-comment\"># '      1.23'.</span>\n{<span class=\"hljs-number\">1.23456</span>:<span class=\"hljs-number\">10.3</span>f}                        <span class=\"hljs-comment\"># '     1.235'.</span>\n{<span class=\"hljs-number\">1.23456</span>:<span class=\"hljs-number\">10.3</span>e}                        <span class=\"hljs-comment\"># ' 1.235e+00'.</span>\n{<span class=\"hljs-number\">1.23456</span>:<span class=\"hljs-number\">10.3</span>%}                        <span class=\"hljs-comment\"># '  123.456%'.</span>\n</code></pre></div>\n\n<div><h4 id=\"comparisonofpresentationtypes\">Comparison of presentation types:</h4><pre><code class=\"text language-text\">┏━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┓\n┃              │    {&lt;float&gt;}   │   {&lt;float&gt;:f}  │   {&lt;float&gt;:e}  │   {&lt;float&gt;:%}  ┃\n┠──────────────┼────────────────┼────────────────┼────────────────┼────────────────┨\n┃  0.000056789 │   '5.6789e-05' │    '0.000057'  │ '5.678900e-05' │    '0.005679%' ┃\n┃  0.00056789  │   '0.00056789' │    '0.000568'  │ '5.678900e-04' │    '0.056789%' ┃\n┃  0.0056789   │   '0.0056789'  │    '0.005679'  │ '5.678900e-03' │    '0.567890%' ┃\n┃  0.056789    │   '0.056789'   │    '0.056789'  │ '5.678900e-02' │    '5.678900%' ┃\n┃  0.56789     │   '0.56789'    │    '0.567890'  │ '5.678900e-01' │   '56.789000%' ┃\n┃  5.6789      │   '5.6789'     │    '5.678900'  │ '5.678900e+00' │  '567.890000%' ┃\n┃ 56.789       │  '56.789'      │   '56.789000'  │ '5.678900e+01' │ '5678.900000%' ┃\n┗━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛\n\n┏━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┓\n┃              │  {&lt;float&gt;:.2}  │  {&lt;float&gt;:.2f} │  {&lt;float&gt;:.2e} │  {&lt;float&gt;:.2%} ┃\n┠──────────────┼────────────────┼────────────────┼────────────────┼────────────────┨\n┃  0.000056789 │    '5.7e-05'   │      '0.00'    │   '5.68e-05'   │      '0.01%'   ┃\n┃  0.00056789  │    '0.00057'   │      '0.00'    │   '5.68e-04'   │      '0.06%'   ┃\n┃  0.0056789   │    '0.0057'    │      '0.01'    │   '5.68e-03'   │      '0.57%'   ┃\n┃  0.056789    │    '0.057'     │      '0.06'    │   '5.68e-02'   │      '5.68%'   ┃\n┃  0.56789     │    '0.57'      │      '0.57'    │   '5.68e-01'   │     '56.79%'   ┃\n┃  5.6789      │    '5.7'       │      '5.68'    │   '5.68e+00'   │    '567.89%'   ┃\n┃ 56.789       │    '5.7e+01'   │     '56.79'    │   '5.68e+01'   │   '5678.90%'   ┃\n┗━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛\n</code></pre></div>\n\n\n<ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'{&lt;num&gt;:g}'</span></code> is <code class=\"python hljs\"><span class=\"hljs-string\">'{&lt;float&gt;:.6}'</span></code> that strips <code class=\"python hljs\"><span class=\"hljs-string\">'.0'</span></code> and has exponent starting at <code class=\"python hljs\"><span class=\"hljs-string\">'1e+06'</span></code>.</strong></li>\n<li><strong>When both rounding up and rounding down are possible, the one that returns result with even last digit is chosen. Hence <code class=\"python hljs\"><span class=\"hljs-string\">'{6.5:.0f}'</span></code> becomes a <code class=\"python hljs\"><span class=\"hljs-string\">'6'</span></code>, while <code class=\"python hljs\"><span class=\"hljs-string\">'{7.5:.0f}'</span></code> an <code class=\"python hljs\"><span class=\"hljs-string\">'8'</span></code>.</strong></li>\n<li><strong>The last rule only effects numbers that can be represented exactly by a float (<code class=\"python hljs\"><span class=\"hljs-number\">.5</span></code>, <code class=\"python hljs\"><span class=\"hljs-number\">.25</span></code>, …).</strong></li>\n</ul>\n<div><h3 id=\"ints\">Ints</h3><pre><code class=\"python language-python hljs\">{<span class=\"hljs-number\">90</span>:c}                                 <span class=\"hljs-comment\"># Converts 90 to Unicode character 'Z'.</span>\n{<span class=\"hljs-number\">90</span>:b}                                 <span class=\"hljs-comment\"># Converts 90 to binary number '1011010'.</span>\n{<span class=\"hljs-number\">90</span>:X}                                 <span class=\"hljs-comment\"># Converts 90 to hexadecimal number '5A'.</span>\n</code></pre></div>\n\n<div><h2 id=\"numbers\"><a href=\"#numbers\" name=\"numbers\">#</a>Numbers</h2><pre><code class=\"python language-python hljs\">&lt;int&gt;      = int(&lt;float/str/bool&gt;)             <span class=\"hljs-comment\"># A whole number. Truncates floats.</span>\n&lt;float&gt;    = float(&lt;int/str/bool&gt;)             <span class=\"hljs-comment\"># 64-bit decimal. Also &lt;fl&gt;e±&lt;int&gt;.</span>\n&lt;complex&gt;  = complex(real=<span class=\"hljs-number\">0</span>, imag=<span class=\"hljs-number\">0</span>)           <span class=\"hljs-comment\"># Complex number. Also &lt;fl&gt; ± &lt;fl&gt;j.</span>\n&lt;Fraction&gt; = fractions.Fraction(numer, denom)  <span class=\"hljs-comment\"># `&lt;Fraction&gt; = &lt;Fraction&gt; / &lt;int&gt;`.</span>\n&lt;Decimal&gt;  = decimal.Decimal(&lt;str/int/tuple&gt;)  <span class=\"hljs-comment\"># `Decimal((1, (2,), 3)) == -2000`.</span>\n</code></pre></div>\n\n<ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'int(&lt;str&gt;)'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'float(&lt;str&gt;)'</span></code> raise ValueError exception if string is malformed.</strong></li>\n<li><strong>Decimal objects store numbers exactly, unlike most floats where <code class=\"python hljs\"><span class=\"hljs-string\">'1.1 + 2.2 != 3.3'</span></code>.</strong></li>\n<li><strong>Floats can be compared with: <code class=\"python hljs\"><span class=\"hljs-string\">'math.isclose(&lt;float&gt;, &lt;float&gt;, rel_tol=1e-9)'</span></code>.</strong></li>\n<li><strong>Precision of decimal operations is set with: <code class=\"python hljs\"><span class=\"hljs-string\">'decimal.getcontext().prec = &lt;int&gt;'</span></code>.</strong></li>\n<li><strong>Bools can be used anywhere ints can, since bool is a subclass of int: <code class=\"python hljs\"><span class=\"hljs-string\">'True + 1 == 2'</span></code>.</strong></li>\n</ul>\n<div><h3 id=\"builtinfunctions\">Built-in Functions</h3><pre><code class=\"python language-python hljs\">&lt;num&gt; = pow(&lt;num&gt;, &lt;num&gt;)                      <span class=\"hljs-comment\"># E.g. `pow(3, 4) == 3 ** 4 == 81`.</span>\n&lt;num&gt; = abs(&lt;num&gt;)                             <span class=\"hljs-comment\"># E.g. `abs(-50) == abs(50) == 50`.</span>\n&lt;num&gt; = round(&lt;num&gt; [, ±ndigits])              <span class=\"hljs-comment\"># E.g. `round(123.45, -1) == 120`.</span>\n&lt;num&gt; = min(&lt;coll_of_nums&gt;)                    <span class=\"hljs-comment\"># Also `max(&lt;num&gt;, &lt;num&gt; [, ...])`.</span>\n&lt;num&gt; = sum(&lt;coll_of_nums&gt;)                    <span class=\"hljs-comment\"># Also `math.prod(&lt;coll_of_nums&gt;)`.</span>\n</code></pre></div>\n\n<div><h3 id=\"math\">Math</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> math <span class=\"hljs-keyword\">import</span> floor, ceil, trunc            <span class=\"hljs-comment\"># Funcs that convert float into int.</span>\n<span class=\"hljs-keyword\">from</span> math <span class=\"hljs-keyword\">import</span> pi, inf, nan, isnan           <span class=\"hljs-comment\"># `inf*0` and `nan+1` return `nan`.</span>\n<span class=\"hljs-keyword\">from</span> math <span class=\"hljs-keyword\">import</span> sqrt, factorial               <span class=\"hljs-comment\"># `sqrt(-1)` will raise ValueError.</span>\n<span class=\"hljs-keyword\">from</span> math <span class=\"hljs-keyword\">import</span> sin, cos, tan                 <span class=\"hljs-comment\"># Also: degrees, radians, asin, etc.</span>\n<span class=\"hljs-keyword\">from</span> math <span class=\"hljs-keyword\">import</span> log, log10, log2              <span class=\"hljs-comment\"># Log() can accept 'base' argument.</span>\n</code></pre></div>\n\n<div><h3 id=\"statistics\">Statistics</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> statistics <span class=\"hljs-keyword\">import</span> mean, median, mode      <span class=\"hljs-comment\"># Mode returns most common element.</span>\n<span class=\"hljs-keyword\">from</span> statistics <span class=\"hljs-keyword\">import</span> variance, stdev         <span class=\"hljs-comment\"># Also `cuts = quantiles(data, n)`.</span>\n</code></pre></div>\n\n<div><h3 id=\"random\">Random</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> random <span class=\"hljs-keyword\">import</span> random, randint, uniform    <span class=\"hljs-comment\"># Also: gauss, choice, shuffle, etc.</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;float&gt; = random()                             <span class=\"hljs-comment\"># Selects random float from [0, 1).</span>\n&lt;num&gt;   = randint/uniform(a, b)                <span class=\"hljs-comment\"># Selects an int/float from [a, b].</span>\n&lt;float&gt; = gauss(mean, stdev)                   <span class=\"hljs-comment\"># Also triangular(low, high, mode).</span>\n&lt;el&gt;    = choice(&lt;sequence&gt;)                   <span class=\"hljs-comment\"># Doesn't modify. Also sample(p, n).</span>\nshuffle(&lt;list&gt;)                                <span class=\"hljs-comment\"># Works with all mutable sequences.</span>\n</code></pre>\n<div><h3 id=\"hexadecimalnumbers\">Hexadecimal Numbers</h3><pre><code class=\"python language-python hljs\">&lt;int&gt; = <span class=\"hljs-number\">0x</span>&lt;hex&gt;                                <span class=\"hljs-comment\"># E.g. `0xFf == 255`. Also 0b&lt;bin&gt;.</span>\n&lt;int&gt; = int(<span class=\"hljs-string\">'±&lt;hex&gt;'</span>, <span class=\"hljs-number\">16</span>)                      <span class=\"hljs-comment\"># Also int('±0x&lt;hex&gt;/±0b&lt;bin&gt;', 0).</span>\n&lt;str&gt; = hex(&lt;int&gt;)                             <span class=\"hljs-comment\"># Returns '[-]0x&lt;hex&gt;'. Also bin().</span>\n</code></pre></div>\n\n<div><h3 id=\"bitwiseoperators\">Bitwise Operators</h3><pre><code class=\"python language-python hljs\">&lt;int&gt; = &lt;int&gt; &amp; &lt;int&gt;                          <span class=\"hljs-comment\"># E.g. `0b1100 &amp; 0b1010 == 0b1000`.</span>\n&lt;int&gt; = &lt;int&gt; | &lt;int&gt;                          <span class=\"hljs-comment\"># E.g. `0b1100 | 0b1010 == 0b1110`.</span>\n&lt;int&gt; = &lt;int&gt; ^ &lt;int&gt;                          <span class=\"hljs-comment\"># E.g. `0b1100 ^ 0b1010 == 0b0110`.</span>\n&lt;int&gt; = &lt;int&gt; &lt;&lt; n_bits                        <span class=\"hljs-comment\"># E.g. `0b1111 &lt;&lt; 4 == 0b11110000`.</span>\n&lt;int&gt; = ~&lt;int&gt;                                 <span class=\"hljs-comment\"># E.g. `~0b1 == -(0b1+1) == -0b10`.</span>\n</code></pre></div>\n\n<div><h2 id=\"combinatorics\"><a href=\"#combinatorics\" name=\"combinatorics\">#</a>Combinatorics</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> itertools <span class=\"hljs-keyword\">as</span> it\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>list(it.product(<span class=\"hljs-string\">'abc'</span>, repeat=<span class=\"hljs-number\">2</span>))        <span class=\"hljs-comment\">#   a  b  c</span>\n[(<span class=\"hljs-string\">'a'</span>, <span class=\"hljs-string\">'a'</span>), (<span class=\"hljs-string\">'a'</span>, <span class=\"hljs-string\">'b'</span>), (<span class=\"hljs-string\">'a'</span>, <span class=\"hljs-string\">'c'</span>),         <span class=\"hljs-comment\"># a x  x  x</span>\n (<span class=\"hljs-string\">'b'</span>, <span class=\"hljs-string\">'a'</span>), (<span class=\"hljs-string\">'b'</span>, <span class=\"hljs-string\">'b'</span>), (<span class=\"hljs-string\">'b'</span>, <span class=\"hljs-string\">'c'</span>),         <span class=\"hljs-comment\"># b x  x  x</span>\n (<span class=\"hljs-string\">'c'</span>, <span class=\"hljs-string\">'a'</span>), (<span class=\"hljs-string\">'c'</span>, <span class=\"hljs-string\">'b'</span>), (<span class=\"hljs-string\">'c'</span>, <span class=\"hljs-string\">'c'</span>)]         <span class=\"hljs-comment\"># c x  x  x</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>list(it.permutations(<span class=\"hljs-string\">'abc'</span>, <span class=\"hljs-number\">2</span>))          <span class=\"hljs-comment\">#   a  b  c</span>\n[(<span class=\"hljs-string\">'a'</span>, <span class=\"hljs-string\">'b'</span>), (<span class=\"hljs-string\">'a'</span>, <span class=\"hljs-string\">'c'</span>),                     <span class=\"hljs-comment\"># a .  x  x</span>\n (<span class=\"hljs-string\">'b'</span>, <span class=\"hljs-string\">'a'</span>), (<span class=\"hljs-string\">'b'</span>, <span class=\"hljs-string\">'c'</span>),                     <span class=\"hljs-comment\"># b x  .  x</span>\n (<span class=\"hljs-string\">'c'</span>, <span class=\"hljs-string\">'a'</span>), (<span class=\"hljs-string\">'c'</span>, <span class=\"hljs-string\">'b'</span>)]                     <span class=\"hljs-comment\"># c x  x  .</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>list(it.combinations(<span class=\"hljs-string\">'abc'</span>, <span class=\"hljs-number\">2</span>))          <span class=\"hljs-comment\">#   a  b  c</span>\n[(<span class=\"hljs-string\">'a'</span>, <span class=\"hljs-string\">'b'</span>), (<span class=\"hljs-string\">'a'</span>, <span class=\"hljs-string\">'c'</span>),                     <span class=\"hljs-comment\"># a .  x  x</span>\n (<span class=\"hljs-string\">'b'</span>, <span class=\"hljs-string\">'c'</span>)                                  <span class=\"hljs-comment\"># b .  .  x</span>\n]                                            <span class=\"hljs-comment\"># c .  .  .</span>\n</code></pre>\n<div><h2 id=\"datetime\"><a href=\"#datetime\" name=\"datetime\">#</a>Datetime</h2><p><strong>Provides 'date', 'time', 'datetime' and 'timedelta' classes. All are immutable and hashable.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install python-dateutil</span>\n<span class=\"hljs-keyword\">from</span> datetime <span class=\"hljs-keyword\">import</span> date, time, datetime, timedelta, timezone\n<span class=\"hljs-keyword\">import</span> zoneinfo, dateutil.tz\n</code></pre></div>\n\n\n<pre><code class=\"python language-python apache hljs\">&lt;D&gt;  = date(year, month, day)               <span class=\"hljs-comment\"># Only accepts valid dates between AD 1 and 9999.</span>\n&lt;T&gt;  = time(hour=<span class=\"hljs-number\">0</span>, minute=<span class=\"hljs-number\">0</span>, second=<span class=\"hljs-number\">0</span>)     <span class=\"hljs-comment\"># Accepts `microsecond=0, tzinfo=None, fold=0`.</span>\n&lt;DT&gt; = datetime(year, month, day, hour=<span class=\"hljs-number\">0</span>)   <span class=\"hljs-comment\"># Accepts `minute=0, second=0, microsecond=0, …`.</span>\n&lt;TD&gt; = timedelta(weeks=<span class=\"hljs-number\">0</span>, days=<span class=\"hljs-number\">0</span>, hours=<span class=\"hljs-number\">0</span>)  <span class=\"hljs-comment\"># Accepts `minutes=0, seconds=0, microseconds=0`.</span>\n</code></pre>\n<ul>\n<li><strong>Times and datetimes that have defined timezone are called aware and ones that don't, naive. If time or datetime object is naive, it is presumed to be in the system's timezone.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'fold=1'</span></code> means the second pass in case of time jumping back (usually for one hour).</strong></li>\n<li><strong>Timedelta normalizes arguments to ±days, seconds (&lt; 86 400) and microseconds (&lt; 1M). Its str() method returns <code class=\"python hljs\"><span class=\"hljs-string\">'[±D, ]H:MM:SS[.…]'</span></code> and total_seconds() a float of seconds.</strong></li>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;D/DT&gt;.weekday()'</span></code> to get the day of the week as an int (with Monday being 0).</strong></li>\n</ul>\n<div><h3 id=\"now\">Now</h3><pre><code class=\"python language-python hljs\">&lt;D/DTn&gt; = D/DT.today()                      <span class=\"hljs-comment\"># Current local date or naive DT. Also DT.now().</span>\n&lt;DTa&gt;   = DT.now(&lt;tzinfo&gt;)                  <span class=\"hljs-comment\"># Aware DT from current time in passed timezone.</span>\n</code></pre></div>\n\n<ul>\n<li><strong>To extract time use <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;DTn&gt;.time()'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;DTa&gt;.time()'</span></code> or <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;DTa&gt;.timetz()'</span></code>.</strong></li>\n</ul>\n<div><h3 id=\"timezones\">Timezones</h3><pre><code class=\"python language-python apache hljs\">&lt;tzinfo&gt; = timezone.utc                     <span class=\"hljs-comment\"># Coordinated universal time. London without DST.</span>\n&lt;tzinfo&gt; = timezone(&lt;timedelta&gt;)            <span class=\"hljs-comment\"># Timezone with fixed offset from universal time.</span>\n&lt;tzinfo&gt; = dateutil.tz.tzlocal()            <span class=\"hljs-comment\"># Local timezone with dynamic offset from the UTC.</span>\n&lt;tzinfo&gt; = zoneinfo.ZoneInfo(<span class=\"hljs-string\">'&lt;iana_key&gt;'</span>)  <span class=\"hljs-comment\"># 'Continent/City_Name' zone with dynamic offset.</span>\n&lt;DTa&gt;    = &lt;DT&gt;.astimezone([&lt;tzinfo&gt;])      <span class=\"hljs-comment\"># Converts DT to the passed or local fixed zone.</span>\n&lt;Ta/DTa&gt; = &lt;T/DT&gt;.replace(tzinfo=&lt;tzinfo&gt;)  <span class=\"hljs-comment\"># Changes the timezone object without conversion.</span>\n</code></pre></div>\n\n<ul>\n<li><strong>Timezones returned by tzlocal(), ZoneInfo(), and implicit local timezone of naive objects have offsets that vary through time due to DST and historical changes of the base offset.</strong></li>\n<li><strong>To get ZoneInfo() to work on Windows run <code class=\"python hljs\"><span class=\"hljs-string\">'&gt; pip3 install tzdata'</span></code>.</strong></li>\n</ul>\n<div><h3 id=\"encode\">Encode</h3><pre><code class=\"python language-python apache hljs\">&lt;D/T/DT&gt; = D/T/DT.fromisoformat(&lt;str&gt;)      <span class=\"hljs-comment\"># Object from the ISO string. Raises ValueError.</span>\n&lt;DT&gt;     = DT.strptime(&lt;str&gt;, <span class=\"hljs-string\">'&lt;format&gt;'</span>)   <span class=\"hljs-comment\"># Naive or aware datetime from the custom string.</span>\n&lt;D/DTn&gt;  = D/DT.fromordinal(&lt;int&gt;)          <span class=\"hljs-comment\"># Date or DT from days since the Gregorian NYE 1.</span>\n&lt;DTn&gt;    = DT.fromtimestamp(&lt;float&gt;)        <span class=\"hljs-comment\"># A local naive DT from seconds since the epoch.</span>\n&lt;DTa&gt;    = DT.fromtimestamp(&lt;float&gt;, &lt;tz&gt;)  <span class=\"hljs-comment\"># An aware datetime from seconds since the epoch.</span>\n</code></pre></div>\n\n<ul>\n<li><strong>ISO strings come in following forms: <code class=\"python hljs\"><span class=\"hljs-string\">'YYYY-MM-DD'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">'HH:MM:SS.mmmuuu[±HH:MM]'</span></code>, or both separated by an arbitrary character. All parts following the hours are optional.</strong></li>\n<li><strong>Python uses the Unix epoch: <code class=\"python hljs\"><span class=\"hljs-string\">'1970-01-01 00:00 UTC'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">'1970-01-01 01:00 CET'</span></code>, …</strong></li>\n</ul>\n<div><h3 id=\"decode\">Decode</h3><pre><code class=\"python language-python hljs\">&lt;str&gt;    = &lt;D/T/DT&gt;.isoformat(sep=<span class=\"hljs-string\">'T'</span>)      <span class=\"hljs-comment\"># Also `timespec='auto/hours/minutes/seconds/…'`.</span>\n&lt;str&gt;    = &lt;D/T/DT&gt;.strftime(<span class=\"hljs-string\">'&lt;format&gt;'</span>)    <span class=\"hljs-comment\"># Returns custom string representation of object.</span>\n&lt;int&gt;    = &lt;D/DT&gt;.toordinal()               <span class=\"hljs-comment\"># Days since NYE 1, ignoring DT's time and zone.</span>\n&lt;float&gt;  = &lt;DTn&gt;.timestamp()                <span class=\"hljs-comment\"># Seconds since the epoch from a local naive DT.</span>\n&lt;float&gt;  = &lt;DTa&gt;.timestamp()                <span class=\"hljs-comment\"># Seconds since the epoch from an aware datetime.</span>\n</code></pre></div>\n\n<div><h3 id=\"format-1\">Format</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>dta = datetime.strptime(<span class=\"hljs-string\">'2025-08-14 23:39:00.00 +0200'</span>, <span class=\"hljs-string\">'%Y-%m-%d %H:%M:%S.%f %z'</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>dta.strftime(<span class=\"hljs-string\">\"%dth of %B '%y (%a), %I:%M %p %Z\"</span>)\n<span class=\"hljs-string\">\"14th of August '25 (Thu), 11:39 PM UTC+02:00\"</span>\n</code></pre></div>\n\n<ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'%z'</span></code> accepts <code class=\"python hljs\"><span class=\"hljs-string\">'±HH[:]MM'</span></code> and returns <code class=\"python hljs\"><span class=\"hljs-string\">'±HHMM'</span></code> or empty string if object is naive.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'%Z'</span></code> accepts <code class=\"python hljs\"><span class=\"hljs-string\">'UTC/GMT'</span></code> and local timezone's code and returns timezone's name, <code class=\"python hljs\"><span class=\"hljs-string\">'UTC[±HH:MM]'</span></code> if timezone is nameless, or an empty string if object is naive.</strong></li>\n</ul>\n<div><h3 id=\"arithmetics\">Arithmetics</h3><pre><code class=\"python language-python apache hljs\">&lt;bool&gt;   = &lt;D/T/DTn&gt; &gt; &lt;D/T/DTn&gt;            <span class=\"hljs-comment\"># Ignores time jumps (fold attribute). Also `==`.</span>\n&lt;bool&gt;   = &lt;DTa&gt;     &gt; &lt;DTa&gt;                <span class=\"hljs-comment\"># Ignores time jumps if they share tzinfo object.</span>\n&lt;TD&gt;     = &lt;D/DTn&gt;   - &lt;D/DTn&gt;              <span class=\"hljs-comment\"># Ignores jumps. Convert to UTC for actual delta.</span>\n&lt;TD&gt;     = &lt;DTa&gt;     - &lt;DTa&gt;                <span class=\"hljs-comment\"># Ignores jumps if they share the tzinfo object.</span>\n&lt;D/DT&gt;   = &lt;D/DT&gt;    ± &lt;TD&gt;                 <span class=\"hljs-comment\"># Returned datetime can fall into a missing hour.</span>\n&lt;TD&gt;     = &lt;TD&gt;      * &lt;float&gt;              <span class=\"hljs-comment\"># Also `&lt;TD&gt; = &lt;TD&gt; ± &lt;TD&gt;`, `&lt;TD&gt; = abs(&lt;TD&gt;)`.</span>\n&lt;float&gt;  = &lt;TD&gt;      / &lt;TD&gt;                 <span class=\"hljs-comment\"># Calling divmod(&lt;TD&gt;, &lt;TD&gt;) returns int and TD.</span>\n</code></pre></div>\n\n<div><h2 id=\"function\"><a href=\"#function\" name=\"function\">#</a>Function</h2><p><strong>Independent block of code that returns a value when called.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> &lt;<span class=\"hljs-title\">func_name</span>&gt;<span class=\"hljs-params\">(&lt;nondefault_args&gt;)</span>:</span> ...                  <span class=\"hljs-comment\"># E.g. `func(x, y):`.</span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> &lt;<span class=\"hljs-title\">func_name</span>&gt;<span class=\"hljs-params\">(&lt;default_args&gt;)</span>:</span> ...                     <span class=\"hljs-comment\"># E.g. `func(x=0, y=0):`.</span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> &lt;<span class=\"hljs-title\">func_name</span>&gt;<span class=\"hljs-params\">(&lt;nondefault_args&gt;, &lt;default_args&gt;)</span>:</span> ...  <span class=\"hljs-comment\"># E.g. `func(x, y=0):`.</span>\n</code></pre></div>\n\n\n<ul>\n<li><strong>Function returns None if it doesn't encounter the <code class=\"python hljs\"><span class=\"hljs-string\">'return &lt;object/expr&gt;'</span></code> statement.</strong></li>\n<li><strong>Run <code class=\"python hljs\"><span class=\"hljs-string\">'global &lt;var_name&gt;'</span></code> inside the function before assigning to the global variable.</strong></li>\n<li><strong>Value of a default argument is evaluated when function is first encountered in the scope.</strong></li>\n<li><strong>Any mutation of a default argument value will persist between function invocations!</strong></li>\n</ul>\n<div><h3 id=\"functioncall\">Function Call</h3><pre><code class=\"python language-python hljs\">&lt;obj&gt; = &lt;function&gt;(&lt;positional_args&gt;)                    <span class=\"hljs-comment\"># E.g. `func(0, 0)`.</span>\n&lt;obj&gt; = &lt;function&gt;(&lt;keyword_args&gt;)                       <span class=\"hljs-comment\"># E.g. `func(x=0, y=0)`.</span>\n&lt;obj&gt; = &lt;function&gt;(&lt;positional_args&gt;, &lt;keyword_args&gt;)    <span class=\"hljs-comment\"># E.g. `func(0, y=0)`.</span>\n</code></pre></div>\n\n<div><h2 id=\"splatoperator\"><a href=\"#splatoperator\" name=\"splatoperator\">#</a>Splat Operator</h2><p><strong>Splat expands a collection into positional arguments, while splatty-splat expands a dictionary into keyword arguments.</strong></p><pre><code class=\"python language-python hljs\">args, kwargs = (<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>), {<span class=\"hljs-string\">'z'</span>: <span class=\"hljs-number\">3</span>}\nfunc(*args, **kwargs)\n</code></pre></div>\n\n\n<div><h4 id=\"isthesameas\">Is the same as:</h4><pre><code class=\"python language-python hljs\">func(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, z=<span class=\"hljs-number\">3</span>)\n</code></pre></div>\n\n<div><h3 id=\"insidefunctiondefinition\">Inside Function Definition</h3><p><strong>Splat combines zero or more positional arguments into a tuple, while splatty-splat combines zero or more keyword arguments into a dictionary.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">add</span><span class=\"hljs-params\">(*a)</span>:</span>\n    <span class=\"hljs-keyword\">return</span> sum(a)\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>add(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>)\n<span class=\"hljs-number\">6</span>\n</code></pre>\n<div><h4 id=\"allowedcompositionsofargumentsandthewaystheycanbecalled\">Allowed compositions of arguments and the ways they can be called:</h4><pre><code class=\"text language-text\">┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\n┃                           │ func(x=<span class=\"hljs-number\">1</span>, y=<span class=\"hljs-number\">2</span>) │ func(<span class=\"hljs-number\">1</span>, y=<span class=\"hljs-number\">2</span>) │  func(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>)  ┃\n┠───────────────────────────┼────────────────┼──────────────┼──────────────┨\n┃ <span class=\"hljs-title\">func</span>(x, *args, **kwargs): │       ✓        │      ✓       │      ✓       ┃\n┃ <span class=\"hljs-title\">func</span>(*args, y, **kwargs): │       ✓        │      ✓       │              ┃\n┃ <span class=\"hljs-title\">func</span>(*, x, **kwargs):     │       ✓        │              │              ┃\n┗━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n</code></pre></div>\n\n<div><h3 id=\"otheruses\">Other Uses</h3><pre><code class=\"python language-python hljs\">&lt;list&gt;  = [*&lt;collection&gt; [, ...]]  <span class=\"hljs-comment\"># Same as `list(&lt;coll&gt;) [+ ...]`.</span>\n&lt;tuple&gt; = (*&lt;collection&gt;, [...])   <span class=\"hljs-comment\"># Same as `tuple(&lt;coll&gt;) [+ ...]`.</span>\n&lt;set&gt;   = {*&lt;collection&gt; [, ...]}  <span class=\"hljs-comment\"># Same as `set(&lt;coll&gt;) [| ...]`.</span>\n&lt;dict&gt;  = {**&lt;dict&gt; [, ...]}       <span class=\"hljs-comment\"># Last dict has priority. Also |.</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">head, *body, tail = &lt;collection&gt;   <span class=\"hljs-comment\"># Head or tail can be omitted.</span>\n</code></pre>\n<div><h2 id=\"inline\"><a href=\"#inline\" name=\"inline\">#</a>Inline</h2><div><h3 id=\"lambda\">Lambda</h3><pre><code class=\"python language-python hljs\">&lt;func&gt; = <span class=\"hljs-keyword\">lambda</span>: &lt;return_value&gt;                    <span class=\"hljs-comment\"># A single statement function.</span>\n&lt;func&gt; = <span class=\"hljs-keyword\">lambda</span> &lt;arg_1&gt;, &lt;arg_2&gt;: &lt;return_value&gt;   <span class=\"hljs-comment\"># Also allows default arguments.</span>\n</code></pre></div></div>\n\n\n<div><h3 id=\"comprehensions\">Comprehensions</h3><pre><code class=\"python language-python hljs\">&lt;list&gt; = [i+<span class=\"hljs-number\">1</span> <span class=\"hljs-keyword\">for</span> i <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">5</span>)]                   <span class=\"hljs-comment\"># Returns `[1, 2, 3, 4, 5]`.</span>\n&lt;iter&gt; = (i <span class=\"hljs-keyword\">for</span> i <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">10</span>) <span class=\"hljs-keyword\">if</span> i &gt; <span class=\"hljs-number\">5</span>)           <span class=\"hljs-comment\"># Returns `iter([6, 7, 8, 9])`.</span>\n&lt;set&gt;  = {i+<span class=\"hljs-number\">5</span> <span class=\"hljs-keyword\">for</span> i <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">5</span>)}                   <span class=\"hljs-comment\"># Returns `{5, 6, 7, 8, 9}`.</span>\n&lt;dict&gt; = {i: i**<span class=\"hljs-number\">2</span> <span class=\"hljs-keyword\">for</span> i <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">4</span>)}            <span class=\"hljs-comment\"># Returns `{1: 1, 2: 4, 3: 9}`.</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>[l+r <span class=\"hljs-keyword\">for</span> l <span class=\"hljs-keyword\">in</span> <span class=\"hljs-string\">'abc'</span> <span class=\"hljs-keyword\">for</span> r <span class=\"hljs-keyword\">in</span> <span class=\"hljs-string\">'abc'</span>]            <span class=\"hljs-comment\"># Inner loop is on right side.</span>\n[<span class=\"hljs-string\">'aa'</span>, <span class=\"hljs-string\">'ab'</span>, <span class=\"hljs-string\">'ac'</span>, ..., <span class=\"hljs-string\">'cc'</span>]\n</code></pre>\n<div><h3 id=\"mapfilterreduce\">Map, Filter, Reduce</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> functools <span class=\"hljs-keyword\">import</span> reduce\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;iter&gt; = map(<span class=\"hljs-keyword\">lambda</span> x: x + <span class=\"hljs-number\">1</span>, range(<span class=\"hljs-number\">5</span>))            <span class=\"hljs-comment\"># Returns `iter([1, 2, 3, 4, 5])`.</span>\n&lt;iter&gt; = filter(<span class=\"hljs-keyword\">lambda</span> x: x &gt; <span class=\"hljs-number\">5</span>, range(<span class=\"hljs-number\">10</span>))        <span class=\"hljs-comment\"># Returns `iter([6, 7, 8, 9])`.</span>\n&lt;obj&gt;  = reduce(<span class=\"hljs-keyword\">lambda</span> out, x: out + x, range(<span class=\"hljs-number\">5</span>))  <span class=\"hljs-comment\"># Returns 10. Accepts 'initial'.</span>\n</code></pre>\n<div><h3 id=\"anyall\">Any, All</h3><pre><code class=\"python language-python hljs\">&lt;bool&gt; = any(&lt;collection&gt;)                         <span class=\"hljs-comment\"># Is bool(&lt;el&gt;) True for any el?</span>\n&lt;bool&gt; = all(&lt;collection&gt;)                         <span class=\"hljs-comment\"># Is it True for all (or empty)?</span>\n</code></pre></div>\n\n<div><h3 id=\"conditionalexpression\">Conditional Expression</h3><pre><code class=\"python language-python hljs\">&lt;obj&gt; = &lt;exp&gt; <span class=\"hljs-keyword\">if</span> &lt;condition&gt; <span class=\"hljs-keyword\">else</span> &lt;exp&gt;            <span class=\"hljs-comment\"># Evaluates only one expression.</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>[i <span class=\"hljs-keyword\">if</span> i <span class=\"hljs-keyword\">else</span> <span class=\"hljs-string\">'zero'</span> <span class=\"hljs-keyword\">for</span> i <span class=\"hljs-keyword\">in</span> (<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>)]     <span class=\"hljs-comment\"># `any(['', [], None])` is False.</span>\n[<span class=\"hljs-string\">'zero'</span>, <span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>]\n</code></pre>\n<div><h3 id=\"andor\">And, Or</h3><pre><code class=\"python language-python hljs\">&lt;obj&gt; = &lt;exp&gt; <span class=\"hljs-keyword\">and</span> &lt;exp&gt; [<span class=\"hljs-keyword\">and</span> ...]                  <span class=\"hljs-comment\"># Returns first false or last obj.</span>\n&lt;obj&gt; = &lt;exp&gt; <span class=\"hljs-keyword\">or</span> &lt;exp&gt; [<span class=\"hljs-keyword\">or</span> ...]                    <span class=\"hljs-comment\"># Returns first true or last obj.</span>\n</code></pre></div>\n\n<div><h3 id=\"walrusoperator\">Walrus Operator</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>[i <span class=\"hljs-keyword\">for</span> ch <span class=\"hljs-keyword\">in</span> <span class=\"hljs-string\">'0123'</span> <span class=\"hljs-keyword\">if</span> (i := int(ch)) &gt; <span class=\"hljs-number\">0</span>]     <span class=\"hljs-comment\"># Assigns to var in mid-sentence.</span>\n[<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>]\n</code></pre></div>\n\n<div><h3 id=\"namedtupleenumdataclass\">Named Tuple, Enum, Dataclass</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> collections <span class=\"hljs-keyword\">import</span> namedtuple\nPoint = namedtuple(<span class=\"hljs-string\">'Point'</span>, <span class=\"hljs-string\">'x y'</span>)                 <span class=\"hljs-comment\"># Creates tuple's subclass.</span>\npoint = Point(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">0</span>)                                <span class=\"hljs-comment\"># Returns its instance.</span>\n\n<span class=\"hljs-keyword\">from</span> enum <span class=\"hljs-keyword\">import</span> Enum\nDirection = Enum(<span class=\"hljs-string\">'Direction'</span>, <span class=\"hljs-string\">'N E S W'</span>)           <span class=\"hljs-comment\"># Creates an enumeration.</span>\ndirection = Direction.N                            <span class=\"hljs-comment\"># Returns its member.</span>\n\n<span class=\"hljs-keyword\">from</span> dataclasses <span class=\"hljs-keyword\">import</span> make_dataclass\nPlayer = make_dataclass(<span class=\"hljs-string\">'Player'</span>, [<span class=\"hljs-string\">'loc'</span>, <span class=\"hljs-string\">'dir'</span>])  <span class=\"hljs-comment\"># Creates a normal class.</span>\nplayer = Player(point, direction)                  <span class=\"hljs-comment\"># Returns its instance.</span>\n</code></pre></div>\n\n<div><h2 id=\"imports\"><a href=\"#imports\" name=\"imports\">#</a>Imports</h2><p><strong>Mechanism that makes code in one file available to another file.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> &lt;module&gt;                      <span class=\"hljs-comment\"># Imports a built-in module or the '&lt;module&gt;.py'.</span>\n<span class=\"hljs-keyword\">import</span> &lt;package&gt;                     <span class=\"hljs-comment\"># A built-in package or '&lt;package&gt;/__init__.py'.</span>\n<span class=\"hljs-keyword\">import</span> &lt;package&gt;.&lt;module&gt;            <span class=\"hljs-comment\"># A package's module or '&lt;package&gt;/&lt;module&gt;.py'.</span>\n<span class=\"hljs-keyword\">from</span> &lt;pkg/mod&gt;[.…] <span class=\"hljs-keyword\">import</span> &lt;obj&gt;      <span class=\"hljs-comment\"># Imports a module, function, class or variable.</span>\n</code></pre></div>\n\n\n<ul>\n<li><strong>Package is a collection of modules, but it can also define its own functions, variables, etc. On a filesystem this corresponds to a directory of Python files with an optional init script.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'import &lt;package&gt;'</span></code> only exposes modules that are imported inside <code class=\"python hljs\"><span class=\"hljs-string\">'__init__.py'</span></code>.</strong></li>\n<li><strong>Directory of the file that is passed to python command serves as the root of local imports.</strong></li>\n<li><strong>Use relative imports, i.e. <code class=\"python hljs\"><span class=\"hljs-string\">'from .[…][&lt;pkg/mod&gt;[.…]] import &lt;obj&gt;'</span></code>, if project has scattered entry points. Another option is to install the whole project by moving its code into 'src' dir, adding <a href=\"https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#basic-information\">'pyproject.toml'</a> to its root, and running <code class=\"python hljs\"><span class=\"hljs-string\">'$ pip3 install -e .'</span></code>.</strong></li>\n</ul>\n<div><h2 id=\"closure\"><a href=\"#closure\" name=\"closure\">#</a>Closure</h2><p><strong>We have/get a closure in Python when a nested function references a value of its enclosing function and then the enclosing function returns its nested function (any value that is ref­erenced from within multiple nested functions gets shared).</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_multiplier</span><span class=\"hljs-params\">(a)</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">out</span><span class=\"hljs-params\">(b)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> a * b\n    <span class=\"hljs-keyword\">return</span> out\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>multiply_by_3 = get_multiplier(<span class=\"hljs-number\">3</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>multiply_by_3(<span class=\"hljs-number\">10</span>)\n<span class=\"hljs-number\">30</span>\n</code></pre>\n<div><h3 id=\"partial\">Partial</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> functools <span class=\"hljs-keyword\">import</span> partial\n&lt;function&gt; = partial(&lt;function&gt; [, &lt;arg_1&gt; [, ...]])\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">multiply</span><span class=\"hljs-params\">(a, b)</span>:</span>\n<span class=\"hljs-meta\">... </span>    <span class=\"hljs-keyword\">return</span> a * b\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>multiply_by_3 = partial(multiply, <span class=\"hljs-number\">3</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>multiply_by_3(<span class=\"hljs-number\">10</span>)\n<span class=\"hljs-number\">30</span>\n</code></pre>\n<ul>\n<li><strong>Partial is also useful in cases when a function needs to be passed as an argument because it enables us to set its arguments beforehand (<code class=\"python hljs\"><span class=\"hljs-string\">'collections.defaultdict(&lt;func&gt;)'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">'iter(&lt;func&gt;, to_exc)'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'dataclasses.field(default_factory=&lt;func&gt;)'</span></code>).</strong></li>\n</ul>\n<div><h3 id=\"nonlocal\">Non-Local</h3><p><strong>If variable is being assigned to anywhere in the scope (i.e., body of a function), it is treated as&nbsp;a local variable unless it is declared <code class=\"python hljs\"><span class=\"hljs-string\">'global'</span></code> or <code class=\"python hljs\"><span class=\"hljs-string\">'nonlocal'</span></code> before its first usage.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_counter</span><span class=\"hljs-params\">()</span>:</span>\n    i = <span class=\"hljs-number\">0</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">out</span><span class=\"hljs-params\">()</span>:</span>\n        <span class=\"hljs-keyword\">nonlocal</span> i\n        i += <span class=\"hljs-number\">1</span>\n        <span class=\"hljs-keyword\">return</span> i\n    <span class=\"hljs-keyword\">return</span> out\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>counter = get_counter()\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>counter(), counter(), counter()\n(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>)\n</code></pre>\n<div class=\"pagebreak\"></div><div><h2 id=\"decorator\"><a href=\"#decorator\" name=\"decorator\">#</a>Decorator</h2><p><strong>A decorator takes a function, adds some functionality and returns it. It can be any <a href=\"#callable\">callable</a>, but is usually implemented as a function that returns a <a href=\"#closure\">closure</a>.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">@decorator_name</span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">function_that_gets_passed_to_decorator</span><span class=\"hljs-params\">()</span>:</span>\n    ...\n</code></pre></div>\n\n\n<div><h3 id=\"debuggerexample\">Debugger Example</h3><p><strong>Decorator that prints function's name every time that function is called.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> functools <span class=\"hljs-keyword\">import</span> wraps\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">debug</span><span class=\"hljs-params\">(func)</span>:</span>\n<span class=\"hljs-meta\">    @wraps(func)</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">out</span><span class=\"hljs-params\">(*args, **kwargs)</span>:</span>\n        print(func.__name__)\n        <span class=\"hljs-keyword\">return</span> func(*args, **kwargs)\n    <span class=\"hljs-keyword\">return</span> out\n\n<span class=\"hljs-meta\">@debug</span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">add</span><span class=\"hljs-params\">(x, y)</span>:</span>\n    <span class=\"hljs-keyword\">return</span> x + y\n</code></pre></div>\n\n\n<ul>\n<li><strong>Wraps is a helper decorator that copies the metadata of the passed function (func) to the function it is decorating (out). Without it, <code class=\"python hljs\"><span class=\"hljs-string\">'add.__name__'</span></code> would return string <code class=\"python hljs\"><span class=\"hljs-string\">'out'</span></code>.</strong></li>\n</ul>\n<div><h3 id=\"cache\">Cache</h3><p><strong>Decorator that stores return values. All arguments must be hashable.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> functools <span class=\"hljs-keyword\">import</span> cache\n\n<span class=\"hljs-meta\">@cache</span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">fibonacci</span><span class=\"hljs-params\">(n)</span>:</span>\n    <span class=\"hljs-keyword\">return</span> n <span class=\"hljs-keyword\">if</span> n &lt; <span class=\"hljs-number\">2</span> <span class=\"hljs-keyword\">else</span> fibonacci(n<span class=\"hljs-number\">-2</span>) + fibonacci(n<span class=\"hljs-number\">-1</span>)\n</code></pre></div>\n\n\n<ul>\n<li><strong>Potential problem with cache is that it can grow indefinitely. To clear stored values run <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;func&gt;.cache_clear()'</span></code>, or use <code class=\"python hljs\"><span class=\"hljs-string\">'@lru_cache(maxsize=&lt;int&gt;)'</span></code> decorator instead.</strong></li>\n<li><strong>CPython interpreter limits recursion depth to 3000 by default. To increase this limit run <code class=\"python hljs\"><span class=\"hljs-string\">'sys.setrecursionlimit(&lt;int&gt;)'</span></code>.</strong></li>\n</ul>\n<div><h3 id=\"parametrizeddecorator\">Parametrized Decorator</h3><p><strong>Decorator that accepts arguments and returns a normal decorator.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> functools <span class=\"hljs-keyword\">import</span> wraps\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">debug</span><span class=\"hljs-params\">(print_result=<span class=\"hljs-keyword\">False</span>)</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">decorator</span><span class=\"hljs-params\">(func)</span>:</span>\n<span class=\"hljs-meta\">        @wraps(func)</span>\n        <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">out</span><span class=\"hljs-params\">(*args, **kwargs)</span>:</span>\n            result = func(*args, **kwargs)\n            print(func.__name__, result <span class=\"hljs-keyword\">if</span> print_result <span class=\"hljs-keyword\">else</span> <span class=\"hljs-string\">''</span>)\n            <span class=\"hljs-keyword\">return</span> result\n        <span class=\"hljs-keyword\">return</span> out\n    <span class=\"hljs-keyword\">return</span> decorator\n\n<span class=\"hljs-meta\">@debug(print_result=True)</span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">add</span><span class=\"hljs-params\">(x, y)</span>:</span>\n    <span class=\"hljs-keyword\">return</span> x + y\n</code></pre></div>\n\n\n<ul>\n<li><strong>Using only <code class=\"python hljs\"><span class=\"hljs-string\">'@debug'</span></code> to decorate the add() function would not work here, because debug would then receive the add() function as a 'print_result' argument. Decorators can how­ever manually check if the argument they received is a function and act accordingly.</strong></li>\n</ul>\n<div><h2 id=\"class\"><a href=\"#class\" name=\"class\">#</a>Class</h2><p><strong>A template for creating user-defined objects.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MyClass</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, a)</span>:</span>\n        self.a = a\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__str__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> str(self.a)\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__repr__</span><span class=\"hljs-params\">(self)</span>:</span>\n        class_name = self.__class__.__name__\n        <span class=\"hljs-keyword\">return</span> <span class=\"hljs-string\">f'<span class=\"hljs-subst\">{class_name}</span>(<span class=\"hljs-subst\">{self.a!r}</span>)'</span>\n\n<span class=\"hljs-meta\">    @classmethod</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_class_name</span><span class=\"hljs-params\">(cls)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> cls.__name__\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>obj = MyClass(<span class=\"hljs-number\">1</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>obj.a, str(obj), repr(obj)\n(<span class=\"hljs-number\">1</span>, <span class=\"hljs-string\">'1'</span>, <span class=\"hljs-string\">'MyClass(1)'</span>)\n</code></pre>\n<ul>\n<li><strong>Methods whose names start and end with two underscores are called special methods. They are executed when object is passed to a built-in function or used as an operand. For&nbsp;example, <code class=\"python hljs\"><span class=\"hljs-string\">'print(a)'</span></code> calls <code class=\"python hljs\"><span class=\"hljs-string\">'a.__str__()'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'a + b'</span></code> calls <code class=\"python hljs\"><span class=\"hljs-string\">'a.__add__(b)'</span></code>.</strong></li>\n<li><strong>Methods that are decorated with <code class=\"python hljs\"><span class=\"hljs-string\">'@staticmethod'</span></code> receive neither 'self' nor 'cls' arg.</strong></li>\n<li><strong>Return value of str() special method should be readable and of repr() unambiguous.</strong></li>\n<li><strong>All calls to str() special method are dispatched to repr() when only repr() is provided.</strong></li>\n</ul>\n<div><h4 id=\"expressionsthatcallthestrspecialmethod\">Expressions that call the str() special method:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-string\">f'<span class=\"hljs-subst\">{obj}</span>'</span>\nprint(obj)\nlogging.warning(obj)\n&lt;csv_writer&gt;.writerow([obj])\n</code></pre></div>\n\n<div><h4 id=\"expressionsthatcallthereprspecialmethod\">Expressions that call the repr() special method:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-string\">f'<span class=\"hljs-subst\">{obj!r}</span>'</span>\nprint/str/repr([obj])\nprint/str/repr({obj: obj})\nprint/str/repr(MyDataClass(obj))\n</code></pre></div>\n\n<div><h3 id=\"subclass\">Subclass</h3><ul>\n<li><strong>Inheritance is a mechanism that enables a class to extend some other class (i.e. sub­class&nbsp;to extend its parent), and by doing so inherit all of its methods and attributes.</strong></li>\n<li><strong>Subclass can then add its own methods and attributes or override inherited ones by reusing their names.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">Person</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, name)</span>:</span>\n        self.name = name\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__repr__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> <span class=\"hljs-string\">f'Person(<span class=\"hljs-subst\">{self.name!r}</span>)'</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__lt__</span><span class=\"hljs-params\">(self, other)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> self.name &lt; other.name\n\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">Employee</span><span class=\"hljs-params\">(Person)</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, name, staff_num)</span>:</span>\n        super().__init__(name)\n        self.staff_num = staff_num\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__repr__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> <span class=\"hljs-string\">f'Employee(<span class=\"hljs-subst\">{self.name!r}</span>, <span class=\"hljs-subst\">{self.staff_num}</span>)'</span>\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>people = [Person(<span class=\"hljs-string\">'Bob'</span>), Employee(<span class=\"hljs-string\">'Ann'</span>, <span class=\"hljs-number\">0</span>)]\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>sorted(people)\n[Employee(<span class=\"hljs-string\">'Ann'</span>, <span class=\"hljs-number\">0</span>), Person(<span class=\"hljs-string\">'Bob'</span>)]\n</code></pre>\n<div><h3 id=\"typeannotations\">Type Annotations</h3><ul>\n<li><strong>They add type hints to variables, arguments and functions (<code class=\"python hljs\"><span class=\"hljs-string\">'def f() -&gt; &lt;type&gt;:'</span></code>).</strong></li>\n<li><strong>Hints are used by type checkers like <a href=\"https://pypi.org/project/mypy/\">mypy</a>, data validation libraries such as <a href=\"https://pypi.org/project/pydantic/\">Pydantic</a> and lately also by <a href=\"https://pypi.org/project/Cython/\">Cython</a> compiler. However, they are not enforced by CPython interpreter.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> collections <span class=\"hljs-keyword\">import</span> abc\n\n&lt;name&gt;: &lt;type&gt; [| ...] [= &lt;obj&gt;]\n&lt;name&gt;: list/set/abc.Iterable/abc.Sequence[&lt;type&gt;] [= &lt;obj&gt;]\n&lt;name&gt;: tuple/dict[&lt;type&gt;, ...] [= &lt;obj&gt;]\n</code></pre></div>\n\n\n<div><h3 id=\"dataclass\">Dataclass</h3><p><strong>Decorator that uses class variables to generate init(), repr() and eq() special methods.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> dataclasses <span class=\"hljs-keyword\">import</span> dataclass, field, make_dataclass\n\n<span class=\"hljs-meta\">@dataclass(order=False, frozen=False)</span>\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> &lt;<span class=\"hljs-title\">class_name</span>&gt;:</span>\n    &lt;attr_name&gt;: &lt;type&gt;\n    &lt;attr_name&gt;: &lt;type&gt; = &lt;default_value&gt;\n    &lt;attr_name&gt;: list/dict/set = field(default_factory=list/dict/set)\n</code></pre></div>\n\n\n<ul>\n<li><strong>Objects can be made <a href=\"#sortable\">sortable</a> with <code class=\"python hljs\"><span class=\"hljs-string\">'order=True'</span></code> and immutable with <code class=\"python hljs\"><span class=\"hljs-string\">'frozen=True'</span></code>.</strong></li>\n<li><strong>For object to be <a href=\"#hashable\">hashable</a>, all attributes must be hashable and <code class=\"python hljs\"><span class=\"hljs-string\">'frozen'</span></code> must be <code class=\"python hljs\"><span class=\"hljs-string\">'True'</span></code>.</strong></li>\n<li><strong>Function field() is needed because <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;attr_name&gt;: list = []'</span></code> would make a list that is&nbsp;shared among all instances. Its 'default_factory' argument accepts any <a href=\"#callable\">callable</a> object.</strong></li>\n<li><strong>For attributes/arguments of arbitrary type use <code class=\"python hljs\"><span class=\"hljs-string\">'typing.Any'</span></code>.</strong></li>\n</ul>\n<div><h4 id=\"inline-1\">Inline:</h4><pre><code class=\"python language-python hljs\">P = make_dataclass(<span class=\"hljs-string\">'P'</span>, [<span class=\"hljs-string\">'x'</span>, <span class=\"hljs-string\">'y'</span>])\nP = make_dataclass(<span class=\"hljs-string\">'P'</span>, [(<span class=\"hljs-string\">'x'</span>, float), (<span class=\"hljs-string\">'y'</span>, float)])\nP = make_dataclass(<span class=\"hljs-string\">'P'</span>, [(<span class=\"hljs-string\">'x'</span>, float, <span class=\"hljs-number\">0</span>), (<span class=\"hljs-string\">'y'</span>, float, <span class=\"hljs-number\">0</span>)])\n</code></pre></div>\n\n<div><h3 id=\"property\">Property</h3><p><strong>Pythonic way of implementing getters and setters.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">Person</span>:</span>\n<span class=\"hljs-meta\">    @property</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">name</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> <span class=\"hljs-string\">' '</span>.join(self._name)\n\n<span class=\"hljs-meta\">    @name.setter</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">name</span><span class=\"hljs-params\">(self, value)</span>:</span>\n        self._name = value.split()\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>person = Person()\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>person.name = <span class=\"hljs-string\">'\\t Guido  van Rossum \\n'</span>\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>person.name\n<span class=\"hljs-string\">'Guido van Rossum'</span>\n</code></pre>\n<div><h3 id=\"slots\">Slots</h3><p><strong>Mechanism that restricts objects to listed attributes.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">Point</span>:</span>\n    __slots__ = [<span class=\"hljs-string\">'x'</span>, <span class=\"hljs-string\">'y'</span>]\n</code></pre></div>\n\n\n<div><h3 id=\"copy\">Copy</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> copy <span class=\"hljs-keyword\">import</span> copy, deepcopy\n&lt;object&gt; = copy/deepcopy(&lt;object&gt;)\n</code></pre></div>\n\n<div><h2 id=\"ducktypes\"><a href=\"#ducktypes\" name=\"ducktypes\">#</a>Duck Types</h2><p><strong>A duck type is an implicit type that prescribes a set of special methods. Any object that has those methods defined is considered a member of that duck type.</strong></p><div><h3 id=\"comparable\">Comparable</h3><ul>\n<li><strong>If eq() method is not overridden, it returns <code class=\"python hljs\"><span class=\"hljs-string\">'id(self) == id(other)'</span></code>, which is the same as <code class=\"python hljs\"><span class=\"hljs-string\">'self is other'</span></code>. That means all user-defined objects compare not equal by default (because id() returns object's memory address that is guaranteed to be unique).</strong></li>\n<li><strong>Only the left side object has eq() method called, unless it returns NotImplemented, in which case the right object is consulted. Result is False if both return NotImplemented.</strong></li>\n<li><strong>Method ne() (called by <code class=\"python hljs\"><span class=\"hljs-string\">'!='</span></code>) automatically works on any object that has eq() defined.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MyComparable</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, a)</span>:</span>\n        self.a = a\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__eq__</span><span class=\"hljs-params\">(self, other)</span>:</span>\n        <span class=\"hljs-keyword\">if</span> isinstance(other, type(self)):\n            <span class=\"hljs-keyword\">return</span> self.a == other.a\n        <span class=\"hljs-keyword\">return</span> <span class=\"hljs-built_in\">NotImplemented</span>\n</code></pre></div></div>\n\n\n\n\n<div><h3 id=\"hashable\">Hashable</h3><ul>\n<li><strong>Hashable object needs hash() and eq() methods and its hash value must never change.</strong></li>\n<li><strong>Hashable objects that compare equal must have the same hash value, meaning default hash() that returns <code class=\"python hljs\"><span class=\"hljs-string\">'id(self)'</span></code> will not do. That is why Python automatically makes classes unhashable if you only implement the eq() method.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MyHashable</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, a)</span>:</span>\n        self._a = a\n<span class=\"hljs-meta\">    @property</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">a</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> self._a\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__eq__</span><span class=\"hljs-params\">(self, other)</span>:</span>\n        <span class=\"hljs-keyword\">if</span> isinstance(other, type(self)):\n            <span class=\"hljs-keyword\">return</span> self.a == other.a\n        <span class=\"hljs-keyword\">return</span> <span class=\"hljs-built_in\">NotImplemented</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__hash__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> hash(self.a)\n</code></pre></div>\n\n\n<div><h3 id=\"sortable\">Sortable</h3><ul>\n<li><strong>With 'total_ordering' decorator, you only need to provide eq() and one of lt(), gt(), le() or ge() special methods (called by &lt;, &gt;, &lt;=, &gt;=) and the rest will be automatically generated.</strong></li>\n<li><strong>Built-in functions sorted() and min() only require lt() method, while max() only requires gt(). However, it's best to define them all so that confusion doesn't arise in other contexts.</strong></li>\n<li><strong>When two lists, strings, or data classes are compared, their values get compared one by one until a pair of unequal values is found. The comparison of this two values is then re­turned. The shorter sequence is considered smaller in case of all their values being equal.</strong></li>\n<li><strong>To sort collection of strings in proper alphabetical order pass <code class=\"python hljs\"><span class=\"hljs-string\">'key=locale.strxfrm'</span></code> to sorted() after running <code class=\"python hljs\"><span class=\"hljs-string\">'locale.setlocale(locale.LC_COLLATE, \"en_US.UTF-8\")'</span></code>.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> functools <span class=\"hljs-keyword\">import</span> total_ordering\n\n<span class=\"hljs-meta\">@total_ordering</span>\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MySortable</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, a)</span>:</span>\n        self.a = a\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__eq__</span><span class=\"hljs-params\">(self, other)</span>:</span>\n        <span class=\"hljs-keyword\">if</span> isinstance(other, type(self)):\n            <span class=\"hljs-keyword\">return</span> self.a == other.a\n        <span class=\"hljs-keyword\">return</span> <span class=\"hljs-built_in\">NotImplemented</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__lt__</span><span class=\"hljs-params\">(self, other)</span>:</span>\n        <span class=\"hljs-keyword\">if</span> isinstance(other, type(self)):\n            <span class=\"hljs-keyword\">return</span> self.a &lt; other.a\n        <span class=\"hljs-keyword\">return</span> <span class=\"hljs-built_in\">NotImplemented</span>\n</code></pre></div>\n\n\n<div><h3 id=\"iterator-1\">Iterator</h3><ul>\n<li><strong>Any object that has methods next() and iter() is an iterator.</strong></li>\n<li><strong>Next() should return next item or raise StopIteration exception.</strong></li>\n<li><strong>Iter() should return unmodified iterator, i.e. the 'self' argument.</strong></li>\n<li><strong>Any object that has iter() method can be used in a for loop.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">Counter</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self)</span>:</span>\n        self.i = <span class=\"hljs-number\">0</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__next__</span><span class=\"hljs-params\">(self)</span>:</span>\n        self.i += <span class=\"hljs-number\">1</span>\n        <span class=\"hljs-keyword\">return</span> self.i\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__iter__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> self\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>counter = Counter()\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>next(counter), next(counter), next(counter)\n(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>)\n</code></pre>\n<div><h4 id=\"pythonhasmanydifferentiteratorobjects\">Python has many different iterator objects:</h4><ul>\n<li><strong>Sequence iterators returned by the <a href=\"#iterator\">iter()</a> function, such as list_iterator, etc.</strong></li>\n<li><strong>Objects returned by the <a href=\"#itertools\">itertools</a> module, such as count, repeat and cycle.</strong></li>\n<li><strong>Generators returned by the <a href=\"#generator\">generator functions</a> and <a href=\"#comprehensions\">generator expressions</a>.</strong></li>\n<li><strong>File objects returned by the <a href=\"#open\">open()</a> function, <a href=\"#sqlite\">SQLite</a> cursor objects, etc.</strong></li>\n</ul><div><h3 id=\"callable\">Callable</h3><ul>\n<li><strong>All functions and classes have a call() method that is executed when they are called.</strong></li>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'callable(&lt;obj&gt;)'</span></code> or <code class=\"python hljs\"><span class=\"hljs-string\">'isinstance(&lt;obj&gt;, collections.abc.Callable)'</span></code> to&nbsp;check if object is callable. You can also call the object and see if it raised TypeError.</strong></li>\n<li><strong>When this text uses <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;function&gt;'</span></code> as an argument, it actually means <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;callable&gt;'</span></code>.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">Counter</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self)</span>:</span>\n        self.i = <span class=\"hljs-number\">0</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__call__</span><span class=\"hljs-params\">(self)</span>:</span>\n        self.i += <span class=\"hljs-number\">1</span>\n        <span class=\"hljs-keyword\">return</span> self.i\n</code></pre></div></div>\n\n\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>counter = Counter()\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>counter(), counter(), counter()\n(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>)\n</code></pre>\n<div><h3 id=\"contextmanager\">Context Manager</h3><ul>\n<li><strong>With statements only work on objects that have enter() and exit() special methods.</strong></li>\n<li><strong>Enter() should lock the resources and optionally return an object (file, socket, etc.).</strong></li>\n<li><strong>Exit() should release the resources (for example close the file, release the lock, etc.).</strong></li>\n<li><strong>Any exception that happens inside the with block is passed to exit() method. Exit() can&nbsp;then suppress this exception by returning a true value (not None, False, 0, etc.).</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MyOpen</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, filename)</span>:</span>\n        self.filename = filename\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__enter__</span><span class=\"hljs-params\">(self)</span>:</span>\n        self.file = open(self.filename)\n        <span class=\"hljs-keyword\">return</span> self.file\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__exit__</span><span class=\"hljs-params\">(self, exc_type, exception, traceback)</span>:</span>\n        self.file.close()\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">with</span> open(<span class=\"hljs-string\">'test.txt'</span>, <span class=\"hljs-string\">'w'</span>) <span class=\"hljs-keyword\">as</span> file:\n<span class=\"hljs-meta\">... </span>    file.write(<span class=\"hljs-string\">'Hello World!'</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">with</span> MyOpen(<span class=\"hljs-string\">'test.txt'</span>) <span class=\"hljs-keyword\">as</span> file:\n<span class=\"hljs-meta\">... </span>    print(file.read())\nHello World!\n</code></pre>\n<div><h2 id=\"iterableducktypes\"><a href=\"#iterableducktypes\" name=\"iterableducktypes\">#</a>Iterable Duck Types</h2><div><h3 id=\"iterable\">Iterable</h3><ul>\n<li><strong>Only required method is iter(). It should return an iterator of object's items.</strong></li>\n<li><strong>Method contains() automatically works on any object that has iter() defined.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MyIterable</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, a)</span>:</span>\n        self.a = a\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__iter__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> iter(self.a)\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__contains__</span><span class=\"hljs-params\">(self, el)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> el <span class=\"hljs-keyword\">in</span> self.a\n</code></pre></div></div>\n\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>obj = MyIterable([<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>])\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>[el <span class=\"hljs-keyword\">for</span> el <span class=\"hljs-keyword\">in</span> obj]\n[<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>]\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-number\">1</span> <span class=\"hljs-keyword\">in</span> obj\n<span class=\"hljs-keyword\">True</span>\n</code></pre>\n<div><h3 id=\"collection\">Collection</h3><ul>\n<li><strong>Only required methods are iter() and len(). Len() should return the length of collection.</strong></li>\n<li><strong>This text refers to all iterable objects as collections, which is technically incorrect. The term <em>iterable</em> was avoided because it sounds scarier and more vague than <em>collection</em>. The main drawback of this decision is that the reader could think a certain function doesn't accept iterators when it actually does, since iterators are the only built-in objects that are&nbsp;iterable but are not collections.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MyCollection</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, a)</span>:</span>\n        self.a = a\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__iter__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> iter(self.a)\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__contains__</span><span class=\"hljs-params\">(self, el)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> el <span class=\"hljs-keyword\">in</span> self.a\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__len__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> len(self.a)\n</code></pre></div>\n\n\n<div><h3 id=\"sequence\">Sequence</h3><ul>\n<li><strong>Only required methods are getitem() and len(). Getitem() should return an item at the passed index or raise IndexError (it may also support negative indices and/or slices).</strong></li>\n<li><strong>Iter() and contains() automatically work on any object with defined getitem() method.</strong></li>\n<li><strong>Reversed() automatically works on any object that has getitem() and len() defined. It returns reversed iterator of object's items.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MySequence</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, a)</span>:</span>\n        self.a = a\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__iter__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> iter(self.a)\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__contains__</span><span class=\"hljs-params\">(self, el)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> el <span class=\"hljs-keyword\">in</span> self.a\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__len__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> len(self.a)\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__getitem__</span><span class=\"hljs-params\">(self, i)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> self.a[i]\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__reversed__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> reversed(self.a)\n</code></pre></div>\n\n\n<div><h4 id=\"discrepanciesbetweenglossarydefinitionsandabstractbaseclasses\">Discrepancies between glossary definitions and abstract base classes:</h4><ul>\n<li><strong>Python's glossary defines iterable as any object with special methods iter() or getitem(), and sequence as any object with getitem() and len(). It doesn't define the term <em>collection</em>.</strong></li>\n<li><strong>Passing ABC Iterable to isinstance() or issubclass() only checks whether object/class has special method iter(), while ABC Collection checks for iter(), contains() and len().</strong></li>\n</ul></div>\n\n\n\n\n<div><h3 id=\"abcsequence\">ABC Sequence</h3><ul>\n<li><strong>It's a richer interface than the basic sequence that also requires just getitem() and len().</strong></li>\n<li><strong>Extending it generates iter(), contains(), reversed(), index() and count() special methods.</strong></li>\n<li><strong>Unlike <code class=\"python hljs\"><span class=\"hljs-string\">'abc.Iterable'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'abc.Collection'</span></code>, it is not a duck type. That is why exp. <code class=\"python hljs\"><span class=\"hljs-string\">'issubclass(MySequence, abc.Sequence)'</span></code> would return False even if MySequence had all methods defined. It however recognizes list, tuple, range, string, bytes, bytearray, array, memoryview and deque, since they are registered as Sequence's virtual subclasses.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> collections <span class=\"hljs-keyword\">import</span> abc\n\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MyAbcSequence</span><span class=\"hljs-params\">(abc.Sequence)</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, a)</span>:</span>\n        self.a = a\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__len__</span><span class=\"hljs-params\">(self)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> len(self.a)\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__getitem__</span><span class=\"hljs-params\">(self, i)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> self.a[i]\n</code></pre></div><div><h4 id=\"tableofrequiredandautomaticallyavailablespecialmethods\">Table of required and automatically available special methods:</h4><pre><code class=\"text language-text\">┏━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\n┃            │  Iterable  │ Collection │  Sequence  │ abc.Sequence ┃\n┠────────────┼────────────┼────────────┼────────────┼──────────────┨\n┃ iter()     │     !      │     !      │     ✓      │      ✓       ┃\n┃ contains() │     ✓      │     ✓      │     ✓      │      ✓       ┃\n┃ len()      │            │     !      │     !      │      !       ┃\n┃ getitem()  │            │            │     !      │      !       ┃\n┃ reversed() │            │            │     ✓      │      ✓       ┃\n┃ index()    │            │            │            │      ✓       ┃\n┃ count()    │            │            │            │      ✓       ┃\n┗━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n</code></pre></div>\n\n<ul>\n<li><strong>Method iter() is required for <code class=\"python hljs\"><span class=\"hljs-string\">'isinstance(&lt;obj&gt;, abc.Iterable)'</span></code> to return True, however any object with getitem() method works with any code expecting an iterable.</strong></li>\n<li><strong>MutableSequence, Set, MutableSet, Mapping and MutableMapping ABCs are also ex­tendable. Use <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;abc&gt;.__abstractmethods__'</span></code> to get names of required methods.</strong></li>\n</ul>\n<div><h2 id=\"enum\"><a href=\"#enum\" name=\"enum\">#</a>Enum</h2><p><strong>Class of named constants called members.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> enum <span class=\"hljs-keyword\">import</span> Enum, auto\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> &lt;<span class=\"hljs-title\">enum_name</span>&gt;<span class=\"hljs-params\">(Enum)</span>:</span>\n    &lt;member_name&gt; = auto()              <span class=\"hljs-comment\"># An increment of last numeric value or 1.</span>\n    &lt;member_name&gt; = &lt;value&gt;             <span class=\"hljs-comment\"># Values don't have to be hashable/unique.</span>\n    &lt;member_name&gt; = &lt;el_1&gt;, &lt;el_2&gt;      <span class=\"hljs-comment\"># Value can be a collection, e.g. a tuple.</span>\n</code></pre>\n<ul>\n<li><strong>Methods receive the member they were called on as the 'self' argument.</strong></li>\n<li><strong>Accessing a member named after a reserved keyword causes SyntaxError.</strong></li>\n</ul>\n<pre><code class=\"python language-python hljs\">&lt;member&gt; = &lt;enum&gt;.&lt;member_name&gt;         <span class=\"hljs-comment\"># Accesses a member via enum's attribute.</span>\n&lt;member&gt; = &lt;enum&gt;[<span class=\"hljs-string\">'&lt;member_name&gt;'</span>]      <span class=\"hljs-comment\"># Returns the member or raises KeyError.</span>\n&lt;member&gt; = &lt;enum&gt;(&lt;value&gt;)              <span class=\"hljs-comment\"># Returns the member or raises ValueError.</span>\n&lt;str&gt;    = &lt;member&gt;.name                <span class=\"hljs-comment\"># Returns the member's name as a string.</span>\n&lt;obj&gt;    = &lt;member&gt;.value               <span class=\"hljs-comment\"># Value can't be a user-defined function.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;list&gt;   = list(&lt;enum&gt;)                 <span class=\"hljs-comment\"># Returns a list containing every member.</span>\n&lt;list&gt;   = &lt;enum&gt;._member_names_        <span class=\"hljs-comment\"># Returns a list containing member names.</span>\n&lt;list&gt;   = [m.value <span class=\"hljs-keyword\">for</span> m <span class=\"hljs-keyword\">in</span> &lt;enum&gt;]    <span class=\"hljs-comment\"># Returns a list containing member values.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;enum&gt;   = type(&lt;member&gt;)               <span class=\"hljs-comment\"># Returns an enum. Also &lt;memb&gt;.__class__.</span>\n&lt;iter&gt;   = itertools.cycle(&lt;enum&gt;)      <span class=\"hljs-comment\"># Returns an endless iterator of members.</span>\n&lt;member&gt; = random.choice(list(&lt;enum&gt;))  <span class=\"hljs-comment\"># Randomly selects one of enum's members.</span>\n</code></pre>\n<div><h3 id=\"inline-2\">Inline</h3><pre><code class=\"python language-python hljs\">Cutlery = Enum(<span class=\"hljs-string\">'Cutlery'</span>, <span class=\"hljs-string\">'FORK KNIFE SPOON'</span>)\nCutlery = Enum(<span class=\"hljs-string\">'Cutlery'</span>, [<span class=\"hljs-string\">'FORK'</span>, <span class=\"hljs-string\">'KNIFE'</span>, <span class=\"hljs-string\">'SPOON'</span>])\nCutlery = Enum(<span class=\"hljs-string\">'Cutlery'</span>, {<span class=\"hljs-string\">'FORK'</span>: <span class=\"hljs-number\">1</span>, <span class=\"hljs-string\">'KNIFE'</span>: <span class=\"hljs-number\">2</span>, <span class=\"hljs-string\">'SPOON'</span>: <span class=\"hljs-number\">3</span>})\n</code></pre></div>\n\n<div><h4 id=\"userdefinedfunctionscannotbevaluessotheymustbewrapped\">User-defined functions cannot be values, so they must be wrapped:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> functools <span class=\"hljs-keyword\">import</span> partial\nLogicOp = Enum(<span class=\"hljs-string\">'LogicOp'</span>, {<span class=\"hljs-string\">'AND'</span>: partial(<span class=\"hljs-keyword\">lambda</span> l, r: l <span class=\"hljs-keyword\">and</span> r),\n                           <span class=\"hljs-string\">'OR'</span>:  partial(<span class=\"hljs-keyword\">lambda</span> l, r: l <span class=\"hljs-keyword\">or</span> r)})\n</code></pre></div>\n\n<div><h2 id=\"exceptions\"><a href=\"#exceptions\" name=\"exceptions\">#</a>Exceptions</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">try</span>:\n    &lt;code&gt;\n<span class=\"hljs-keyword\">except</span> &lt;exception&gt;:\n    &lt;code&gt;\n</code></pre></div>\n\n<div><h3 id=\"complexexample\">Complex Example</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">try</span>:\n    &lt;code_1&gt;\n<span class=\"hljs-keyword\">except</span> &lt;exception_a&gt;:\n    &lt;code_2_a&gt;\n<span class=\"hljs-keyword\">except</span> &lt;exception_b&gt;:\n    &lt;code_2_b&gt;\n<span class=\"hljs-keyword\">else</span>:\n    &lt;code_2_c&gt;\n<span class=\"hljs-keyword\">finally</span>:\n    &lt;code_3&gt;\n</code></pre></div>\n\n<ul>\n<li><strong>Code inside the <code class=\"python hljs\"><span class=\"hljs-string\">'else'</span></code> block will only be executed if <code class=\"python hljs\"><span class=\"hljs-string\">'try'</span></code> block had no exceptions.</strong></li>\n<li><strong>Code inside the <code class=\"python hljs\"><span class=\"hljs-string\">'finally'</span></code> block will always be executed (unless a signal is received).</strong></li>\n<li><strong>All variables that are initialized in executed blocks are also visible in all subsequent blocks, as well as outside the try statement (only the function block delimits scope).</strong></li>\n<li><strong>To catch signals use <code class=\"python hljs\"><span class=\"hljs-string\">'signal.signal(signal_number, my_handler_function)'</span></code>.</strong></li>\n</ul>\n<div><h3 id=\"catchingexceptions\">Catching Exceptions</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">except</span> &lt;exception&gt;: ...\n<span class=\"hljs-keyword\">except</span> &lt;exception&gt; <span class=\"hljs-keyword\">as</span> &lt;name&gt;: ...\n<span class=\"hljs-keyword\">except</span> (&lt;exception&gt;, [...]): ...\n<span class=\"hljs-keyword\">except</span> (&lt;exception&gt;, [...]) <span class=\"hljs-keyword\">as</span> &lt;name&gt;: ...\n</code></pre></div>\n\n<ul>\n<li><strong>It also catches subclasses, e.g. <code class=\"python hljs\"><span class=\"hljs-string\">'ArithmeticError'</span></code> is caught by <code class=\"python hljs\"><span class=\"hljs-string\">'except Exception:'</span></code>.</strong></li>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'traceback.print_exc()'</span></code> to print the full error message to standard error stream.</strong></li>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'print(&lt;name&gt;)'</span></code> to print just the cause of the exception (its arguments) to stdout.</strong></li>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'logging.exception(&lt;str&gt;)'</span></code> to log the passed message, followed by the full error message of the caught exception. For details about how to set up the logger see <a href=\"#logging\">Logging</a>.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'sys.exc_info()'</span></code> returns type, object and traceback of the caught exception as a tuple.</strong></li>\n</ul>\n<div><h3 id=\"raisingexceptions\">Raising Exceptions</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">raise</span> &lt;exception&gt;\n<span class=\"hljs-keyword\">raise</span> &lt;exception&gt;()\n<span class=\"hljs-keyword\">raise</span> &lt;exception&gt;(&lt;obj&gt; [, ...])\n</code></pre></div>\n\n<div><h4 id=\"reraisingcaughtexception\">Re-raising caught exception:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">except</span> &lt;exception&gt; [<span class=\"hljs-keyword\">as</span> &lt;name&gt;]:\n    ...\n    <span class=\"hljs-keyword\">raise</span>\n</code></pre></div>\n\n<div><h3 id=\"exceptionobject\">Exception Object</h3><pre><code class=\"python language-python hljs\">arguments = &lt;name&gt;.args\nexc_type  = &lt;name&gt;.__class__\nfilename  = &lt;name&gt;.__traceback__.tb_frame.f_code.co_filename\nfunc_name = &lt;name&gt;.__traceback__.tb_frame.f_code.co_name\nline_str  = linecache.getline(filename, &lt;name&gt;.__traceback__.tb_lineno)\ntrace_str = <span class=\"hljs-string\">''</span>.join(traceback.format_tb(&lt;name&gt;.__traceback__))\nerror_msg = <span class=\"hljs-string\">''</span>.join(traceback.format_exception(*sys.exc_info()))\n</code></pre></div>\n\n<div><h3 id=\"builtinexceptions\">Built-in Exceptions</h3><pre><code class=\"text language-text\">BaseException\n ├── SystemExit                   <span class=\"hljs-comment\"># Raised when `sys.exit()` is called. See #Exit for details.</span>\n ├── KeyboardInterrupt            <span class=\"hljs-comment\"># Raised when the user hits the interrupt key, i.e. `ctrl-c`.</span>\n └── Exception                    <span class=\"hljs-comment\"># User-defined exceptions should be derived from this class.</span>\n      ├── ArithmeticError         <span class=\"hljs-comment\"># Base class for arithmetic errors such as ZeroDivisionError.</span>\n      ├── AssertionError          <span class=\"hljs-comment\"># Raised by `assert &lt;exp&gt;` if expression returns false value.</span>\n      ├── AttributeError          <span class=\"hljs-comment\"># Raised when object doesn't have requested attribute/method.</span>\n      ├── EOFError                <span class=\"hljs-comment\"># Raised by `input()` when it hits an end-of-file condition.</span>\n      ├── LookupError             <span class=\"hljs-comment\"># Base class for errors when a collection can't find an item.</span>\n      │    ├── IndexError         <span class=\"hljs-comment\"># Raised when index of a sequence (list/str) is out of range.</span>\n      │    └── KeyError           <span class=\"hljs-comment\"># Raised when a dictionary's key or a set element is missing.</span>\n      ├── MemoryError             <span class=\"hljs-comment\"># Out of memory. May be too late to start deleting variables.</span>\n      ├── NameError               <span class=\"hljs-comment\"># Raised when nonexistent name (variable/func/class) is used.</span>\n      │    └── UnboundLocalError  <span class=\"hljs-comment\"># Raised when a local name is used before it's being defined.</span>\n      ├── OSError                 <span class=\"hljs-comment\"># Errors such as FileExistsError and TimeoutError. See #Open.</span>\n      │    └── ConnectionError    <span class=\"hljs-comment\"># Errors such as BrokenPipeError and ConnectionAbortedError.</span>\n      ├── RuntimeError            <span class=\"hljs-comment\"># Is raised by errors that do not fit into other categories.</span>\n      │    ├── NotImplementedEr…  <span class=\"hljs-comment\"># Can be raised by abstract methods or by an unfinished code.</span>\n      │    └── RecursionError     <span class=\"hljs-comment\"># Raised if max recursion depth is exceeded (3k by default).</span>\n      ├── StopIteration           <span class=\"hljs-comment\"># Raised when exhausted (empty) iterator is passed to next().</span>\n      ├── TypeError               <span class=\"hljs-comment\"># Raised when argument of wrong type is passed to a function.</span>\n      └── ValueError              <span class=\"hljs-comment\"># Raised when it has the right type but inappropriate value.</span>\n</code></pre></div>\n\n<div><h4 id=\"collectionsandtheirexceptions\">Collections and their exceptions:</h4><pre><code class=\"text language-text\">┏━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┓\n┃           │    List    │    Set     │    Dict    ┃\n┠───────────┼────────────┼────────────┼────────────┨\n┃ getitem() │ IndexError │            │  KeyError  ┃\n┃ pop()     │ IndexError │  KeyError  │  KeyError  ┃\n┃ remove()  │ ValueError │  KeyError  │            ┃\n┃ index()   │ ValueError │            │            ┃\n┗━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┛\n</code></pre></div>\n\n<div><h4 id=\"usefulbuiltinexceptions\">Useful built-in exceptions:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">raise</span> TypeError(<span class=\"hljs-string\">'Function received argument of the wrong type!'</span>)\n<span class=\"hljs-keyword\">raise</span> ValueError(<span class=\"hljs-string\">'Argument has the right type but its value is off!'</span>)\n<span class=\"hljs-keyword\">raise</span> RuntimeError(<span class=\"hljs-string\">'I am too lazy to define my own exception!'</span>)\n</code></pre></div>\n\n<div><h3 id=\"userdefinedexceptions\">User-defined Exceptions</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MyError</span><span class=\"hljs-params\">(Exception)</span>:</span> <span class=\"hljs-keyword\">pass</span>\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> <span class=\"hljs-title\">MyInputError</span><span class=\"hljs-params\">(MyError)</span>:</span> <span class=\"hljs-keyword\">pass</span>\n</code></pre></div>\n\n<div><h2 id=\"exit\"><a href=\"#exit\" name=\"exit\">#</a>Exit</h2><p><strong>Exits the interpreter by raising SystemExit exception.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> sys\nsys.exit()                     <span class=\"hljs-comment\"># Exits with exit code 0 (success).</span>\nsys.exit(&lt;int&gt;)                <span class=\"hljs-comment\"># Exits with the passed exit code.</span>\nsys.exit(&lt;obj&gt;)                <span class=\"hljs-comment\"># Prints to stderr and exits with 1.</span>\n</code></pre></div>\n\n\n<div><h2 id=\"print\"><a href=\"#print\" name=\"print\">#</a>Print</h2><pre><code class=\"python language-python hljs\">print(&lt;el_1&gt;, ..., sep=<span class=\"hljs-string\">' '</span>, end=<span class=\"hljs-string\">'\\n'</span>, file=sys.stdout, flush=<span class=\"hljs-keyword\">False</span>)\n</code></pre></div>\n\n<ul>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'file=sys.stderr'</span></code> or <code class=\"python hljs\"><span class=\"hljs-string\">'sys.stderr.write(&lt;str&gt;)'</span></code> for messages about errors.</strong></li>\n<li><strong>Stdout and stderr streams hold output in a buffer until they receive a string containing '\\n' or '\\r', buffer reaches 4096 characters, <code class=\"python hljs\"><span class=\"hljs-string\">'flush=True'</span></code> is used, or the program exits.</strong></li>\n</ul>\n<div><h3 id=\"prettyprint\">Pretty Print</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> pprint <span class=\"hljs-keyword\">import</span> pprint\npprint(&lt;collection&gt;, width=<span class=\"hljs-number\">80</span>, depth=<span class=\"hljs-keyword\">None</span>, compact=<span class=\"hljs-keyword\">False</span>, sort_dicts=<span class=\"hljs-keyword\">True</span>)\n</code></pre></div>\n\n<ul>\n<li><strong>Each item is printed on its own line if collection exceeds 'width' characters.</strong></li>\n<li><strong>Nested collections that are <code class=\"python hljs\"><span class=\"hljs-string\">'depth=&lt;int&gt;'</span></code> levels deep get printed as <code class=\"python hljs\"><span class=\"hljs-string\">'...'</span></code>.</strong></li>\n</ul>\n<div><h2 id=\"input\"><a href=\"#input\" name=\"input\">#</a>Input</h2><pre><code class=\"python language-python hljs\">&lt;str&gt; = input()\n</code></pre></div>\n\n<ul>\n<li><strong>Reads a line from the user input or pipe if present (trailing newline gets stripped).</strong></li>\n<li><strong>If argument is passed, it gets printed to the standard output before input is read.</strong></li>\n<li><strong>EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or stream is already exhausted.</strong></li>\n</ul>\n<div><h2 id=\"commandlinearguments\"><a href=\"#commandlinearguments\" name=\"commandlinearguments\">#</a>Command Line Arguments</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> sys\nscripts_path = sys.argv[<span class=\"hljs-number\">0</span>]\narguments    = sys.argv[<span class=\"hljs-number\">1</span>:]\n</code></pre></div>\n\n<div><h3 id=\"argumentparser\">Argument Parser</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> argparse <span class=\"hljs-keyword\">import</span> ArgumentParser\np = ArgumentParser(description=&lt;str&gt;)                       <span class=\"hljs-comment\"># Also accepts 'usage' str.</span>\np.add_argument(<span class=\"hljs-string\">'-&lt;char&gt;'</span>, <span class=\"hljs-string\">'--&lt;name&gt;'</span>, action=<span class=\"hljs-string\">'store_true'</span>)  <span class=\"hljs-comment\"># Flag (defaults to False).</span>\np.add_argument(<span class=\"hljs-string\">'-&lt;char&gt;'</span>, <span class=\"hljs-string\">'--&lt;name&gt;'</span>, type=&lt;type&gt;)          <span class=\"hljs-comment\"># Option (defaults to None).</span>\np.add_argument(<span class=\"hljs-string\">'&lt;name&gt;'</span>, type=&lt;type&gt;, nargs=<span class=\"hljs-number\">1</span>)              <span class=\"hljs-comment\"># Mandatory first argument.</span>\np.add_argument(<span class=\"hljs-string\">'&lt;name&gt;'</span>, type=&lt;type&gt;, nargs=<span class=\"hljs-string\">'+'</span>)            <span class=\"hljs-comment\"># Mandatory remaining args.</span>\np.add_argument(<span class=\"hljs-string\">'&lt;name&gt;'</span>, type=&lt;type&gt;, nargs=<span class=\"hljs-string\">'?'</span>)            <span class=\"hljs-comment\"># Optional argument. Also *.</span>\nargs  = p.parse_args()                                      <span class=\"hljs-comment\"># Exits on a parsing error.</span>\n&lt;obj&gt; = args.&lt;name&gt;                                         <span class=\"hljs-comment\"># Returns `&lt;type&gt;(&lt;arg&gt;)`.</span>\n</code></pre></div>\n\n<ul>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'help=&lt;str&gt;'</span></code> to set argument description that is used by <code class=\"python hljs\"><span class=\"hljs-string\">'-h'</span></code>.</strong></li>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'default=&lt;obj&gt;'</span></code> to set option's or argument's default value.</strong></li>\n</ul>\n<div><h2 id=\"open\"><a href=\"#open\" name=\"open\">#</a>Open</h2><p><strong>Opens a file and returns the corresponding file object.</strong></p><pre><code class=\"python language-python hljs\">&lt;file&gt; = open(&lt;path&gt;, mode=<span class=\"hljs-string\">'r'</span>, encoding=<span class=\"hljs-keyword\">None</span>, newline=<span class=\"hljs-keyword\">None</span>)\n</code></pre></div>\n\n\n<ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'encoding=None'</span></code> means that a default encoding is used, which is platform dependent. Best practice is to use <code class=\"python hljs\"><span class=\"hljs-string\">'encoding=\"utf-8\"'</span></code> until it becomes the default (Python 3.15).</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'newline=None'</span></code> means that all different end of line combinations are converted to '\\n' on read, while on write all '\\n' characters are converted to the system's default separator.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'newline=\"\"'</span></code> means no conversions take place, but input is still broken into chunks by readline() on every '\\n', '\\r' and '\\r\\n'. Passing <code class=\"python hljs\"><span class=\"hljs-string\">'newline=\"\\n\"'</span></code> breaks input only on '\\n'.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'newline=\"\\r\\n\"'</span></code> breaks input only on '\\r\\n' and converts every '\\n' to '\\r\\n' on write.</strong></li>\n</ul>\n<div><h3 id=\"modes\">Modes</h3><ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'r'</span></code>  - Reads text from the file (the default option).</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'w'</span></code>  - Writes to the file. Deletes existing contents.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'x'</span></code>  - Writes or raises FileExistsError if file exists.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'a'</span></code>  - Appends. Creates new file if it doesn't exist.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'w+'</span></code> - Reads and writes. Deletes existing contents.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'r+'</span></code> - Reads and writes from the start of the file.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'a+'</span></code> - Reads and writes from the end of the file.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'rb'</span></code> - Reads <a href=\"#bytes\">bytes objects</a>. Also <code class=\"python hljs\"><span class=\"hljs-string\">'wb'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">'xb'</span></code>, etc.</strong></li>\n</ul><div><h3 id=\"exceptions-1\">Exceptions</h3><ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'FileNotFoundError'</span></code> can be raised when reading with <code class=\"python hljs\"><span class=\"hljs-string\">'r'</span></code> or <code class=\"python hljs\"><span class=\"hljs-string\">'r+'</span></code>.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'FileExistsError'</span></code> exception can be raised when writing with <code class=\"python hljs\"><span class=\"hljs-string\">'x'</span></code>.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'IsADirectoryError'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">'PermissionError'</span></code> can be raised by any.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'except OSError [as &lt;name&gt;]: …'</span></code> catches all listed exceptions.</strong></li>\n</ul><div><h3 id=\"fileobject\">File Object</h3><pre><code class=\"python language-python hljs\">&lt;file&gt;.seek(<span class=\"hljs-number\">0</span>)                      <span class=\"hljs-comment\"># Moves current position to the file's start.</span>\n&lt;file&gt;.seek(offset)                 <span class=\"hljs-comment\"># Moves 'offset' chars/bytes from the start.</span>\n&lt;file&gt;.seek(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">2</span>)                   <span class=\"hljs-comment\"># Moves current position to the end of file.</span>\n&lt;bin_file&gt;.seek(±offset, origin)    <span class=\"hljs-comment\"># Origin: 0 start, 1 current position, 2 end.</span>\n</code></pre></div></div></div>\n\n\n\n\n\n<pre><code class=\"python language-python hljs\">&lt;str/bytes&gt; = &lt;file&gt;.read(size=<span class=\"hljs-number\">-1</span>)  <span class=\"hljs-comment\"># Reads 'size' chars/bytes or until the EOF.</span>\n&lt;str/bytes&gt; = &lt;file&gt;.readline()     <span class=\"hljs-comment\"># Returns a line or empty string/bytes on EOF.</span>\n&lt;list&gt;      = &lt;file&gt;.readlines()    <span class=\"hljs-comment\"># Returns remaining lines. Also list(&lt;file&gt;).</span>\n&lt;str/bytes&gt; = next(&lt;file&gt;)          <span class=\"hljs-comment\"># Returns a line using the read-ahead buffer.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;file&gt;.write(&lt;str/bytes&gt;)           <span class=\"hljs-comment\"># Writes str or bytes object to write buffer.</span>\n&lt;file&gt;.writelines(&lt;collection&gt;)     <span class=\"hljs-comment\"># Writes a coll. of strings or bytes objects.</span>\n&lt;file&gt;.flush()                      <span class=\"hljs-comment\"># Flushes write buff. Runs every 4096/8192 B.</span>\n&lt;file&gt;.close()                      <span class=\"hljs-comment\"># Closes a file after flushing write buffer.</span>\n</code></pre>\n<ul>\n<li><strong>Methods do not add or strip trailing newlines, not even writelines().</strong></li>\n</ul>\n<div><h3 id=\"readtextfromfile\">Read Text from File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">read_file</span><span class=\"hljs-params\">(filename)</span>:</span>\n    <span class=\"hljs-keyword\">with</span> open(filename, encoding=<span class=\"hljs-string\">'utf-8'</span>) <span class=\"hljs-keyword\">as</span> file:\n        <span class=\"hljs-keyword\">return</span> file.readlines()\n</code></pre></div>\n\n<div><h3 id=\"writetexttofile\">Write Text to File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">write_to_file</span><span class=\"hljs-params\">(filename, text)</span>:</span>\n    <span class=\"hljs-keyword\">with</span> open(filename, <span class=\"hljs-string\">'w'</span>, encoding=<span class=\"hljs-string\">'utf-8'</span>) <span class=\"hljs-keyword\">as</span> file:\n        file.write(text)\n</code></pre></div>\n\n<div><h2 id=\"paths\"><a href=\"#paths\" name=\"paths\">#</a>Paths</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> os, glob\n<span class=\"hljs-keyword\">from</span> pathlib <span class=\"hljs-keyword\">import</span> Path\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;str&gt;  = os.getcwd()                <span class=\"hljs-comment\"># Returns working dir. Starts as shell's `$PWD`.</span>\n&lt;str&gt;  = os.path.join(&lt;path&gt;, ...)  <span class=\"hljs-comment\"># Uses `os.sep` to join strings or Path objects.</span>\n&lt;str&gt;  = os.path.realpath(&lt;path&gt;)   <span class=\"hljs-comment\"># Resolves symlinks and calls os.path.abspath().</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;str&gt;  = os.path.basename(&lt;path&gt;)   <span class=\"hljs-comment\"># Returns final component (filename or dirname).</span>\n&lt;str&gt;  = os.path.dirname(&lt;path&gt;)    <span class=\"hljs-comment\"># Returns the path without its final component.</span>\n&lt;tup.&gt; = os.path.splitext(&lt;path&gt;)   <span class=\"hljs-comment\"># Splits on last period of the final component.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;list&gt; = os.listdir(path=<span class=\"hljs-string\">'.'</span>)       <span class=\"hljs-comment\"># Returns all file/dir names located at 'path'.</span>\n&lt;list&gt; = glob.glob(<span class=\"hljs-string\">'&lt;pattern&gt;'</span>)     <span class=\"hljs-comment\"># Returns paths matching the wildcard pattern.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;bool&gt; = os.path.exists(&lt;path&gt;)     <span class=\"hljs-comment\"># Checks if path exists. Also &lt;Path&gt;.exists().</span>\n&lt;bool&gt; = os.path.isfile(&lt;path&gt;)     <span class=\"hljs-comment\"># Also &lt;Path&gt;.is_file(), &lt;DirEntry&gt;.is_file().</span>\n&lt;bool&gt; = os.path.isdir(&lt;path&gt;)      <span class=\"hljs-comment\"># Also &lt;Path&gt;.is_dir() and &lt;DirEntry&gt;.is_dir().</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;stat&gt; = os.stat(&lt;path&gt;)            <span class=\"hljs-comment\"># A status object. Also &lt;Path/DirEntry&gt;.stat().</span>\n&lt;num&gt;  = &lt;stat&gt;.st_size/st_mtime/…  <span class=\"hljs-comment\"># Returns size in bytes, modification time, ...</span>\n</code></pre>\n<div><h3 id=\"direntry\">DirEntry</h3><p><strong>Unlike listdir(), scandir() returns DirEntry objects that cache isfile, isdir, and on Windows also stat information, thus significantly increasing the performance of code that requires it.</strong></p><pre><code class=\"python language-python hljs\">&lt;iter&gt; = os.scandir(path=<span class=\"hljs-string\">'.'</span>)       <span class=\"hljs-comment\"># Returns DirEntry objects located at the path.</span>\n&lt;str&gt;  = &lt;DirEntry&gt;.path            <span class=\"hljs-comment\"># Is absolute if 'path' argument was absolute.</span>\n&lt;str&gt;  = &lt;DirEntry&gt;.name            <span class=\"hljs-comment\"># Returns the path's final component as string.</span>\n&lt;file&gt; = open(&lt;DirEntry&gt;)           <span class=\"hljs-comment\"># Opens the file and returns its file object.</span>\n</code></pre></div>\n\n\n<div><h3 id=\"pathobject\">Path Object</h3><pre><code class=\"python language-python hljs\">&lt;Path&gt; = Path(&lt;path&gt; [, ...])       <span class=\"hljs-comment\"># Accepts strings, Paths, and DirEntry objects.</span>\n&lt;Path&gt; = &lt;path&gt; / &lt;path&gt; [/ ...]    <span class=\"hljs-comment\"># First or second object must be a Path object.</span>\n&lt;Path&gt; = &lt;Path&gt;.resolve()           <span class=\"hljs-comment\"># Returns absolute path with resolved symlinks.</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;Path&gt; = Path()                     <span class=\"hljs-comment\"># Returns current working dir. Also Path('.').</span>\n&lt;Path&gt; = Path.cwd()                 <span class=\"hljs-comment\"># Returns absolute CWD. Also Path().resolve().</span>\n&lt;Path&gt; = Path.home()                <span class=\"hljs-comment\"># Returns the user's absolute home directory.</span>\n&lt;Path&gt; = Path(__file__).resolve()   <span class=\"hljs-comment\"># Returns module's path if CWD wasn't changed.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;Path&gt; = &lt;Path&gt;.parent              <span class=\"hljs-comment\"># Returns the path without its final component.</span>\n&lt;str&gt;  = &lt;Path&gt;.name                <span class=\"hljs-comment\"># Returns final component (i.e. file/dirname).</span>\n&lt;str&gt;  = &lt;Path&gt;.suffix              <span class=\"hljs-comment\"># Returns the name's last extension with a dot.</span>\n&lt;str&gt;  = &lt;Path&gt;.stem                <span class=\"hljs-comment\"># Returns the name without its last extension.</span>\n&lt;tup.&gt; = &lt;Path&gt;.parts               <span class=\"hljs-comment\"># Starts with '/' or 'C:\\' if path is absolute.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;iter&gt; = &lt;Path&gt;.iterdir()           <span class=\"hljs-comment\"># Returns directory contents as Path objects.</span>\n&lt;iter&gt; = &lt;Path&gt;.glob(<span class=\"hljs-string\">'&lt;pattern&gt;'</span>)   <span class=\"hljs-comment\"># Returns Paths matching the wildcard pattern.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;str&gt;  = str(&lt;Path&gt;)                <span class=\"hljs-comment\"># Returns path as string. Also &lt;Path&gt;.as_uri().</span>\n&lt;file&gt; = open(&lt;Path&gt;)               <span class=\"hljs-comment\"># Also &lt;Path&gt;.read_text/write_bytes/…(&lt;args&gt;).</span>\n</code></pre>\n<div><h2 id=\"oscommands\"><a href=\"#oscommands\" name=\"oscommands\">#</a>OS Commands</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> os, shutil\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">os.chdir(&lt;path&gt;)                 <span class=\"hljs-comment\"># Changes the current working directory (or CWD).</span>\nos.mkdir(&lt;path&gt;, mode=<span class=\"hljs-number\">0o777</span>)     <span class=\"hljs-comment\"># Creates a directory. Permissions are in octal.</span>\nos.makedirs(&lt;path&gt;, mode=<span class=\"hljs-number\">0o777</span>)  <span class=\"hljs-comment\"># Creates all path's dirs. Also `exist_ok=False`.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">shutil.copy(from, to)            <span class=\"hljs-comment\"># Copies the file ('to' can exist or be a dir).</span>\nshutil.copy2(from, to)           <span class=\"hljs-comment\"># Also copies the creation and modification time.</span>\nshutil.copytree(from, to)        <span class=\"hljs-comment\"># Copies the directory ('to' should not exist).</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">os.rename(from, to)              <span class=\"hljs-comment\"># Renames or moves the file or directory 'from'.</span>\nos.replace(from, to)             <span class=\"hljs-comment\"># Same, but overwrites file 'to' even on Windows.</span>\nshutil.move(from, to)            <span class=\"hljs-comment\"># `rename()` that moves into 'to' if it's a dir.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">os.remove(&lt;path&gt;)                <span class=\"hljs-comment\"># Deletes file. Also `$ pip3 install send2trash`.</span>\nos.rmdir(&lt;path&gt;)                 <span class=\"hljs-comment\"># Deletes empty dir. Raises OSError if it's not.</span>\nshutil.rmtree(&lt;path&gt;)            <span class=\"hljs-comment\"># Deletes the directory and all of its contents.</span>\n</code></pre>\n<ul>\n<li><strong>Passed paths can be either strings, Path objects, or DirEntry objects.</strong></li>\n<li><strong>Functions report errors by raising OSError or one of its <a href=\"#exceptions-1\">subclasses</a>.</strong></li>\n</ul>\n<div><h2 id=\"shellcommands\"><a href=\"#shellcommands\" name=\"shellcommands\">#</a>Shell Commands</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> os, subprocess, shlex\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;int&gt;  = os.system(<span class=\"hljs-string\">'&lt;commands&gt;'</span>)      <span class=\"hljs-comment\"># Runs commands in sh/cmd shell. Prints results.</span>\n&lt;proc&gt; = subprocess.run(<span class=\"hljs-string\">'&lt;command&gt;'</span>)  <span class=\"hljs-comment\"># For arguments see examples. Prints by default.</span>\n&lt;pipe&gt; = os.popen(<span class=\"hljs-string\">'&lt;commands&gt;'</span>)       <span class=\"hljs-comment\"># Prints only stderr. Soft deprecated since 3.14.</span>\n&lt;str&gt;  = &lt;pipe&gt;.read(size=<span class=\"hljs-number\">-1</span>)         <span class=\"hljs-comment\"># Returns combined stdout. Provides readline/s().</span>\n&lt;int&gt;  = &lt;pipe&gt;.close()               <span class=\"hljs-comment\"># Returns None if last command had returncode 0.</span>\n</code></pre>\n<div><h4 id=\"sends11tothebasiccalculatorandcapturesitsstdoutandstderrstreams\">Sends \"1 + 1\" to the basic calculator and captures its stdout and stderr streams:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>subprocess.run(<span class=\"hljs-string\">'bc'</span>, input=<span class=\"hljs-string\">'1 + 1\\n'</span>, capture_output=<span class=\"hljs-keyword\">True</span>, text=<span class=\"hljs-keyword\">True</span>)\nCompletedProcess(args=<span class=\"hljs-string\">'bc'</span>, returncode=<span class=\"hljs-number\">0</span>, stdout=<span class=\"hljs-string\">'2\\n'</span>, stderr=<span class=\"hljs-string\">''</span>)\n</code></pre></div>\n\n<div><h4 id=\"sendstestintothebcrunninginstandardmodeandsavesitsstdouttotestout\">Sends test.in to the 'bc' running in standard mode and saves its stdout to test.out:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">if</span> os.system(<span class=\"hljs-string\">'echo 1 + 1 &gt; test.in'</span>) == <span class=\"hljs-number\">0</span>:\n<span class=\"hljs-meta\">... </span>    <span class=\"hljs-keyword\">with</span> open(<span class=\"hljs-string\">'test.in'</span>) <span class=\"hljs-keyword\">as</span> file_in, open(<span class=\"hljs-string\">'test.out'</span>, <span class=\"hljs-string\">'w'</span>) <span class=\"hljs-keyword\">as</span> file_out:\n<span class=\"hljs-meta\">... </span>        subprocess.run(shlex.split(<span class=\"hljs-string\">'bc -s'</span>), stdin=file_in, stdout=file_out)\n<span class=\"hljs-meta\">... </span>    print(open(<span class=\"hljs-string\">'test.out'</span>).read())\n<span class=\"hljs-number\">2</span>\n</code></pre></div>\n\n<div><h2 id=\"json\"><a href=\"#json\" name=\"json\">#</a>JSON</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> json\n&lt;str&gt;  = json.dumps(&lt;list/dict&gt;)  <span class=\"hljs-comment\"># Converts collection to JSON string.</span>\n&lt;coll&gt; = json.loads(&lt;str&gt;)        <span class=\"hljs-comment\"># Converts JSON string to collection.</span>\n</code></pre></div>\n\n<div><h3 id=\"readcollectionfromjsonfile\">Read Collection from JSON File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">read_json_file</span><span class=\"hljs-params\">(filename)</span>:</span>\n    <span class=\"hljs-keyword\">with</span> open(filename, encoding=<span class=\"hljs-string\">'utf-8'</span>) <span class=\"hljs-keyword\">as</span> file:\n        <span class=\"hljs-keyword\">return</span> json.load(file)\n</code></pre></div>\n\n<div><h3 id=\"writecollectiontojsonfile\">Write Collection to JSON File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">write_to_json_file</span><span class=\"hljs-params\">(filename, collection)</span>:</span>\n    <span class=\"hljs-keyword\">with</span> open(filename, <span class=\"hljs-string\">'w'</span>, encoding=<span class=\"hljs-string\">'utf-8'</span>) <span class=\"hljs-keyword\">as</span> file:\n        json.dump(collection, file, ensure_ascii=<span class=\"hljs-keyword\">False</span>, indent=<span class=\"hljs-number\">2</span>)\n</code></pre></div>\n\n<div><h2 id=\"pickle\"><a href=\"#pickle\" name=\"pickle\">#</a>Pickle</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> pickle\n&lt;bytes&gt;  = pickle.dumps(&lt;object&gt;)  <span class=\"hljs-comment\"># Converts object to bytes object.</span>\n&lt;object&gt; = pickle.loads(&lt;bytes&gt;)   <span class=\"hljs-comment\"># Converts bytes object to object.</span>\n</code></pre></div>\n\n<div><h3 id=\"readobjectfrompicklefile\">Read Object from Pickle File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">read_pickle_file</span><span class=\"hljs-params\">(filename)</span>:</span>\n    <span class=\"hljs-keyword\">with</span> open(filename, <span class=\"hljs-string\">'rb'</span>) <span class=\"hljs-keyword\">as</span> file:\n        <span class=\"hljs-keyword\">return</span> pickle.load(file)\n</code></pre></div>\n\n<div><h3 id=\"writeobjecttopicklefile\">Write Object to Pickle File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">write_to_pickle_file</span><span class=\"hljs-params\">(filename, an_object)</span>:</span>\n    <span class=\"hljs-keyword\">with</span> open(filename, <span class=\"hljs-string\">'wb'</span>) <span class=\"hljs-keyword\">as</span> file:\n        pickle.dump(an_object, file)\n</code></pre></div>\n\n<div><h2 id=\"csv\"><a href=\"#csv\" name=\"csv\">#</a>CSV</h2><p><strong>Text file format for storing spreadsheets.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> csv\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;file&gt;   = open(&lt;path&gt;, newline=<span class=\"hljs-string\">''</span>)               <span class=\"hljs-comment\"># Opens the text file for reading.</span>\n&lt;reader&gt; = csv.reader(&lt;file&gt;, dialect=<span class=\"hljs-string\">'excel'</span>)    <span class=\"hljs-comment\"># Also `delimiter=','`. See Params.</span>\n&lt;list&gt;   = next(&lt;reader&gt;)                         <span class=\"hljs-comment\"># Returns a row as list of strings.</span>\n&lt;list&gt;   = list(&lt;reader&gt;)                         <span class=\"hljs-comment\"># Returns a list of remaining rows.</span>\n</code></pre>\n<ul>\n<li><strong>Without the <code class=\"python hljs\"><span class=\"hljs-string\">'newline=\"\"'</span></code> argument, every '\\r\\n' sequence that is embedded inside a quoted field will get converted to '\\n'. For details about the newline argument see <a href=\"#open\">Open</a>.</strong></li>\n<li><strong>To nicely print the spreadsheet to the console use either <a href=\"#table\">Tabulate</a> or PrettyTable library.</strong></li>\n<li><strong>For XML and binary Excel files (with extensions xlsx, xlsm and xlsb) use <a href=\"#fileformats\">Pandas</a> library.</strong></li>\n<li><strong>Reader can consume any iterator or collection of strings, not just text files.</strong></li>\n</ul>\n<div><h3 id=\"write\">Write</h3><pre><code class=\"python language-python hljs\">&lt;file&gt;   = open(&lt;path&gt;, mode=<span class=\"hljs-string\">'a'</span>, newline=<span class=\"hljs-string\">''</span>)     <span class=\"hljs-comment\"># Opens the text file for writing.</span>\n&lt;writer&gt; = csv.writer(&lt;file&gt;, dialect=<span class=\"hljs-string\">'excel'</span>)    <span class=\"hljs-comment\"># Also `delimiter=','`. See Params.</span>\n&lt;writer&gt;.writerow(&lt;collection&gt;)                   <span class=\"hljs-comment\"># Encodes objects using str(&lt;obj&gt;).</span>\n&lt;writer&gt;.writerows(&lt;coll_of_coll&gt;)                <span class=\"hljs-comment\"># Appends rows to the opened file.</span>\n</code></pre></div>\n\n<ul>\n<li><strong>If file is opened without the <code class=\"python hljs\"><span class=\"hljs-string\">'newline=\"\"'</span></code> argument, '\\r' will be added in front of every '\\n' on platforms that use '\\r\\n' line endings. I.e., newlines may get doubled on Windows.</strong></li>\n<li><strong>Open existing file with <code class=\"python hljs\"><span class=\"hljs-string\">'mode=\"a\"'</span></code> to append to it or <code class=\"python hljs\"><span class=\"hljs-string\">'mode=\"w\"'</span></code> to overwrite it.</strong></li>\n</ul>\n<div><h3 id=\"parameters\">Parameters</h3><ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'dialect'</span></code> - Master parameter that sets the default values. String or a <em>csv.Dialect</em> object.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'delimiter'</span></code> - A one-character string that separates fields. Comma, tab, semicolon, etc.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'lineterminator'</span></code> - Sets how writer terminates rows. Reader looks for '\\n', '\\r' and '\\r\\n'.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'quotechar'</span></code> - Character for quoting fields containing delimiters, quotechars, '\\n' or '\\r'.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'escapechar'</span></code> - Character for escaping quotechars. Can be None if doublequote is True.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'doublequote'</span></code> - Whether quotechars inside fields are/get doubled (instead of escaped).</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'quoting'</span></code> - 0: As necessary, 1: All, 2: All but numbers which are read as floats, 3: None.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'skipinitialspace'</span></code> - Is space character at the start of the field stripped by the reader.</strong></li>\n</ul><div><h3 id=\"dialects\">Dialects</h3><pre><code class=\"text language-text\">┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\n┃                  │     excel    │   excel-tab  │     unix     ┃\n┠──────────────────┼──────────────┼──────────────┼──────────────┨\n┃ delimiter        │       ','    │      '\\t'    │       ','    ┃\n┃ lineterminator   │    '\\r\\n'    │    '\\r\\n'    │      '\\n'    ┃\n┃ quotechar        │       '\"'    │       '\"'    │       '\"'    ┃\n┃ escapechar       │      None    │      None    │      None    ┃\n┃ doublequote      │      True    │      True    │      True    ┃\n┃ quoting          │         0    │         0    │         1    ┃\n┃ skipinitialspace │     False    │     False    │     False    ┃\n┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n</code></pre></div></div>\n\n\n\n<div><h3 id=\"readrowsfromcsvfile\">Read Rows from CSV File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">read_csv_file</span><span class=\"hljs-params\">(filename, **csv_params)</span>:</span>\n    <span class=\"hljs-keyword\">with</span> open(filename, encoding=<span class=\"hljs-string\">'utf-8'</span>, newline=<span class=\"hljs-string\">''</span>) <span class=\"hljs-keyword\">as</span> file:\n        <span class=\"hljs-keyword\">return</span> list(csv.reader(file, **csv_params))\n</code></pre></div>\n\n<div><h3 id=\"writerowstocsvfile\">Write Rows to CSV File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">write_to_csv_file</span><span class=\"hljs-params\">(filename, rows, mode=<span class=\"hljs-string\">'w'</span>, **csv_params)</span>:</span>\n    <span class=\"hljs-keyword\">with</span> open(filename, mode, encoding=<span class=\"hljs-string\">'utf-8'</span>, newline=<span class=\"hljs-string\">''</span>) <span class=\"hljs-keyword\">as</span> file:\n        writer = csv.writer(file, **csv_params)\n        writer.writerows(rows)\n</code></pre></div>\n\n<div><h2 id=\"sqlite\"><a href=\"#sqlite\" name=\"sqlite\">#</a>SQLite</h2><p><strong>A server-less database engine that stores each database into its own file.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> sqlite3\n&lt;con&gt; = sqlite3.connect(&lt;path&gt;)             <span class=\"hljs-comment\"># Opens existing or new file. Also ':memory:'.</span>\n&lt;con&gt;.close()                               <span class=\"hljs-comment\"># Closes connection. Discards uncommitted data.</span>\n</code></pre></div>\n\n\n<div><h3 id=\"read\">Read</h3><pre><code class=\"python language-python hljs\">&lt;cursor&gt; = &lt;con&gt;.execute(<span class=\"hljs-string\">'SELECT …'</span>)        <span class=\"hljs-comment\"># Can raise a subclass of the `sqlite3.Error`.</span>\n&lt;tuple&gt;  = &lt;cursor&gt;.fetchone()              <span class=\"hljs-comment\"># Returns the next row. Also next(&lt;cursor&gt;).</span>\n&lt;list&gt;   = &lt;cursor&gt;.fetchall()              <span class=\"hljs-comment\"># Returns remaining rows. Also list(&lt;cursor&gt;).</span>\n</code></pre></div>\n\n<div><h3 id=\"write-1\">Write</h3><pre><code class=\"python language-python hljs\">&lt;con&gt;.execute(<span class=\"hljs-string\">'INSERT …'</span>)                   <span class=\"hljs-comment\"># Can raise a subclass of the `sqlite3.Error`.</span>\n&lt;con&gt;.commit()                              <span class=\"hljs-comment\"># Saves all the changes since the last commit.</span>\n&lt;con&gt;.rollback()                            <span class=\"hljs-comment\"># Discards all changes since the last commit.</span>\n</code></pre></div>\n\n<div><h4 id=\"or\">Or:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">with</span> &lt;con&gt;:                                 <span class=\"hljs-comment\"># Exits the block with commit() or rollback(),</span>\n    &lt;con&gt;.execute(<span class=\"hljs-string\">'INSERT …'</span>)               <span class=\"hljs-comment\"># depending on whether any exception occurred.</span>\n</code></pre></div>\n\n<div><h3 id=\"placeholders\">Placeholders</h3><pre><code class=\"python language-python hljs\">&lt;con&gt;.execute(<span class=\"hljs-string\">'&lt;sql&gt;'</span>, &lt;list/tuple&gt;)        <span class=\"hljs-comment\"># Replaces every question mark with its item.</span>\n&lt;con&gt;.execute(<span class=\"hljs-string\">'&lt;sql&gt;'</span>, &lt;dict/namedtuple&gt;)   <span class=\"hljs-comment\"># Replaces every :&lt;key&gt; with a matching value.</span>\n&lt;con&gt;.executemany(<span class=\"hljs-string\">'&lt;sql&gt;'</span>, &lt;coll_of_coll&gt;)  <span class=\"hljs-comment\"># Executes statement once for each collection.</span>\n</code></pre></div>\n\n<ul>\n<li><strong>Accepts strings, ints, floats, bytes, None objects, and bools (stored as 1 or 0).</strong></li>\n<li><strong>Columns are not restricted to any type unless table is declared as strict.</strong></li>\n</ul>\n<div><h3 id=\"example-1\">Example</h3><p><strong>Values are not actually saved in this example because <code class=\"python hljs\"><span class=\"hljs-string\">'con.commit()'</span></code> is omitted!</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>con = sqlite3.connect(<span class=\"hljs-string\">'test.db'</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>con.execute(<span class=\"hljs-string\">'CREATE TABLE person (name TEXT, height INTEGER) STRICT'</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>con.execute(<span class=\"hljs-string\">'INSERT INTO person VALUES (?, ?)'</span>, (<span class=\"hljs-string\">'Jean-Luc'</span>, <span class=\"hljs-number\">187</span>))\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>con.execute(<span class=\"hljs-string\">'SELECT rowid, * FROM person'</span>).fetchall()\n[(<span class=\"hljs-number\">1</span>, <span class=\"hljs-string\">'Jean-Luc'</span>, <span class=\"hljs-number\">187</span>)]\n</code></pre></div>\n\n\n<div><h3 id=\"sqlalchemy\">SQLAlchemy</h3><p><strong>Library for interacting with various DB systems via SQL, <a href=\"https://docs.sqlalchemy.org/en/latest/tutorial/data_select.html#the-select-sql-expression-construct\">method chaining</a> or <a href=\"https://docs.sqlalchemy.org/en/latest/orm/quickstart.html#simple-select\">ORM</a>.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install sqlalchemy</span>\n<span class=\"hljs-keyword\">from</span> sqlalchemy <span class=\"hljs-keyword\">import</span> create_engine, text\n&lt;engine&gt; = create_engine(<span class=\"hljs-string\">'&lt;url&gt;'</span>)           <span class=\"hljs-comment\"># Url: 'dialect://user:password@host/dbname'.</span>\n&lt;con&gt;    = &lt;engine&gt;.connect()               <span class=\"hljs-comment\"># Creates new connection. Also &lt;con&gt;.close().</span>\n&lt;cursor&gt; = &lt;con&gt;.execute(text(<span class=\"hljs-string\">'&lt;sql&gt;'</span>))     <span class=\"hljs-comment\"># Pass a dict to replace :&lt;key&gt; placeholders.</span>\n<span class=\"hljs-keyword\">with</span> &lt;con&gt;.begin(): ...                     <span class=\"hljs-comment\"># Exits the block with a commit or rollback.</span>\n</code></pre></div>\n\n\n<pre><code class=\"text language-text\">┏━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Dialect         │ pip3 install │           Dependencies           ┃\n┠─────────────────┼──────────────┼──────────────────────────────────┨\n┃ mysql           │ mysqlclient  │ www.pypi.org/project/mysqlclient ┃\n┃ postgresql      │ psycopg2     │ www.pypi.org/project/psycopg2    ┃\n┃ mssql           │ pyodbc       │ www.pypi.org/project/pyodbc      ┃\n┃ oracle+oracledb │ oracledb     │ www.pypi.org/project/oracledb    ┃\n┗━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n</code></pre>\n<div><h2 id=\"bytes\"><a href=\"#bytes\" name=\"bytes\">#</a>Bytes</h2><p><strong>An immutable sequence of single bytes. Mutable version is called bytearray.</strong></p><pre><code class=\"python language-python hljs\">&lt;bytes&gt; = <span class=\"hljs-string\">b'&lt;str&gt;'</span>                       <span class=\"hljs-comment\"># Accepts ASCII characters and \\x00 to \\xff.</span>\n&lt;int&gt;   = &lt;bytes&gt;[index]                 <span class=\"hljs-comment\"># Returns the byte as int between 0 and 255.</span>\n&lt;bytes&gt; = &lt;bytes&gt;[&lt;slice&gt;]               <span class=\"hljs-comment\"># Returns bytes even if it has one element.</span>\n&lt;bytes&gt; = &lt;bytes&gt;.join(&lt;coll_of_bytes&gt;)  <span class=\"hljs-comment\"># Joins elements using bytes as a separator.</span>\n</code></pre></div>\n\n\n<div><h3 id=\"encode-1\">Encode</h3><pre><code class=\"python language-python hljs\">&lt;bytes&gt; = bytes(&lt;coll_of_ints&gt;)          <span class=\"hljs-comment\"># Passed integers must be between 0 and 255.</span>\n&lt;bytes&gt; = bytes(&lt;str&gt;, <span class=\"hljs-string\">'utf-8'</span>)          <span class=\"hljs-comment\"># Encodes the string. Same as &lt;str&gt;.encode().</span>\n&lt;bytes&gt; = bytes.fromhex(<span class=\"hljs-string\">'&lt;hex&gt;'</span>)         <span class=\"hljs-comment\"># Hex pairs can be separated by whitespaces.</span>\n&lt;bytes&gt; = &lt;int&gt;.to_bytes(n_bytes)        <span class=\"hljs-comment\"># Accepts `byteorder='little', signed=True`.</span>\n</code></pre></div>\n\n<div><h3 id=\"decode-1\">Decode</h3><pre><code class=\"python language-python hljs\">&lt;list&gt;  = list(&lt;bytes&gt;)                  <span class=\"hljs-comment\"># Returns a list of ints between 0 and 255.</span>\n&lt;str&gt;   = str(&lt;bytes&gt;, <span class=\"hljs-string\">'utf-8'</span>)          <span class=\"hljs-comment\"># Returns a string. Same as &lt;bytes&gt;.decode().</span>\n&lt;str&gt;   = &lt;bytes&gt;.hex()                  <span class=\"hljs-comment\"># Returns hex pairs separated by `sep=&lt;str&gt;`.</span>\n&lt;int&gt;   = int.from_bytes(&lt;bytes&gt;)        <span class=\"hljs-comment\"># Accepts `byteorder='little', signed=True`.</span>\n</code></pre></div>\n\n<div><h3 id=\"readbytesfromfile\">Read Bytes from File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">read_bytes</span><span class=\"hljs-params\">(filename)</span>:</span>\n    <span class=\"hljs-keyword\">with</span> open(filename, <span class=\"hljs-string\">'rb'</span>) <span class=\"hljs-keyword\">as</span> file:\n        <span class=\"hljs-keyword\">return</span> file.read()\n</code></pre></div>\n\n<div><h3 id=\"writebytestofile\">Write Bytes to File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">write_bytes</span><span class=\"hljs-params\">(filename, bytes_obj)</span>:</span>\n    <span class=\"hljs-keyword\">with</span> open(filename, <span class=\"hljs-string\">'wb'</span>) <span class=\"hljs-keyword\">as</span> file:\n        file.write(bytes_obj)\n</code></pre></div>\n\n<div><h2 id=\"struct\"><a href=\"#struct\" name=\"struct\">#</a>Struct</h2><ul>\n<li><strong>Module that performs conversions between a sequence of numbers and a bytes object.</strong></li>\n<li><strong>System’s type sizes, byte order, and alignment rules are used by default.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> struct <span class=\"hljs-keyword\">import</span> pack, unpack\n\n&lt;bytes&gt; = pack(<span class=\"hljs-string\">'&lt;format&gt;'</span>, &lt;num_1&gt;, ...)  <span class=\"hljs-comment\"># Packs numbers according to format.</span>\n&lt;tuple&gt; = unpack(<span class=\"hljs-string\">'&lt;format&gt;'</span>, &lt;bytes&gt;)     <span class=\"hljs-comment\"># Use `iter_unpack()` to get tuples.</span>\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>pack(<span class=\"hljs-string\">'&gt;hhl'</span>, <span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>)\n<span class=\"hljs-string\">b'\\x00\\x01\\x00\\x02\\x00\\x00\\x00\\x03'</span>\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>unpack(<span class=\"hljs-string\">'bhh'</span>, <span class=\"hljs-string\">b'\\x01\\x00\\x02\\x00\\x03\\x00'</span>)\n(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>)\n</code></pre>\n<h3 id=\"format-2\">Format</h3><div><h4 id=\"forstandardtypesizesandmanualalignmentpaddingstartformatstringwith\">For standard type sizes and manual alignment (padding) start format string with:</h4><ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'='</span></code> - System's byte order (usually little-endian).</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'&lt;'</span></code> - Little-endian (i.e. least significant byte first).</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'&gt;'</span></code> - Big-endian (also <code class=\"python hljs\"><span class=\"hljs-string\">'!'</span></code>).</strong></li>\n</ul><div><h4 id=\"besidesnumberspackandunpackalsosupportbytesobjectsasapartofthesequence\">Besides numbers, pack() and unpack() also support bytes objects as a part of the sequence:</h4><ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'c'</span></code> - A bytes object with a single element. For pad byte use <code class=\"python hljs\"><span class=\"hljs-string\">'x'</span></code>.</strong></li>\n<li><strong><code class=\"apache hljs\"><span class=\"hljs-section\">'&lt;n&gt;s'</span><span class=\"hljs-attribute\"></span></code> - A bytes object with n elements (not effected by byte order).</strong></li>\n</ul></div></div><div><div><h4 id=\"integersusecapitalletterforunsignedtypeminimumstandardsizesareinbrackets\">Integers. Use capital letter for unsigned type. Minimum/standard sizes are in brackets:</h4><ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'b'</span></code> - char (1/1)</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'h'</span></code> - short (2/2)</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'i'</span></code> - int (2/4)</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'l'</span></code> - long (4/4)</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'q'</span></code> - long long (8/8)</strong></li>\n</ul></div><div><h4 id=\"floatingpointtypesstructalwaysusesstandardsizes\">Floating point types (struct always uses standard sizes):</h4><ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'f'</span></code> - float (4/4)</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'d'</span></code> - double (8/8)</strong></li>\n</ul></div></div>\n\n\n\n\n\n\n\n\n<div><h2 id=\"array\"><a href=\"#array\" name=\"array\">#</a>Array</h2><p><strong>List that can only hold numbers that fit into the passed C type. Available types and their min­imum sizes in bytes are listed above. Type sizes and byte order are always determined by the system, how­ever bytes of each element can be reversed (by calling the byteswap() method).</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> array <span class=\"hljs-keyword\">import</span> array\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;array&gt; = array(<span class=\"hljs-string\">'&lt;typecode&gt;'</span> [, &lt;coll&gt;])  <span class=\"hljs-comment\"># Creates array. Accepts collection of numbers.</span>\n&lt;array&gt; = array(<span class=\"hljs-string\">'&lt;typecode&gt;'</span>, &lt;bytes&gt;)    <span class=\"hljs-comment\"># Copies passed bytes into the array's memory.</span>\n&lt;array&gt; = array(<span class=\"hljs-string\">'&lt;typecode&gt;'</span>, &lt;array&gt;)    <span class=\"hljs-comment\"># Treats passed array as a sequence of numbers.</span>\n&lt;array&gt;.fromfile(&lt;file&gt;, n_items)         <span class=\"hljs-comment\"># Appends file contents to the array's memory.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;bytes&gt; = bytes(&lt;array&gt;)                  <span class=\"hljs-comment\"># Returns copy of the memory as a bytes object.</span>\n&lt;file&gt;.write(&lt;array&gt;)                     <span class=\"hljs-comment\"># Appends the array's memory to a binary file.</span>\n</code></pre>\n<div><h2 id=\"memoryview\"><a href=\"#memoryview\" name=\"memoryview\">#</a>Memory View</h2><p><strong>A sequence object that points to the memory of another bytes-like object. Each element can reference a single or multiple consecutive bytes, depending on format. Order and number of elements can be changed with slicing.</strong></p><pre><code class=\"python language-python hljs\">&lt;mview&gt; = memoryview(&lt;bytes/array&gt;)       <span class=\"hljs-comment\"># Returns mutable memoryview if array is passed.</span>\n&lt;obj&gt;   = &lt;mview&gt;[index]                  <span class=\"hljs-comment\"># Returns an int/float. Bytes if format is 'c'.</span>\n&lt;mview&gt; = &lt;mview&gt;[&lt;slice&gt;]                <span class=\"hljs-comment\"># Returns a memoryview with rearranged elements.</span>\n&lt;mview&gt; = &lt;mview&gt;.cast(<span class=\"hljs-string\">'&lt;typecode&gt;'</span>)      <span class=\"hljs-comment\"># Only works between B/b/c and the other types.</span>\n&lt;mview&gt;.release()                         <span class=\"hljs-comment\"># Releases the memory buffer of the base object.</span>\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;bytes&gt; = bytes(&lt;mview&gt;)                  <span class=\"hljs-comment\"># Returns a new bytes object. Also bytearray().</span>\n&lt;bytes&gt; = &lt;bytes&gt;.join(&lt;coll_of_mviews&gt;)  <span class=\"hljs-comment\"># Joins memoryviews using bytes as a separator.</span>\n&lt;array&gt; = array(<span class=\"hljs-string\">'&lt;typecode&gt;'</span>, &lt;mview&gt;)    <span class=\"hljs-comment\"># Treats passed mview as a sequence of numbers.</span>\n&lt;file&gt;.write(&lt;mview&gt;)                     <span class=\"hljs-comment\"># Appends `bytes(&lt;mview&gt;)` to the binary file.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;list&gt;  = list(&lt;mview&gt;)                   <span class=\"hljs-comment\"># Returns list of ints, floats or bytes objects.</span>\n&lt;str&gt;   = str(&lt;mview&gt;, <span class=\"hljs-string\">'utf-8'</span>)           <span class=\"hljs-comment\"># Treats passed memoryview as `bytes(&lt;mview&gt;)`.</span>\n&lt;str&gt;   = &lt;mview&gt;.hex()                   <span class=\"hljs-comment\"># Returns hex pairs separated with `sep=&lt;str&gt;`.</span>\n</code></pre>\n<div><h2 id=\"deque\"><a href=\"#deque\" name=\"deque\">#</a>Deque</h2><p><strong>List with efficient appends and pops from either side.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> collections <span class=\"hljs-keyword\">import</span> deque\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;deque&gt; = deque(&lt;collection&gt;)     <span class=\"hljs-comment\"># Pass `maxlen=&lt;int&gt;` to set the size limit.</span>\n&lt;deque&gt;.appendleft(&lt;el&gt;)          <span class=\"hljs-comment\"># Drops last element if maxlen is exceeded.</span>\n&lt;deque&gt;.extendleft(&lt;collection&gt;)  <span class=\"hljs-comment\"># Prepends reversed collection to the deque.</span>\n&lt;deque&gt;.rotate(n=<span class=\"hljs-number\">1</span>)               <span class=\"hljs-comment\"># Moves last element to the start of deque.</span>\n&lt;el&gt; = &lt;deque&gt;.popleft()          <span class=\"hljs-comment\"># Removes and returns deque's first element.</span>\n</code></pre>\n<div><h2 id=\"operator\"><a href=\"#operator\" name=\"operator\">#</a>Operator</h2><p><strong>Module of functions that provide the functionality of operators. Functions are grouped by operator precedence, from least to most binding. Functions and operators in first, third and fifth line are also ordered by precedence within a line.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> operator <span class=\"hljs-keyword\">as</span> op\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;bool&gt; = op.not_(&lt;obj&gt;)                                      <span class=\"hljs-comment\"># or, and, not (or/and missing).</span>\n&lt;bool&gt; = op.eq/ne/lt/ge/is_/is_not/contains(&lt;obj&gt;, &lt;obj&gt;)    <span class=\"hljs-comment\"># ==, !=, &lt;, &gt;=, is, is not, in.</span>\n&lt;obj&gt;  = op.or_/xor/and_(&lt;int/set&gt;, &lt;int/set&gt;)               <span class=\"hljs-comment\"># |, ^, &amp; (sorted by precedence).</span>\n&lt;int&gt;  = op.lshift/rshift(&lt;int&gt;, &lt;int&gt;)                      <span class=\"hljs-comment\"># &lt;&lt;, &gt;&gt; (i.e. &lt;int&gt; &lt;&lt; n_bits).</span>\n&lt;obj&gt;  = op.add/sub/mul/truediv/floordiv/mod(&lt;obj&gt;, &lt;obj&gt;)   <span class=\"hljs-comment\"># +, -, *, /, //, % (two groups).</span>\n&lt;num&gt;  = op.neg/invert(&lt;num&gt;)                                <span class=\"hljs-comment\"># -, ~ (negate and bitwise not).</span>\n&lt;num&gt;  = op.pow(&lt;num&gt;, &lt;num&gt;)                                <span class=\"hljs-comment\"># ** (pow() accepts 3 arguments).</span>\n&lt;func&gt; = op.itemgetter/attrgetter/methodcaller(&lt;obj&gt; [, …])  <span class=\"hljs-comment\"># [index/key], .name, .name([…]).</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">elementwise_sum  = map(op.add, list_a, list_b)\nsorted_by_second = sorted(&lt;coll&gt;, key=op.itemgetter(<span class=\"hljs-number\">1</span>))\nsorted_by_both   = sorted(&lt;coll&gt;, key=op.itemgetter(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">0</span>))\nfirst_element    = op.methodcaller(<span class=\"hljs-string\">'pop'</span>, <span class=\"hljs-number\">0</span>)(&lt;list&gt;)\n</code></pre>\n<ul>\n<li><strong>Most operators call the object's special method that is named after them (second object is passed as an argument), while logical operators call their own code that relies on bool().</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'and/or'</span></code> can't be emulated by a function because they might not evaluate all operands.</strong></li>\n<li><strong>Comparisons can be chained: <code class=\"python hljs\"><span class=\"hljs-string\">'x &lt; y &lt; z'</span></code> gets converted to <code class=\"python hljs\"><span class=\"hljs-string\">'(x &lt; y) and (y &lt; z)'</span></code>.</strong></li>\n</ul>\n<div><h2 id=\"matchstatement\"><a href=\"#matchstatement\" name=\"matchstatement\">#</a>Match Statement</h2><p><strong>Executes the first block with matching pattern.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">match</span> &lt;object/expression&gt;:\n    <span class=\"hljs-keyword\">case</span> &lt;pattern&gt; [<span class=\"hljs-keyword\">if</span> &lt;condition&gt;]:\n        &lt;code&gt;\n    ...\n</code></pre></div>\n\n\n<div><h3 id=\"patterns\">Patterns</h3><pre><code class=\"python language-python hljs\">&lt;value_pattern&gt; = <span class=\"hljs-number\">1</span>/<span class=\"hljs-string\">'abc'</span>/<span class=\"hljs-keyword\">True</span>/<span class=\"hljs-keyword\">None</span>/math.pi        <span class=\"hljs-comment\"># Matches the literal or attribute's value.</span>\n&lt;class_pattern&gt; = &lt;type&gt;()                         <span class=\"hljs-comment\"># Matches any object of that type (or ABC).</span>\n&lt;wildcard_patt&gt; = _                                <span class=\"hljs-comment\"># Matches any object. Useful in last case.</span>\n&lt;capture_patt&gt;  = &lt;name&gt;                           <span class=\"hljs-comment\"># Matches any object and binds it to name.</span>\n&lt;as_pattern&gt;    = &lt;pattern&gt; <span class=\"hljs-keyword\">as</span> &lt;name&gt;              <span class=\"hljs-comment\"># Binds match to name. Also &lt;type&gt;(&lt;name&gt;).</span>\n&lt;or_pattern&gt;    = &lt;pattern&gt; | &lt;pattern&gt; [| ...]    <span class=\"hljs-comment\"># Matches if any of listed patterns match.</span>\n&lt;sequence_patt&gt; = [&lt;pattern&gt;, ...]                 <span class=\"hljs-comment\"># Matches a sequence. All items must match.</span>\n&lt;mapping_patt&gt;  = {&lt;value_pattern&gt;: &lt;patt&gt;, ...}   <span class=\"hljs-comment\"># Matches a dict if it has matching items.</span>\n&lt;class_pattern&gt; = &lt;type&gt;(&lt;attr_name&gt;=&lt;patt&gt;, ...)  <span class=\"hljs-comment\"># Matches object with matching attributes.</span>\n</code></pre></div>\n\n<ul>\n<li><strong>The sequence pattern can also be written as a tuple, either with or without the brackets.</strong></li>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'*&lt;name&gt;'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'**&lt;name&gt;'</span></code> in sequence/mapping patterns to bind remaining items.</strong></li>\n<li><strong>Patterns can be surrounded with brackets to override their precedence: <code class=\"python hljs\"><span class=\"hljs-string\">'|'</span></code> &gt; <code class=\"python hljs\"><span class=\"hljs-string\">'as'</span></code> &gt; <code class=\"python hljs\"><span class=\"hljs-string\">','</span></code>. For example, <code class=\"python hljs\"><span class=\"hljs-string\">'[1, 2]'</span></code> is matched by expression <code class=\"python hljs\"><span class=\"hljs-string\">'case 1|2, 2|3 as y if y == 2:'</span></code>.</strong></li>\n<li><strong>All names that are bound in the matching case, as well as variables initialized in its body, are visible after the match statement (only function block delimits scope).</strong></li>\n</ul>\n<div><h3 id=\"example-2\">Example</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">from</span> pathlib <span class=\"hljs-keyword\">import</span> Path\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">match</span> Path(<span class=\"hljs-string\">'/home/ken/python-cheatsheet/README.md'</span>):\n<span class=\"hljs-meta\">... </span>    <span class=\"hljs-keyword\">case</span> Path(\n<span class=\"hljs-meta\">... </span>        parts=[<span class=\"hljs-string\">'/'</span>, <span class=\"hljs-string\">'home'</span>, user, *_]\n<span class=\"hljs-meta\">... </span>    ) <span class=\"hljs-keyword\">as</span> p <span class=\"hljs-keyword\">if</span> p.name.lower().startswith(<span class=\"hljs-string\">'readme'</span>) <span class=\"hljs-keyword\">and</span> p.is_file():\n<span class=\"hljs-meta\">... </span>        print(<span class=\"hljs-string\">f'<span class=\"hljs-subst\">{p.name}</span> is a readme file that belongs to user <span class=\"hljs-subst\">{user}</span>.'</span>)\nREADME.md is a readme file that belongs to user ken.\n</code></pre></div>\n\n<div><h2 id=\"logging\"><a href=\"#logging\" name=\"logging\">#</a>Logging</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> logging <span class=\"hljs-keyword\">as</span> log\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">log.basicConfig(filename=&lt;path&gt;, level=<span class=\"hljs-string\">'WARNING'</span>)  <span class=\"hljs-comment\"># Configures the root logger (see Setup).</span>\nlog.debug/info/warning/error/critical(&lt;str&gt;)       <span class=\"hljs-comment\"># Sends passed message to the root logger.</span>\n&lt;Logger&gt; = log.getLogger(__name__)                 <span class=\"hljs-comment\"># Returns a logger named after the module.</span>\n&lt;Logger&gt;.&lt;level&gt;(&lt;str&gt;)                            <span class=\"hljs-comment\"># Sends the message. Same levels as above.</span>\n&lt;Logger&gt;.exception(&lt;str&gt;)                          <span class=\"hljs-comment\"># `error()` that appends caught exception.</span>\n</code></pre>\n<div><h3 id=\"setup\">Setup</h3><pre><code class=\"python language-python hljs\">log.basicConfig(\n    filename=<span class=\"hljs-keyword\">None</span>,                                 <span class=\"hljs-comment\"># Prints to stderr when filename is None.</span>\n    filemode=<span class=\"hljs-string\">'a'</span>,                                  <span class=\"hljs-comment\"># Use mode 'w' to overwrite existing file.</span>\n    format=<span class=\"hljs-string\">'%(levelname)s:%(name)s:%(message)s'</span>,   <span class=\"hljs-comment\"># Using '%(asctime)s' adds local datetime.</span>\n    level=log.WARNING,                             <span class=\"hljs-comment\"># Drops messages that have lower priority.</span>\n    handlers=[log.StreamHandler(sys.stderr)]       <span class=\"hljs-comment\"># Uses FileHandler when 'filename' is set.</span>\n)\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;Formatter&gt; = log.Formatter(<span class=\"hljs-string\">'&lt;format&gt;'</span>)            <span class=\"hljs-comment\"># Formats messages using the format str.</span>\n&lt;Handler&gt; = log.FileHandler(&lt;path&gt;, mode=<span class=\"hljs-string\">'a'</span>)      <span class=\"hljs-comment\"># Appends to file. Also `encoding=None`.</span>\n&lt;Handler&gt;.setFormatter(&lt;Formatter&gt;)                <span class=\"hljs-comment\"># Only outputs bare messages by default.</span>\n&lt;Handler&gt;.setLevel(&lt;str/int&gt;)                      <span class=\"hljs-comment\"># Prints/saves every message by default.</span>\n&lt;Logger&gt;.addHandler(&lt;Handler&gt;)                     <span class=\"hljs-comment\"># Loggers can have more than one handler.</span>\n&lt;Logger&gt;.setLevel(&lt;str/int&gt;)                       <span class=\"hljs-comment\"># What's sent to its/ancestors' handlers.</span>\n&lt;Logger&gt;.propagate = &lt;bool&gt;                        <span class=\"hljs-comment\"># Cuts off ancestors' handlers if False.</span>\n</code></pre>\n<ul>\n<li><strong>Parent logger can be specified by naming the child logger <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;parent_name&gt;.&lt;name&gt;'</span></code>.</strong></li>\n<li><strong>Logger will inherit the level from its parent if you don't set it via the setLevel() method.</strong></li>\n<li><strong>Format string can contain: pathname, filename, funcName, lineno, thread and process.</strong></li>\n<li><strong>RotatingFileHandler rotates files according to 'maxBytes' and 'backupCount' arguments.</strong></li>\n<li><strong>An object with <code class=\"python hljs\"><span class=\"hljs-string\">'filter(&lt;LogRecord&gt;)'</span></code> method (or the method itself) can be added to loggers and handlers via addFilter(). Message is dropped if filter() returns a false value.</strong></li>\n<li><strong>Logging messages generated by libraries are passed to the root's handlers. Level of the library's logger can be set with <code class=\"python hljs\"><span class=\"hljs-string\">'log.getLogger(\"&lt;library&gt;\").setLevel(&lt;str&gt;)'</span></code>.</strong></li>\n</ul>\n<div><h4 id=\"loggerthatwritesmessagestoafileandsendsthemtotherootshandlerthatprintswarningsorhigher\">Logger that writes messages to a file and sends them to the root's handler that prints warnings or higher:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>logger = log.getLogger(<span class=\"hljs-string\">'my_module'</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>handler = log.FileHandler(<span class=\"hljs-string\">'test.log'</span>, encoding=<span class=\"hljs-string\">'utf-8'</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>format_str = <span class=\"hljs-string\">'%(asctime)s %(levelname)s:%(name)s:%(message)s'</span>\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>handler.setFormatter(log.Formatter(format_str))\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>logger.addHandler(handler)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>logger.setLevel(<span class=\"hljs-string\">'DEBUG'</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>log.basicConfig()\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>roots_handler = log.root.handlers[<span class=\"hljs-number\">0</span>]\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>roots_handler.setLevel(<span class=\"hljs-string\">'WARNING'</span>)\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>logger.critical(<span class=\"hljs-string\">'Missing config file.'</span>)\nCRITICAL:my_module:Missing config file.\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>print(open(<span class=\"hljs-string\">'test.log'</span>).read())\n2023-02-07 23:21:01,430 CRITICAL:my_module:Missing config file.\n</code></pre></div>\n\n<div><h2 id=\"introspection\"><a href=\"#introspection\" name=\"introspection\">#</a>Introspection</h2><pre><code class=\"python language-python hljs\">&lt;list&gt; = dir()                     <span class=\"hljs-comment\"># Local names of objects (including functions and classes).</span>\n&lt;dict&gt; = vars()                    <span class=\"hljs-comment\"># Dict of local names and their objects. Same as locals().</span>\n&lt;dict&gt; = globals()                 <span class=\"hljs-comment\"># Dict of global names and their objects, e.g. __builtin__.</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;list&gt; = dir(&lt;obj&gt;)                <span class=\"hljs-comment\"># Returns names of object's attributes (including methods).</span>\n&lt;dict&gt; = vars(&lt;obj&gt;)               <span class=\"hljs-comment\"># Returns dict of writable attributes. Also &lt;obj&gt;.__dict__.</span>\n&lt;bool&gt; = hasattr(&lt;obj&gt;, <span class=\"hljs-string\">'&lt;name&gt;'</span>)  <span class=\"hljs-comment\"># Checks if object possesses attribute of the passed name.</span>\nvalue  = getattr(&lt;obj&gt;, <span class=\"hljs-string\">'&lt;name&gt;'</span>)  <span class=\"hljs-comment\"># Returns the object's attribute or raises AttributeError.</span>\nsetattr(&lt;obj&gt;, <span class=\"hljs-string\">'&lt;name&gt;'</span>, value)    <span class=\"hljs-comment\"># Sets attribute. Only works on objects with __dict__ attr.</span>\ndelattr(&lt;obj&gt;, <span class=\"hljs-string\">'&lt;name&gt;'</span>)           <span class=\"hljs-comment\"># Deletes attribute from __dict__. Also `del &lt;obj&gt;.&lt;name&gt;`.</span>\n</code></pre>\n<div><h2 id=\"threading\"><a href=\"#threading\" name=\"threading\">#</a>Threading</h2><p><strong>CPython interpreter can only run a single thread at a time. Using multiple threads won't result in a faster execution, unless at least one of the threads contains an I/O operation.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> threading <span class=\"hljs-keyword\">import</span> Thread, Lock, RLock, Semaphore, Event, Barrier\n<span class=\"hljs-keyword\">from</span> concurrent.futures <span class=\"hljs-keyword\">import</span> ThreadPoolExecutor, as_completed\n</code></pre></div>\n\n\n<div><h3 id=\"thread\">Thread</h3><pre><code class=\"python language-python hljs\">&lt;Thread&gt; = Thread(target=&lt;function&gt;)          <span class=\"hljs-comment\"># Use `args=&lt;coll&gt;` to set function's arguments.</span>\n&lt;Thread&gt;.start()                              <span class=\"hljs-comment\"># Runs function in background. Also is_alive().</span>\n&lt;Thread&gt;.join()                               <span class=\"hljs-comment\"># Waits until the function finishes executing.</span>\n</code></pre></div>\n\n<ul>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'kwargs=&lt;dict&gt;'</span></code> to pass keyword arguments to the function, i.e. thread.</strong></li>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'daemon=True'</span></code>, or the program won't be able to exit while the thread is alive.</strong></li>\n</ul>\n<div><h3 id=\"lock\">Lock</h3><pre><code class=\"python language-python hljs\">&lt;lock&gt; = Lock/RLock()                         <span class=\"hljs-comment\"># RLock can only be released by acquirer thread.</span>\n&lt;lock&gt;.acquire()                              <span class=\"hljs-comment\"># Blocks (waits) until lock becomes available.</span>\n&lt;lock&gt;.release()                              <span class=\"hljs-comment\"># Releases the lock so it can be acquired again.</span>\n</code></pre></div>\n\n<div><h4 id=\"or-1\">Or:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">with</span> &lt;lock&gt;:                                  <span class=\"hljs-comment\"># Enters the block by calling method acquire().</span>\n    ...                                       <span class=\"hljs-comment\"># Exits it by calling release(), even on error.</span>\n</code></pre></div>\n\n<div><h3 id=\"semaphoreeventbarrier\">Semaphore, Event, Barrier</h3><pre><code class=\"python language-python hljs\">&lt;Semaphore&gt; = Semaphore(value=<span class=\"hljs-number\">1</span>)              <span class=\"hljs-comment\"># Lock that can be acquired by 'value' threads.</span>\n&lt;Event&gt;     = Event()                         <span class=\"hljs-comment\"># Method wait() blocks until set() is called.</span>\n&lt;Barrier&gt;   = Barrier(&lt;int&gt;)                  <span class=\"hljs-comment\"># `wait()` blocks until it's called int times.</span>\n</code></pre></div>\n\n<div><h3 id=\"queue\">Queue</h3><pre><code class=\"python language-python hljs\">&lt;Queue&gt; = queue.Queue(maxsize=<span class=\"hljs-number\">0</span>)              <span class=\"hljs-comment\"># A first-in-first-out queue. It's thread safe.</span>\n&lt;Queue&gt;.put(&lt;obj&gt;)                            <span class=\"hljs-comment\"># The call blocks until queue stops being full.</span>\n&lt;Queue&gt;.put_nowait(&lt;obj&gt;)                     <span class=\"hljs-comment\"># Raises queue.Full exception if queue is full.</span>\n&lt;obj&gt; = &lt;Queue&gt;.get()                         <span class=\"hljs-comment\"># The call blocks until queue stops being empty.</span>\n&lt;obj&gt; = &lt;Queue&gt;.get_nowait()                  <span class=\"hljs-comment\"># Raises queue.Empty exception if it is empty.</span>\n</code></pre></div>\n\n<div><h3 id=\"threadpoolexecutor\">Thread Pool Executor</h3><pre><code class=\"python language-python hljs\">&lt;Exec&gt; = ThreadPoolExec…(max_workers=<span class=\"hljs-keyword\">None</span>)    <span class=\"hljs-comment\"># Also `with ThreadPoolExecutor() as &lt;name&gt;: …`.</span>\n&lt;iter&gt; = &lt;Exec&gt;.map(&lt;func&gt;, &lt;args_1&gt;, ...)    <span class=\"hljs-comment\"># Multithreaded and non-lazy map(). Keeps order.</span>\n&lt;Futr&gt; = &lt;Exec&gt;.submit(&lt;func&gt;, &lt;arg_1&gt;, ...)  <span class=\"hljs-comment\"># Creates a thread and queues it for execution.</span>\n&lt;Exec&gt;.shutdown()                             <span class=\"hljs-comment\"># Waits for all the threads to finish executing.</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;bool&gt; = &lt;Future&gt;.done()                      <span class=\"hljs-comment\"># Checks if the thread has finished executing.</span>\n&lt;obj&gt;  = &lt;Future&gt;.result(timeout=<span class=\"hljs-keyword\">None</span>)        <span class=\"hljs-comment\"># Raises TimeoutError after 'timeout' seconds.</span>\n&lt;bool&gt; = &lt;Future&gt;.cancel()                    <span class=\"hljs-comment\"># Just returns False if it is running/finished.</span>\n&lt;iter&gt; = as_completed(&lt;coll_of_Futures&gt;)      <span class=\"hljs-comment\"># `next(&lt;iter&gt;)` returns next completed Future.</span>\n</code></pre>\n<ul>\n<li><strong>Map() and as_completed() also accept 'timeout' arg. It causes <em>futures.TimeoutError</em> when next() is called or blocking. Map() times from original call and as_completed() from first call to next(). As_completed() fails if next() is called too late, even if all threads are done.</strong></li>\n<li><strong>Exceptions that happen inside threads are raised when map's next() or Future's result() method is called. Future's exception() method returns caught exception object or None.</strong></li>\n<li><strong>ProcessPoolExecutor provides true parallelism but: everything sent to and from workers must be <a href=\"#pickle\">pickable</a>, queues must be sent using executor's 'initargs' and 'initializer' param­eters, and executor should only be reachable via <code class=\"python hljs\"><span class=\"hljs-string\">'if __name__ == \"__main__\": …'</span></code>.</strong></li>\n</ul>\n<div><h2 id=\"asyncio\"><a href=\"#asyncio\" name=\"asyncio\">#</a>Asyncio</h2><ul>\n<li><strong>Coroutines have a lot in common with threads, but unlike threads, they only give up control when they call another coroutine and they don’t consume as much memory.</strong></li>\n<li><strong>Coroutine definition starts with <code class=\"python hljs\"><span class=\"hljs-string\">'async'</span></code> keyword and its call with <code class=\"python hljs\"><span class=\"hljs-string\">'await'</span></code> keyword.</strong></li>\n<li><strong>Execute <code class=\"python hljs\"><span class=\"hljs-string\">'asyncio.run(&lt;coroutine&gt;)'</span></code> to start running the first/main coroutine.</strong></li>\n</ul><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> asyncio <span class=\"hljs-keyword\">as</span> aio\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;coro&gt; = &lt;async_function&gt;(&lt;args&gt;)          <span class=\"hljs-comment\"># Creates a coroutine by calling async def function.</span>\n&lt;obj&gt;  = <span class=\"hljs-keyword\">await</span> &lt;coroutine&gt;                 <span class=\"hljs-comment\"># Starts the coroutine. Returns its result or None.</span>\n&lt;task&gt; = aio.create_task(&lt;coroutine&gt;)      <span class=\"hljs-comment\"># Schedules it for execution. Always keep the task.</span>\n&lt;obj&gt;  = <span class=\"hljs-keyword\">await</span> &lt;task&gt;                      <span class=\"hljs-comment\"># Returns coroutine's result. Also &lt;task&gt;.cancel().</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;coro&gt; = aio.gather(&lt;coro/task&gt;, ...)      <span class=\"hljs-comment\"># Schedules coros. Returns list of results on await.</span>\n&lt;coro&gt; = aio.wait(&lt;tasks&gt;, return_when=…)  <span class=\"hljs-comment\"># `'ALL/FIRST_COMPLETED'`. Returns (done, pending).</span>\n&lt;iter&gt; = aio.as_completed(&lt;coros/tasks&gt;)   <span class=\"hljs-comment\"># Calling `await next(&lt;iter&gt;)` returns next result.</span>\n</code></pre>\n<div><h4 id=\"runsaterminalgamewhereyoucontrolanasteriskthatmustavoidnumbers\">Runs a terminal game where you control an asterisk that must avoid numbers:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> asyncio, collections, curses, curses.textpad, enum, random\n\nP = collections.namedtuple(<span class=\"hljs-string\">'P'</span>, <span class=\"hljs-string\">'x y'</span>)     <span class=\"hljs-comment\"># Position (x and y coordinates).</span>\nD = enum.Enum(<span class=\"hljs-string\">'D'</span>, <span class=\"hljs-string\">'n e s w'</span>)              <span class=\"hljs-comment\"># Direction (north, east, etc.).</span>\nW, H = <span class=\"hljs-number\">15</span>, <span class=\"hljs-number\">7</span>                               <span class=\"hljs-comment\"># Width and height of the field.</span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">main</span><span class=\"hljs-params\">(screen)</span>:</span>\n    curses.curs_set(<span class=\"hljs-number\">0</span>)                     <span class=\"hljs-comment\"># Makes the cursor invisible.</span>\n    screen.nodelay(<span class=\"hljs-keyword\">True</span>)                   <span class=\"hljs-comment\"># Makes getch() non-blocking.</span>\n    asyncio.run(main_coroutine(screen))    <span class=\"hljs-comment\"># Starts running asyncio code.</span>\n\n<span class=\"hljs-keyword\">async</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">main_coroutine</span><span class=\"hljs-params\">(screen)</span>:</span>\n    moves = asyncio.Queue()\n    state = {<span class=\"hljs-string\">'*'</span>: P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">0</span>)} | dict.fromkeys(range(<span class=\"hljs-number\">10</span>), P(W//<span class=\"hljs-number\">2</span>, H//<span class=\"hljs-number\">2</span>))\n    ai    = [random_controller(id_, moves) <span class=\"hljs-keyword\">for</span> id_ <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">10</span>)]\n    mvc   = [controller(screen, moves), model(moves, state), view(state, screen)]\n    tasks = [asyncio.create_task(coro) <span class=\"hljs-keyword\">for</span> coro <span class=\"hljs-keyword\">in</span> ai + mvc]\n    <span class=\"hljs-keyword\">await</span> asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED)\n\n<span class=\"hljs-keyword\">async</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">random_controller</span><span class=\"hljs-params\">(id_, moves)</span>:</span>\n    <span class=\"hljs-keyword\">while</span> <span class=\"hljs-keyword\">True</span>:\n        d = random.choice(list(D))\n        moves.put_nowait((id_, d))\n        <span class=\"hljs-keyword\">await</span> asyncio.sleep(random.triangular(<span class=\"hljs-number\">0.01</span>, <span class=\"hljs-number\">0.65</span>))\n\n<span class=\"hljs-keyword\">async</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">controller</span><span class=\"hljs-params\">(screen, moves)</span>:</span>\n    <span class=\"hljs-keyword\">while</span> <span class=\"hljs-keyword\">True</span>:\n        key_mappings = {<span class=\"hljs-number\">258</span>: D.s, <span class=\"hljs-number\">259</span>: D.n, <span class=\"hljs-number\">260</span>: D.w, <span class=\"hljs-number\">261</span>: D.e}\n        <span class=\"hljs-keyword\">if</span> d := key_mappings.get(screen.getch()):\n            moves.put_nowait((<span class=\"hljs-string\">'*'</span>, d))\n        <span class=\"hljs-keyword\">await</span> asyncio.sleep(<span class=\"hljs-number\">0.005</span>)\n\n<span class=\"hljs-keyword\">async</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">model</span><span class=\"hljs-params\">(moves, state)</span>:</span>\n    <span class=\"hljs-keyword\">while</span> state[<span class=\"hljs-string\">'*'</span>] <span class=\"hljs-keyword\">not</span> <span class=\"hljs-keyword\">in</span> (state[id_] <span class=\"hljs-keyword\">for</span> id_ <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">10</span>)):\n        id_, d = <span class=\"hljs-keyword\">await</span> moves.get()\n        deltas = {D.n: P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">-1</span>), D.e: P(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">0</span>), D.s: P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">1</span>), D.w: P(<span class=\"hljs-number\">-1</span>, <span class=\"hljs-number\">0</span>)}\n        state[id_] = P((state[id_].x + deltas[d].x) % W, (state[id_].y + deltas[d].y) % H)\n\n<span class=\"hljs-keyword\">async</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">view</span><span class=\"hljs-params\">(state, screen)</span>:</span>\n    offset = P(curses.COLS//<span class=\"hljs-number\">2</span> - W//<span class=\"hljs-number\">2</span>, curses.LINES//<span class=\"hljs-number\">2</span> - H//<span class=\"hljs-number\">2</span>)\n    <span class=\"hljs-keyword\">while</span> <span class=\"hljs-keyword\">True</span>:\n        screen.erase()\n        curses.textpad.rectangle(screen, offset.y-<span class=\"hljs-number\">1</span>, offset.x-<span class=\"hljs-number\">1</span>, offset.y+H, offset.x+W)\n        <span class=\"hljs-keyword\">for</span> id_, p <span class=\"hljs-keyword\">in</span> state.items():\n            screen.addstr(offset.y + (p.y - state[<span class=\"hljs-string\">'*'</span>].y + H//<span class=\"hljs-number\">2</span>) % H,\n                          offset.x + (p.x - state[<span class=\"hljs-string\">'*'</span>].x + W//<span class=\"hljs-number\">2</span>) % W, str(id_))\n        screen.refresh()\n        <span class=\"hljs-keyword\">await</span> asyncio.sleep(<span class=\"hljs-number\">0.005</span>)\n\n<span class=\"hljs-keyword\">if</span> __name__ == <span class=\"hljs-string\">'__main__'</span>:\n    curses.wrapper(main)\n</code></pre></div>\n\n<p><br></p>\n<div><h1 id=\"libraries\">Libraries</h1><div><h2 id=\"progressbar\"><a href=\"#progressbar\" name=\"progressbar\">#</a>Progress Bar</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install tqdm</span>\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">import</span> tqdm, time\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">for</span> el <span class=\"hljs-keyword\">in</span> tqdm.tqdm([<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>], desc=<span class=\"hljs-string\">'Processing'</span>):\n<span class=\"hljs-meta\">... </span>    time.sleep(<span class=\"hljs-number\">1</span>)\nProcessing: 100%|████████████████████| 3/3 [00:03&lt;00:00,  1.00s/it]\n</code></pre></div></div>\n\n\n<div><h2 id=\"plot\"><a href=\"#plot\" name=\"plot\">#</a>Plot</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install matplotlib</span>\n<span class=\"hljs-keyword\">import</span> matplotlib.pyplot <span class=\"hljs-keyword\">as</span> plt\n\nplt.plot/bar/scatter(x_data, y_data, label=<span class=\"hljs-keyword\">None</span>)  <span class=\"hljs-comment\"># Accepts plt.plot(y_data).</span>\nplt.legend()                                      <span class=\"hljs-comment\"># Adds a legend of labels.</span>\nplt.title/xlabel/ylabel(&lt;str&gt;)                    <span class=\"hljs-comment\"># Adds title or axis label.</span>\nplt.show()                                        <span class=\"hljs-comment\"># Also plt.savefig(&lt;path&gt;).</span>\nplt.clf()                                         <span class=\"hljs-comment\"># Clears the plot (figure).</span>\n</code></pre></div>\n\n<div><h2 id=\"table\"><a href=\"#table\" name=\"table\">#</a>Table</h2><div><h4 id=\"printsacsvspreadsheettotheconsole\">Prints a CSV spreadsheet to the console:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install tabulate</span>\n<span class=\"hljs-keyword\">import</span> csv, tabulate\n<span class=\"hljs-keyword\">with</span> open(<span class=\"hljs-string\">'test.csv'</span>, encoding=<span class=\"hljs-string\">'utf-8'</span>, newline=<span class=\"hljs-string\">''</span>) <span class=\"hljs-keyword\">as</span> file:\n    rows = list(csv.reader(file))\nprint(tabulate.tabulate(rows, headers=<span class=\"hljs-string\">'firstrow'</span>))\n</code></pre></div></div>\n\n\n<div><h2 id=\"consoleapp\"><a href=\"#consoleapp\" name=\"consoleapp\">#</a>Console App</h2><div><h4 id=\"runsabasicfileexplorerintheconsole\">Runs a basic file explorer in the console:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install windows-curses</span>\n<span class=\"hljs-keyword\">import</span> curses, os\n<span class=\"hljs-keyword\">from</span> curses <span class=\"hljs-keyword\">import</span> A_REVERSE, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">main</span><span class=\"hljs-params\">(screen)</span>:</span>\n    ch, first, selected, paths = <span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">0</span>, os.listdir()\n    <span class=\"hljs-keyword\">while</span> ch != ord(<span class=\"hljs-string\">'q'</span>):\n        height, width = screen.getmaxyx()\n        screen.erase()\n        <span class=\"hljs-keyword\">for</span> y, filename <span class=\"hljs-keyword\">in</span> enumerate(paths[first : first+height]):\n            color = A_REVERSE <span class=\"hljs-keyword\">if</span> filename == paths[selected] <span class=\"hljs-keyword\">else</span> <span class=\"hljs-number\">0</span>\n            screen.addnstr(y, <span class=\"hljs-number\">0</span>, filename, width-<span class=\"hljs-number\">1</span>, color)\n        ch = screen.getch()\n        selected -= (ch == KEY_UP) <span class=\"hljs-keyword\">and</span> (selected &gt; <span class=\"hljs-number\">0</span>)\n        selected += (ch == KEY_DOWN) <span class=\"hljs-keyword\">and</span> (selected &lt; len(paths)-<span class=\"hljs-number\">1</span>)\n        first -= (first &gt; selected)\n        first += (first &lt; selected-(height-<span class=\"hljs-number\">1</span>))\n        <span class=\"hljs-keyword\">if</span> ch <span class=\"hljs-keyword\">in</span> [KEY_LEFT, KEY_RIGHT, ord(<span class=\"hljs-string\">'\\n'</span>)]:\n            new_dir = <span class=\"hljs-string\">'..'</span> <span class=\"hljs-keyword\">if</span> ch == KEY_LEFT <span class=\"hljs-keyword\">else</span> paths[selected]\n            <span class=\"hljs-keyword\">if</span> os.path.isdir(new_dir):\n                os.chdir(new_dir)\n                first, selected, paths = <span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">0</span>, os.listdir()\n\n<span class=\"hljs-keyword\">if</span> __name__ == <span class=\"hljs-string\">'__main__'</span>:\n    curses.wrapper(main)\n</code></pre></div></div>\n\n\n<div><h2 id=\"guiapp\"><a href=\"#guiapp\" name=\"guiapp\">#</a>GUI App</h2><div><h4 id=\"runsadesktopappforconvertingweightsfrommetricunitsintopounds\">Runs a desktop app for converting weights from metric units into pounds:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install FreeSimpleGUI</span>\n<span class=\"hljs-keyword\">import</span> FreeSimpleGUI <span class=\"hljs-keyword\">as</span> sg\n\ntext_box = sg.Input(default_text=<span class=\"hljs-string\">'100'</span>, enable_events=<span class=\"hljs-keyword\">True</span>, key=<span class=\"hljs-string\">'QUANTITY'</span>)\ndropdown = sg.InputCombo([<span class=\"hljs-string\">'g'</span>, <span class=\"hljs-string\">'kg'</span>, <span class=\"hljs-string\">'t'</span>], <span class=\"hljs-string\">'kg'</span>, readonly=<span class=\"hljs-keyword\">True</span>, enable_events=<span class=\"hljs-keyword\">True</span>, k=<span class=\"hljs-string\">'UNIT'</span>)\nlabel = sg.Text(<span class=\"hljs-string\">'100 kg is 220.462 lbs.'</span>, key=<span class=\"hljs-string\">'OUTPUT'</span>)\nwindow = sg.Window(<span class=\"hljs-string\">'GUI App'</span>, [[text_box, dropdown], [label], [sg.Button(<span class=\"hljs-string\">'Close'</span>)]])\n\n<span class=\"hljs-keyword\">while</span> <span class=\"hljs-keyword\">True</span>:\n    event, values = window.read()\n    <span class=\"hljs-keyword\">if</span> event <span class=\"hljs-keyword\">in</span> [sg.WIN_CLOSED, <span class=\"hljs-string\">'Close'</span>]:\n        <span class=\"hljs-keyword\">break</span>\n    <span class=\"hljs-keyword\">try</span>:\n        quantity = float(values[<span class=\"hljs-string\">'QUANTITY'</span>])\n    <span class=\"hljs-keyword\">except</span> ValueError:\n        <span class=\"hljs-keyword\">continue</span>\n    unit = values[<span class=\"hljs-string\">'UNIT'</span>]\n    lbs = quantity * {<span class=\"hljs-string\">'g'</span>: <span class=\"hljs-number\">0.001</span>, <span class=\"hljs-string\">'kg'</span>: <span class=\"hljs-number\">1</span>, <span class=\"hljs-string\">'t'</span>: <span class=\"hljs-number\">1000</span>}[unit] / <span class=\"hljs-number\">0.45359237</span>\n    window[<span class=\"hljs-string\">'OUTPUT'</span>].update(value=<span class=\"hljs-string\">f'<span class=\"hljs-subst\">{quantity}</span> <span class=\"hljs-subst\">{unit}</span> is <span class=\"hljs-subst\">{lbs:g}</span> lbs.'</span>)\nwindow.close()\n</code></pre></div></div>\n\n\n<div><h2 id=\"scraping\"><a href=\"#scraping\" name=\"scraping\">#</a>Scraping</h2><div><h4 id=\"scrapespythonsurlandlogofromitswikipediapage\">Scrapes Python's URL and logo from its Wikipedia page:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install requests beautifulsoup4</span>\n<span class=\"hljs-keyword\">import</span> requests, bs4, os\n\nget = <span class=\"hljs-keyword\">lambda</span> url: requests.get(url, headers={<span class=\"hljs-string\">'User-Agent'</span>: <span class=\"hljs-string\">'cpc-bot'</span>})\nresponse = get(<span class=\"hljs-string\">'https://en.wikipedia.org/wiki/Python_(programming_language)'</span>)\ndocument = bs4.BeautifulSoup(response.text, <span class=\"hljs-string\">'html.parser'</span>)\ntable = document.find(<span class=\"hljs-string\">'table'</span>, class_=<span class=\"hljs-string\">'infobox vevent'</span>)\npython_url = table.find(<span class=\"hljs-string\">'th'</span>, string=<span class=\"hljs-string\">'Website'</span>).next_sibling.a[<span class=\"hljs-string\">'href'</span>]\nlogo_url = table.find(<span class=\"hljs-string\">'img'</span>)[<span class=\"hljs-string\">'src'</span>]\nfilename = os.path.basename(logo_url)\n<span class=\"hljs-keyword\">with</span> open(filename, <span class=\"hljs-string\">'wb'</span>) <span class=\"hljs-keyword\">as</span> file:\n    file.write(get(<span class=\"hljs-string\">f'https:<span class=\"hljs-subst\">{logo_url}</span>'</span>).content)\nprint(<span class=\"hljs-string\">f'URL: <span class=\"hljs-subst\">{python_url}</span>, logo: file://<span class=\"hljs-subst\">{os.path.abspath(filename)}</span>'</span>)\n</code></pre></div></div>\n\n\n<div><h3 id=\"selenium\">Selenium</h3><p><strong>Library for scraping websites with dynamic content.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install selenium</span>\n<span class=\"hljs-keyword\">from</span> selenium <span class=\"hljs-keyword\">import</span> webdriver\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;Drv&gt; = webdriver.Chrome/Firefox/Safari/Edge()  <span class=\"hljs-comment\"># Opens the browser. Also &lt;Driver&gt;.quit().</span>\n&lt;Drv&gt;.implicitly_wait(seconds)                  <span class=\"hljs-comment\"># Sets timeout for find_element/s() methods.</span>\n&lt;Drv&gt;.get(<span class=\"hljs-string\">'&lt;url&gt;'</span>)                              <span class=\"hljs-comment\"># Blocks until browser fires the load event.</span>\n&lt;str&gt; = &lt;Drv&gt;.page_source                       <span class=\"hljs-comment\"># Returns HTML of the page's current state.</span>\n&lt;El&gt;  = &lt;Drv/El&gt;.find_element(<span class=\"hljs-string\">'xpath'</span>, &lt;str&gt;)   <span class=\"hljs-comment\"># Accepts '//&lt;tag&gt;[@&lt;attr_name&gt;=\"&lt;val&gt;\"]…'.</span>\n&lt;str&gt; = &lt;El&gt;.get_attribute(<span class=\"hljs-string\">'&lt;name&gt;'</span>)            <span class=\"hljs-comment\"># Returns attribute or a property if exists.</span>\n&lt;El&gt;.click/clear()                              <span class=\"hljs-comment\"># Also &lt;El&gt;.text and &lt;El&gt;.send_keys(&lt;str&gt;).</span>\n</code></pre>\n<div><h4 id=\"xpathalsoavailableinlxmlscrapyandbrowsersconsoleviadxxpath\">XPath — also available in lxml, Scrapy, and browser's console via <code class=\"python hljs\"><span class=\"hljs-string\">'$x(\"&lt;xpath&gt;\")'</span></code>:</h4><pre><code class=\"python language-python hljs\">&lt;xpath&gt;     = //&lt;element&gt;[/ <span class=\"hljs-keyword\">or</span> // &lt;element&gt;]    <span class=\"hljs-comment\"># E.g. …/child, …//descendant, …/../sibling.</span>\n&lt;xpath&gt;     = //&lt;element&gt;/following::&lt;element&gt;  <span class=\"hljs-comment\"># Next element. Also preceding::, parent::.</span>\n&lt;element&gt;   = &lt;tag&gt;&lt;conditions&gt;&lt;index&gt;          <span class=\"hljs-comment\"># Tag accepts */a/…. Use [1/2/…] for index.</span>\n&lt;condition&gt; = [&lt;sub_cond&gt; [<span class=\"hljs-keyword\">and</span>/<span class=\"hljs-keyword\">or</span> &lt;sub_cond&gt;]]  <span class=\"hljs-comment\"># Use `not(&lt;sub_cond&gt;)` to negate condition.</span>\n&lt;sub_cond&gt;  = @&lt;attr&gt;[=<span class=\"hljs-string\">\"&lt;val&gt;\"</span>]                 <span class=\"hljs-comment\"># `text()=` and `.=` match (complete) text.</span>\n&lt;sub_cond&gt;  = contains(@&lt;attr&gt;, <span class=\"hljs-string\">\"&lt;val&gt;\"</span>)        <span class=\"hljs-comment\"># Is &lt;val&gt; a substring of attribute's value?</span>\n&lt;sub_cond&gt;  = [//]&lt;element&gt;                     <span class=\"hljs-comment\"># Has matching child? Descendant if //&lt;el&gt;.</span>\n</code></pre></div>\n\n<div><h2 id=\"webapp\"><a href=\"#webapp\" name=\"webapp\">#</a>Web App</h2><p><strong>Flask is a micro web framework that also includes a simple WSGI/HTTP server. If you just want to open a HTML file in a web browser use <code class=\"python hljs\"><span class=\"hljs-string\">'webbrowser.open(&lt;path&gt;)'</span></code> instead.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install flask</span>\n<span class=\"hljs-keyword\">import</span> flask <span class=\"hljs-keyword\">as</span> fl\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">app = fl.Flask(__name__)                   <span class=\"hljs-comment\"># Returns application obj. Put at the top.</span>\napp.run(host=<span class=\"hljs-keyword\">None</span>, port=<span class=\"hljs-keyword\">None</span>, debug=<span class=\"hljs-keyword\">None</span>)  <span class=\"hljs-comment\"># Also `$ flask --app FILE run --ARG=VAL`.</span>\n</code></pre>\n<ul>\n<li><strong>Starts the app at <code class=\"python hljs\"><span class=\"hljs-string\">'http://localhost:5000'</span></code>. Use <code class=\"python hljs\"><span class=\"hljs-string\">'host=\"0.0.0.0\"'</span></code> to run externally.</strong></li>\n<li><strong>Install a <a href=\"https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface\">WSGI</a> server like <a href=\"https://flask.palletsprojects.com/en/latest/deploying/waitress/\">Waitress</a> and a HTTP server such as <a href=\"https://flask.palletsprojects.com/en/latest/deploying/nginx/\">Nginx</a> to get better security.</strong></li>\n<li><strong>Debug mode restarts the app whenever script changes and displays errors in the browser.</strong></li>\n</ul>\n<div><h3 id=\"servingfiles\">Serving Files</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">@app.route('/img/&lt;path:filename&gt;')</span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">serve_file</span><span class=\"hljs-params\">(filename)</span>:</span>\n    <span class=\"hljs-keyword\">return</span> fl.send_from_directory(<span class=\"hljs-string\">'DIRNAME'</span>, filename)\n</code></pre></div>\n\n<div><h3 id=\"servinghtml\">Serving HTML</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">@app.route('/&lt;sport&gt;')</span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">serve_html</span><span class=\"hljs-params\">(sport)</span>:</span>\n    <span class=\"hljs-keyword\">return</span> fl.render_template_string(<span class=\"hljs-string\">'&lt;h1&gt;{{title}}&lt;/h1&gt;'</span>, title=sport)\n</code></pre></div>\n\n<ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'fl.render_template(filename, &lt;kwargs&gt;)'</span></code> renders a file located in 'templates' dir.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'fl.abort(&lt;int&gt;)'</span></code> returns error code and <code class=\"python hljs\"><span class=\"hljs-string\">'return fl.redirect(&lt;url&gt;)'</span></code> redirects.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'fl.request.args[&lt;str&gt;]'</span></code> returns parameter from query string (URL part right of '?').</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'fl.session[&lt;str&gt;] = &lt;obj&gt;'</span></code> stores session data and <code class=\"python hljs\"><span class=\"hljs-string\">'fl.session.clear()'</span></code> clears it. A session cookie key needs to be set at the startup with <code class=\"python hljs\"><span class=\"hljs-string\">'app.secret_key = &lt;str&gt;'</span></code>.</strong></li>\n</ul>\n<div><h3 id=\"servingjson\">Serving JSON</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">@app.post('/&lt;sport&gt;/odds')</span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">serve_json</span><span class=\"hljs-params\">(sport)</span>:</span>\n    team = fl.request.form[<span class=\"hljs-string\">'team'</span>]\n    <span class=\"hljs-keyword\">return</span> {<span class=\"hljs-string\">'team'</span>: team, <span class=\"hljs-string\">'odds'</span>: [<span class=\"hljs-number\">2.09</span>, <span class=\"hljs-number\">3.74</span>, <span class=\"hljs-number\">3.68</span>]}\n</code></pre></div>\n\n<div><h4 id=\"startstheappinitsownthreadandqueriesitsrestapi\">Starts the app in its own thread and queries its REST API:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install requests</span>\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">import</span> threading, requests\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>threading.Thread(target=app.run, daemon=<span class=\"hljs-keyword\">True</span>).start()\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>url = <span class=\"hljs-string\">'http://localhost:5000/football/odds'</span>\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>response = requests.post(url, data={<span class=\"hljs-string\">'team'</span>: <span class=\"hljs-string\">'arsenal f.c.'</span>})\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>response.json()\n{<span class=\"hljs-string\">'team'</span>: <span class=\"hljs-string\">'arsenal f.c.'</span>, <span class=\"hljs-string\">'odds'</span>: [<span class=\"hljs-number\">2.09</span>, <span class=\"hljs-number\">3.74</span>, <span class=\"hljs-number\">3.68</span>]}\n</code></pre></div>\n\n<div><h2 id=\"profiling\"><a href=\"#profiling\" name=\"profiling\">#</a>Profiling</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> time <span class=\"hljs-keyword\">import</span> perf_counter\nstart_time = perf_counter()\n...\nduration_in_seconds = perf_counter() - start_time\n</code></pre></div>\n\n<div><h3 id=\"timingasnippet\">Timing a Snippet</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">from</span> timeit <span class=\"hljs-keyword\">import</span> timeit\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>timeit(<span class=\"hljs-string\">'list(range(10000))'</span>, number=<span class=\"hljs-number\">1000</span>, globals=globals(), setup=<span class=\"hljs-string\">'pass'</span>)\n<span class=\"hljs-number\">0.19373</span>\n</code></pre></div>\n\n<div><h3 id=\"profilingbyline\">Profiling by Line</h3><pre><code class=\"text language-text\">$ pip3 install line_profiler\n$ echo '@profile\ndef main():\n    a = list(range(10000))\n    b = set(range(10000))\nmain()' &gt; test.py\n$ kernprof -lv test.py\nLine #      Hits         Time  Per Hit   % Time  Line Contents\n==============================================================\n     1                                           @profile\n     2                                           def main():\n     3         1        253.4    253.4     32.2      a = list(range(10000))\n     4         1        534.1    534.1     67.8      b = set(range(10000))\n</code></pre></div>\n\n<div><h3 id=\"callandflamegraphs\">Call and Flame Graphs</h3><pre><code class=\"bash language-bash hljs\">$ apt install graphviz &amp;&amp; pip3 install gprof2dot snakeviz  <span class=\"hljs-comment\"># Or install graphviz.exe.</span>\n$ tail -n +2 test.py &gt; test.tmp &amp;&amp; mv test.tmp test.py     <span class=\"hljs-comment\"># Removes the first line.</span>\n$ python3 -m cProfile -o test.prof test.py                 <span class=\"hljs-comment\"># Runs a tracing profiler.</span>\n$ gprof2dot -f pstats test.prof | dot -T png -o test.png   <span class=\"hljs-comment\"># Generates a call graph.</span>\n$ xdg-open test.png                                        <span class=\"hljs-comment\"># Displays the call graph.</span>\n$ snakeviz test.prof                                       <span class=\"hljs-comment\"># Displays a flame graph.</span>\n</code></pre></div>\n\n<div><h3 id=\"samplingandmemoryprofilers\">Sampling and Memory Profilers</h3><pre><code class=\"text language-text\">┏━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━┯━━━━━━┓\n┃ pip3 install │   Target   │          How to run           │ Lines │ Live ┃\n┠──────────────┼────────────┼───────────────────────────────┼───────┼──────┨\n┃ pyinstrument │    CPU     │ pyinstrument test.py          │   ×   │  ×   ┃\n┃ py-spy       │    CPU     │ py-spy top -- python3 test.py │   ×   │  ✓   ┃\n┃ scalene      │ CPU+Memory │ scalene test.py               │   ✓   │  ×   ┃\n┃ memray       │   Memory   │ memray run --live test.py     │   ✓   │  ✓   ┃\n┗━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━┷━━━━━━┛\n</code></pre></div>\n\n<div><h2 id=\"numpy\"><a href=\"#numpy\" name=\"numpy\">#</a>NumPy</h2><p><strong>Array manipulation mini-language. It can run up to one hundred times faster than the equivalent Python code. An even faster alternative that runs on a GPU is called CuPy.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install numpy</span>\n<span class=\"hljs-keyword\">import</span> numpy <span class=\"hljs-keyword\">as</span> np\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;array&gt; = np.array(&lt;list/list_of_lists/…&gt; [, dtype])  <span class=\"hljs-comment\"># NumPy array of one or more dimensions.</span>\n&lt;array&gt; = np.zeros/ones/empty(shape)                  <span class=\"hljs-comment\"># Pass a tuple of ints (dimension sizes).</span>\n&lt;array&gt; = np.arange(from_inc, to_exc, ±step)          <span class=\"hljs-comment\"># Also np.linspace(start, stop, length).</span>\n&lt;array&gt; = np.random.randint(from_inc, to_exc, shape)  <span class=\"hljs-comment\"># Also random.uniform(low, high, shape).</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;view&gt;  = &lt;array&gt;.reshape(shape)                      <span class=\"hljs-comment\"># Also `&lt;array&gt;.shape = (&lt;int&gt;, [...])`.</span>\n&lt;array&gt; = &lt;array&gt;.flatten()                           <span class=\"hljs-comment\"># Returns 1d copy. Also &lt;array&gt;.ravel().</span>\n&lt;view&gt;  = &lt;array&gt;.transpose()                         <span class=\"hljs-comment\"># Flips the table over its main diagonal.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;array&gt; = np.copy/abs/sqrt/log/int64(&lt;array&gt;)         <span class=\"hljs-comment\"># Returns a new array of the same shape.</span>\n&lt;array&gt; = &lt;array&gt;.sum/max/mean/argmax/all(axis)       <span class=\"hljs-comment\"># Aggregates dimension with passed index.</span>\n&lt;array&gt; = np.apply_along_axis(&lt;func&gt;, axis, &lt;array&gt;)  <span class=\"hljs-comment\"># Func. can return a scalar or an array.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;array&gt; = np.concatenate(&lt;list_of_arrays&gt;, axis=<span class=\"hljs-number\">0</span>)    <span class=\"hljs-comment\"># Links arrays along first axis (rows).</span>\n&lt;array&gt; = np.vstack/column_stack(&lt;list_of_arrays&gt;)    <span class=\"hljs-comment\"># A 1d array is treated as a row/column.</span>\n&lt;array&gt; = np.tile/repeat(&lt;array&gt;, &lt;int/s&gt; [, axis])   <span class=\"hljs-comment\"># Tiles the array or repeats elements.</span>\n</code></pre>\n<ul>\n<li><strong>Shape is a tuple of dimension sizes. A 100x50 RGB image has shape (50, 100, 3).</strong></li>\n<li><strong>Axis is an index of a dimension. Leftmost dimension has index 0. Summing the RGB&nbsp;image along axis 2 will return a greyscale image with shape (50, 100).</strong></li>\n</ul>\n<div><h3 id=\"indexing\">Indexing</h3><pre><code class=\"bash hljs\">&lt;el&gt;       = &lt;2d&gt;[row_index, col_index]               <span class=\"hljs-comment\"># Also `&lt;3d&gt;[&lt;int&gt;, &lt;int&gt;, &lt;int&gt;]`.</span>\n&lt;1d_view&gt;  = &lt;2d&gt;[row_index]                          <span class=\"hljs-comment\"># Also `&lt;3d&gt;[&lt;int&gt;, &lt;int&gt;, &lt;slice&gt;]`.</span>\n&lt;1d_view&gt;  = &lt;2d&gt;[:, col_index]                       <span class=\"hljs-comment\"># Also `&lt;3d&gt;[&lt;int&gt;, &lt;slice&gt;, &lt;int&gt;]`.</span>\n&lt;2d_view&gt;  = &lt;2d&gt;[from:to_row_i, from:to_col_i]       <span class=\"hljs-comment\"># Also `&lt;3d&gt;[&lt;int&gt;, &lt;slice&gt;, &lt;slice&gt;]`.</span>\n</code></pre></div>\n\n<pre><code class=\"bash hljs\">&lt;1d_array&gt; = &lt;2d&gt;[row_indices, col_indices]           <span class=\"hljs-comment\"># Also `&lt;3d&gt;[&lt;int/1d&gt;, &lt;1d&gt;, &lt;1d&gt;]`.</span>\n&lt;2d_array&gt; = &lt;2d&gt;[row_indices]                        <span class=\"hljs-comment\"># Also `&lt;3d&gt;[&lt;int/1d&gt;, &lt;1d&gt;, &lt;slice&gt;]`.</span>\n&lt;2d_array&gt; = &lt;2d&gt;[:, col_indices]                     <span class=\"hljs-comment\"># Also `&lt;3d&gt;[&lt;int/1d&gt;, &lt;slice&gt;, &lt;1d&gt;]`.</span>\n&lt;2d_array&gt; = &lt;2d&gt;[np.ix_(row_indices, col_indices)]   <span class=\"hljs-comment\"># Also `&lt;3d&gt;[&lt;int/1d/2d&gt;, &lt;2d&gt;, &lt;2d&gt;]`.</span>\n</code></pre>\n<pre><code class=\"bash hljs\">&lt;2d_bools&gt; = &lt;2d&gt; &gt; &lt;el/1d/2d&gt;                        <span class=\"hljs-comment\"># A 1d object must be a size of a row.</span>\n&lt;1/2d_arr&gt; = &lt;2d&gt;[&lt;2d/1d_bools&gt;]                      <span class=\"hljs-comment\"># A 1d object must be a size of a col.</span>\n</code></pre>\n<ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">':'</span></code> returns a slice of all dimension's indices. If dimension is omitted, it defaults to <code class=\"python hljs\"><span class=\"hljs-string\">':'</span></code>.</strong></li>\n<li><strong>Passing two slices (line 4) works the same as when a slice and 1d array are passed (line 7).</strong></li>\n<li><strong>Python converts <code class=\"python hljs\"><span class=\"hljs-string\">'obj[i, j]'</span></code> to <code class=\"python hljs\"><span class=\"hljs-string\">'obj[(i, j)]'</span></code>. This makes <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;2d&gt;[row_i, col_i]'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;2d&gt;[row_indices]'</span></code> indistinguishable to NumPy if tuple of two indices is passed.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'ix_([1, 2], [3, 4])'</span></code> returns <code class=\"python hljs\"><span class=\"hljs-string\">'[[1], [2]]'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'[[3, 4]]'</span></code>. Due to broadcasting rules, this is the same as indexing via <code class=\"python hljs\"><span class=\"hljs-string\">'[[1, 1], [2, 2]]'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'[[3, 4], [3, 4]]'</span></code>.</strong></li>\n<li><strong>Any value that is broadcastable to the indexed shape can be assigned to the selection.</strong></li>\n</ul>\n<div><h3 id=\"broadcasting\">Broadcasting</h3><p><strong>Array reshaping procedure used by arithmetic operations, etc.</strong></p><pre><code class=\"python language-python hljs\">array_a = np.array([<span class=\"hljs-number\">0.1</span>,  <span class=\"hljs-number\">0.6</span>,  <span class=\"hljs-number\">0.8</span>])                 <span class=\"hljs-comment\"># I.e. `array_a.shape == (3,)`.</span>\narray_b = np.array([[<span class=\"hljs-number\">0.1</span>], [<span class=\"hljs-number\">0.6</span>], [<span class=\"hljs-number\">0.8</span>]])             <span class=\"hljs-comment\"># I.e. `array_b.shape == (3, 1)`.</span>\n</code></pre></div>\n\n\n<div><h4 id=\"1ifarrayshapesdifferinlengthleftpadtheshortershapewithones\">1. If array shapes differ in length, left-pad the shorter shape with ones:</h4><pre><code class=\"python language-python hljs\">array_a = np.array([[<span class=\"hljs-number\">0.1</span>,  <span class=\"hljs-number\">0.6</span>,  <span class=\"hljs-number\">0.8</span>]])               <span class=\"hljs-comment\"># I.e. `array_a.shape == (1, 3)`.</span>\narray_b = np.array([[<span class=\"hljs-number\">0.1</span>], [<span class=\"hljs-number\">0.6</span>], [<span class=\"hljs-number\">0.8</span>]])             <span class=\"hljs-comment\"># I.e. `array_b.shape == (3, 1)`.</span>\n</code></pre></div>\n\n<div><h4 id=\"2expanddimensionswithsize1byduplicatingtheirelementsarrays\">2. Expand dimensions with size 1 by duplicating their elements/arrays:</h4><pre><code class=\"python language-python hljs\">array_a = np.array([[<span class=\"hljs-number\">0.1</span>,  <span class=\"hljs-number\">0.6</span>,  <span class=\"hljs-number\">0.8</span>],                <span class=\"hljs-comment\"># I.e. `array_a.shape == (3, 3)`.</span>\n                    [<span class=\"hljs-number\">0.1</span>,  <span class=\"hljs-number\">0.6</span>,  <span class=\"hljs-number\">0.8</span>],\n                    [<span class=\"hljs-number\">0.1</span>,  <span class=\"hljs-number\">0.6</span>,  <span class=\"hljs-number\">0.8</span>]])\n\narray_b = np.array([[<span class=\"hljs-number\">0.1</span>,  <span class=\"hljs-number\">0.1</span>,  <span class=\"hljs-number\">0.1</span>],                <span class=\"hljs-comment\"># I.e. `array_b.shape == (3, 3)`.</span>\n                    [<span class=\"hljs-number\">0.6</span>,  <span class=\"hljs-number\">0.6</span>,  <span class=\"hljs-number\">0.6</span>],\n                    [<span class=\"hljs-number\">0.8</span>,  <span class=\"hljs-number\">0.8</span>,  <span class=\"hljs-number\">0.8</span>]])\n</code></pre></div>\n\n<div><h3 id=\"example-3\">Example</h3><div><h4 id=\"foreachpointreturnsindexofitsnearestpoint010608121\">For each point returns index of its nearest point (<code class=\"python hljs\">[<span class=\"hljs-number\">0.1</span>, <span class=\"hljs-number\">0.6</span>, <span class=\"hljs-number\">0.8</span>] =&gt; [<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">1</span>]</code>):</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>print(points := np.array([<span class=\"hljs-number\">0.1</span>, <span class=\"hljs-number\">0.6</span>, <span class=\"hljs-number\">0.8</span>]))\n[<span class=\"hljs-number\">0.1</span>  <span class=\"hljs-number\">0.6</span>  <span class=\"hljs-number\">0.8</span>]\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>print(wrapped_points := points.reshape(<span class=\"hljs-number\">3</span>, <span class=\"hljs-number\">1</span>))\n[[<span class=\"hljs-number\">0.1</span>]\n [<span class=\"hljs-number\">0.6</span>]\n [<span class=\"hljs-number\">0.8</span>]]\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>print(deltas := points - wrapped_points)\n[[ <span class=\"hljs-number\">0.</span>   <span class=\"hljs-number\">0.5</span>  <span class=\"hljs-number\">0.7</span>]\n [<span class=\"hljs-number\">-0.5</span>  <span class=\"hljs-number\">0.</span>   <span class=\"hljs-number\">0.2</span>]\n [<span class=\"hljs-number\">-0.7</span> <span class=\"hljs-number\">-0.2</span>  <span class=\"hljs-number\">0.</span> ]]\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>deltas[range(<span class=\"hljs-number\">3</span>), range(<span class=\"hljs-number\">3</span>)] = np.inf\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>print(distances := np.abs(deltas))\n[[inf  <span class=\"hljs-number\">0.5</span>  <span class=\"hljs-number\">0.7</span>]\n [<span class=\"hljs-number\">0.5</span>  inf  <span class=\"hljs-number\">0.2</span>]\n [<span class=\"hljs-number\">0.7</span>  <span class=\"hljs-number\">0.2</span>  inf]]\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>print(distances.argmin(axis=<span class=\"hljs-number\">1</span>))\n[<span class=\"hljs-number\">1</span> <span class=\"hljs-number\">2</span> <span class=\"hljs-number\">1</span>]\n</code></pre></div></div>\n\n\n<div><h2 id=\"image\"><a href=\"#image\" name=\"image\">#</a>Image</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install pillow</span>\n<span class=\"hljs-keyword\">from</span> PIL <span class=\"hljs-keyword\">import</span> Image\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;Image&gt; = Image.new(<span class=\"hljs-string\">'RGB'</span>, (width, height))   <span class=\"hljs-comment\"># Creates an image. Also `color=&lt;tuple_of_ints&gt;`.</span>\n&lt;Image&gt; = Image.open(&lt;path&gt;)                  <span class=\"hljs-comment\"># Identifies format based on the file's contents.</span>\n&lt;Image&gt; = &lt;Image&gt;.convert(<span class=\"hljs-string\">'&lt;mode&gt;'</span>)           <span class=\"hljs-comment\"># Converts the image to the new mode (see Modes).</span>\n&lt;Image&gt;.save(&lt;path&gt;)                          <span class=\"hljs-comment\"># Also `quality=&lt;int&gt;` if extension is jpg/jpeg.</span>\n&lt;Image&gt;.show()                                <span class=\"hljs-comment\"># Displays image in system's default preview app.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;int/tup&gt; = &lt;Image&gt;.getpixel((x, y))          <span class=\"hljs-comment\"># Returns the pixel's value, that is, its color.</span>\n&lt;ImgCore&gt; = &lt;Image&gt;.getdata()                 <span class=\"hljs-comment\"># Returns a flattened view of the pixel values.</span>\n&lt;Image&gt;.putpixel((x, y), &lt;int/tuple&gt;)         <span class=\"hljs-comment\"># Updates pixel's value. Clips passed integer/s.</span>\n&lt;Image&gt;.putdata(&lt;list/ImgCore&gt;)               <span class=\"hljs-comment\"># Updates pixels with a copy of passed sequence.</span>\n&lt;Image&gt;.paste(&lt;Image&gt;, (x, y))                <span class=\"hljs-comment\"># Draws passed image at the specified location.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;Image&gt; = &lt;Image&gt;.filter(&lt;Filter&gt;)            <span class=\"hljs-comment\"># Accepts ImageFilter.BLUR/SHARPEN/FIND_EDGES/….</span>\n&lt;Image&gt; = &lt;Enhance&gt;.enhance(&lt;float&gt;)          <span class=\"hljs-comment\"># E.g. `ImageEnhance.Contrast/Color/…(&lt;Image&gt;)`.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;array&gt; = np.array(&lt;Image&gt;)                   <span class=\"hljs-comment\"># Creates a 2d or 3d NumPy array from the image.</span>\n&lt;Image&gt; = Image.fromarray(np.uint8(&lt;array&gt;))  <span class=\"hljs-comment\"># Use `&lt;array&gt;.clip(0, 255)` to clip the values.</span>\n</code></pre>\n<div><h3 id=\"modes-1\">Modes</h3><ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'L'</span></code> - Lightness (greyscale image). Each pixel is stored as an int between 0 and 255.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'RGB'</span></code> - Red, green, blue (true color image). Each pixel is a tuple of three integers.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'RGBA'</span></code> - RGB with alpha. Low alpha (i.e. fourth int) makes pixel more transparent.</strong></li>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'HSV'</span></code> - Hue, saturation, value. Three ints representing color in HSV color space.</strong></li>\n</ul><div><h3 id=\"examples\">Examples</h3><div><h4 id=\"createsapngimageofarainbowgradient\">Creates a PNG image of a rainbow gradient:</h4><pre><code class=\"python language-python hljs\">WIDTH, HEIGHT = <span class=\"hljs-number\">100</span>, <span class=\"hljs-number\">100</span>\nn_pixels = WIDTH * HEIGHT\nhues = (<span class=\"hljs-number\">255</span> * i/n_pixels <span class=\"hljs-keyword\">for</span> i <span class=\"hljs-keyword\">in</span> range(n_pixels))\nimg = Image.new(<span class=\"hljs-string\">'HSV'</span>, (WIDTH, HEIGHT))\nimg.putdata([(int(h), <span class=\"hljs-number\">255</span>, <span class=\"hljs-number\">255</span>) <span class=\"hljs-keyword\">for</span> h <span class=\"hljs-keyword\">in</span> hues])\nimg.convert(<span class=\"hljs-string\">'RGB'</span>).save(<span class=\"hljs-string\">'test.png'</span>)\n</code></pre></div></div></div>\n\n\n\n\n<div><h4 id=\"addsnoisetothepngimageanddisplaysit\">Adds noise to the PNG image and displays it:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> random <span class=\"hljs-keyword\">import</span> randint\nadd_noise = <span class=\"hljs-keyword\">lambda</span> value: max(<span class=\"hljs-number\">0</span>, min(<span class=\"hljs-number\">255</span>, value + randint(<span class=\"hljs-number\">-20</span>, <span class=\"hljs-number\">20</span>)))\nimg = Image.open(<span class=\"hljs-string\">'test.png'</span>).convert(<span class=\"hljs-string\">'HSV'</span>)\nimg.putdata([(add_noise(h), s, v) <span class=\"hljs-keyword\">for</span> h, s, v <span class=\"hljs-keyword\">in</span> img.getdata()])\nimg.show()\n</code></pre></div>\n\n<div><h3 id=\"imagedraw\">Image Draw</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> PIL <span class=\"hljs-keyword\">import</span> ImageDraw\n&lt;Draw&gt; = ImageDraw.Draw(&lt;Image&gt;)              <span class=\"hljs-comment\"># An object for adding 2D graphics to the image.</span>\n&lt;Draw&gt;.point((x, y))                          <span class=\"hljs-comment\"># Draws a point. Accepts `fill=&lt;int/tuple/str&gt;`.</span>\n&lt;Draw&gt;.line((x1, y1, x2, y2 [, ...]))         <span class=\"hljs-comment\"># To get anti-aliasing use &lt;Img&gt;.resize((w, h)).</span>\n&lt;Draw&gt;.arc((x1, y1, x2, y2), deg1, deg2)      <span class=\"hljs-comment\"># Draws arc of an ellipse in clockwise direction.</span>\n&lt;Draw&gt;.rectangle((x1, y1, x2, y2))            <span class=\"hljs-comment\"># Also rounded_rectangle() and regular_polygon().</span>\n&lt;Draw&gt;.polygon((x1, y1, x2, y2, ...))         <span class=\"hljs-comment\"># The last point gets connected to the first one.</span>\n&lt;Draw&gt;.ellipse((x1, y1, x2, y2))              <span class=\"hljs-comment\"># To rotate it use &lt;Image&gt;.rotate(anticlock_deg).</span>\n&lt;Draw&gt;.text((x, y), &lt;str&gt;)                    <span class=\"hljs-comment\"># Accepts `font=ImageFont.truetype(path, size)`.</span>\n</code></pre></div>\n\n<ul>\n<li><strong>Pass <code class=\"python hljs\"><span class=\"hljs-string\">'fill=&lt;color&gt;'</span></code> to set primary color of the figure.</strong></li>\n<li><strong>Pass <code class=\"python hljs\"><span class=\"hljs-string\">'width=&lt;int&gt;'</span></code> to set the width of lines or contours.</strong></li>\n<li><strong>Pass <code class=\"python hljs\"><span class=\"hljs-string\">'outline=&lt;color&gt;'</span></code> to set the color of the contours.</strong></li>\n<li><strong>Color can be an int, tuple, <code class=\"python hljs\"><span class=\"hljs-string\">'#rrggbb[aa]'</span></code> or color name.</strong></li>\n</ul>\n<div><h2 id=\"animation\"><a href=\"#animation\" name=\"animation\">#</a>Animation</h2><div><h4 id=\"createsagifofabouncingball\">Creates a GIF of a bouncing ball:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install imageio</span>\n<span class=\"hljs-keyword\">from</span> PIL <span class=\"hljs-keyword\">import</span> Image, ImageDraw\n<span class=\"hljs-keyword\">import</span> imageio\n\nWIDTH, HEIGHT, R = <span class=\"hljs-number\">126</span>, <span class=\"hljs-number\">126</span>, <span class=\"hljs-number\">10</span>\nframes = []\n<span class=\"hljs-keyword\">for</span> velocity <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">16</span>):\n    y = sum(range(velocity))\n    frame = Image.new(<span class=\"hljs-string\">'L'</span>, (WIDTH, HEIGHT))\n    draw = ImageDraw.Draw(frame)\n    draw.ellipse((WIDTH/<span class=\"hljs-number\">2</span>-R, y, WIDTH/<span class=\"hljs-number\">2</span>+R, y+R*<span class=\"hljs-number\">2</span>), fill=<span class=\"hljs-string\">'white'</span>)\n    frames.append(frame)\nframes += reversed(frames[<span class=\"hljs-number\">1</span>:<span class=\"hljs-number\">-1</span>])\nimageio.mimsave(<span class=\"hljs-string\">'test.gif'</span>, frames, duration=<span class=\"hljs-number\">0.03</span>)\n</code></pre></div></div>\n\n\n<div><h2 id=\"audio\"><a href=\"#audio\" name=\"audio\">#</a>Audio</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> wave\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;Wave&gt;  = wave.open(<span class=\"hljs-string\">'&lt;path&gt;'</span>)               <span class=\"hljs-comment\"># Opens specified WAV file for reading.</span>\n&lt;int&gt;   = &lt;Wave&gt;.getframerate()             <span class=\"hljs-comment\"># Returns number of frames per second.</span>\n&lt;int&gt;   = &lt;Wave&gt;.getnchannels()             <span class=\"hljs-comment\"># Returns number of samples per frame.</span>\n&lt;int&gt;   = &lt;Wave&gt;.getsampwidth()             <span class=\"hljs-comment\"># Returns number of bytes per sample.</span>\n&lt;tuple&gt; = &lt;Wave&gt;.getparams()                <span class=\"hljs-comment\"># Returns namedtuple of all parameters.</span>\n&lt;bytes&gt; = &lt;Wave&gt;.readframes(nframes)        <span class=\"hljs-comment\"># Returns all frames if `-1` is passed.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;Wave&gt; = wave.open(<span class=\"hljs-string\">'&lt;path&gt;'</span>, <span class=\"hljs-string\">'wb'</span>)          <span class=\"hljs-comment\"># Creates/truncates a file for writing.</span>\n&lt;Wave&gt;.setframerate(&lt;int&gt;)                  <span class=\"hljs-comment\"># Pass 44100, or 48000 for video track.</span>\n&lt;Wave&gt;.setnchannels(&lt;int&gt;)                  <span class=\"hljs-comment\"># Pass 1 for mono, 2 for stereo signal.</span>\n&lt;Wave&gt;.setsampwidth(&lt;int&gt;)                  <span class=\"hljs-comment\"># Pass 2 for CD, 3 for hi-res quality.</span>\n&lt;Wave&gt;.setparams(&lt;tuple&gt;)                   <span class=\"hljs-comment\"># Passed tuple must contain all params.</span>\n&lt;Wave&gt;.writeframes(&lt;bytes&gt;)                 <span class=\"hljs-comment\"># Appends passed frames to audio file.</span>\n</code></pre>\n<ul>\n<li><strong>The bytes object contains a sequence of frames, each consisting of one or more samples.</strong></li>\n<li><strong>In stereo signal, first sample of a frame belongs to the left channel (second to the right).</strong></li>\n<li><strong>Each sample consists of one or more bytes (depending on sample width) that, when con­verted to an integer, indicate the displacement of a speaker membrane at that moment.</strong></li>\n<li><strong>If sample width is one byte, then the integer should be encoded unsigned. For all other sizes, the integer should be encoded signed with little-endian byte order.</strong></li>\n</ul>\n<div><h3 id=\"samplevalues\">Sample Values</h3><pre><code class=\"python hljs\">┏━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━━┓\n┃ sampwidth │    min    │ zero │    max    ┃\n┠───────────┼───────────┼──────┼───────────┨\n┃     <span class=\"hljs-number\">1</span>     │         <span class=\"hljs-number\">0</span> │  <span class=\"hljs-number\">128</span> │       <span class=\"hljs-number\">255</span> ┃\n┃     <span class=\"hljs-number\">2</span>     │    <span class=\"hljs-number\">-32768</span> │    <span class=\"hljs-number\">0</span> │     <span class=\"hljs-number\">32767</span> ┃\n┃     <span class=\"hljs-number\">3</span>     │  <span class=\"hljs-number\">-8388608</span> │    <span class=\"hljs-number\">0</span> │   <span class=\"hljs-number\">8388607</span> ┃\n┗━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━━┛\n</code></pre></div>\n\n<div><h3 id=\"readfloatsamplesfromwavfile\">Read Float Samples from WAV File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">read_wav_file</span><span class=\"hljs-params\">(filename)</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_int</span><span class=\"hljs-params\">(bytes_obj)</span>:</span>\n        an_int = int.from_bytes(bytes_obj, <span class=\"hljs-string\">'little'</span>, signed=(p.sampwidth != <span class=\"hljs-number\">1</span>))\n        <span class=\"hljs-keyword\">return</span> an_int - (<span class=\"hljs-number\">128</span> * (p.sampwidth == <span class=\"hljs-number\">1</span>))\n    <span class=\"hljs-keyword\">with</span> wave.open(filename) <span class=\"hljs-keyword\">as</span> file:\n        p = file.getparams()\n        frames = file.readframes(<span class=\"hljs-number\">-1</span>)\n    samples_b = (frames[i : i + p.sampwidth] <span class=\"hljs-keyword\">for</span> i <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">0</span>, len(frames), p.sampwidth))\n    <span class=\"hljs-keyword\">return</span> [get_int(b) / pow(<span class=\"hljs-number\">2</span>, (p.sampwidth * <span class=\"hljs-number\">8</span>) - <span class=\"hljs-number\">1</span>) <span class=\"hljs-keyword\">for</span> b <span class=\"hljs-keyword\">in</span> samples_b], p\n</code></pre></div>\n\n<div><h3 id=\"writefloatsamplestowavfile\">Write Float Samples to WAV File</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">write_to_wav_file</span><span class=\"hljs-params\">(filename, samples_f, p=<span class=\"hljs-keyword\">None</span>, nchannels=<span class=\"hljs-number\">1</span>, sampwidth=<span class=\"hljs-number\">2</span>, fs=<span class=\"hljs-number\">44100</span>)</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_bytes</span><span class=\"hljs-params\">(a_float)</span>:</span>\n        a_float = max(<span class=\"hljs-number\">-1</span>, min(<span class=\"hljs-number\">1</span> - <span class=\"hljs-number\">2e-16</span>, a_float)) + (p.sampwidth == <span class=\"hljs-number\">1</span>)\n        a_float *= pow(<span class=\"hljs-number\">2</span>, (p.sampwidth * <span class=\"hljs-number\">8</span>) - <span class=\"hljs-number\">1</span>)\n        <span class=\"hljs-keyword\">return</span> int(a_float).to_bytes(p.sampwidth, <span class=\"hljs-string\">'little'</span>, signed=(p.sampwidth != <span class=\"hljs-number\">1</span>))\n    <span class=\"hljs-keyword\">if</span> p <span class=\"hljs-keyword\">is</span> <span class=\"hljs-keyword\">None</span>:\n        p = wave._wave_params(nchannels, sampwidth, fs, <span class=\"hljs-number\">0</span>, <span class=\"hljs-string\">'NONE'</span>, <span class=\"hljs-string\">'not compressed'</span>)\n    <span class=\"hljs-keyword\">with</span> wave.open(filename, <span class=\"hljs-string\">'wb'</span>) <span class=\"hljs-keyword\">as</span> file:\n        file.setparams(p)\n        file.writeframes(<span class=\"hljs-string\">b''</span>.join(get_bytes(f) <span class=\"hljs-keyword\">for</span> f <span class=\"hljs-keyword\">in</span> samples_f))\n</code></pre></div>\n\n<div><h3 id=\"examples-1\">Examples</h3><div><h4 id=\"savesa440hzsinewavetoamonowavfile\">Saves a 440 Hz sine wave to a mono WAV file:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> math <span class=\"hljs-keyword\">import</span> sin, pi\nget_sin = <span class=\"hljs-keyword\">lambda</span> i: sin(i * <span class=\"hljs-number\">2</span> * pi * <span class=\"hljs-number\">440</span> / <span class=\"hljs-number\">44100</span>) * <span class=\"hljs-number\">0.2</span>\nwrite_to_wav_file(<span class=\"hljs-string\">'test.wav'</span>, (get_sin(i) <span class=\"hljs-keyword\">for</span> i <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">100_000</span>)))\n</code></pre></div></div>\n\n\n<div><h4 id=\"addsnoisetothewavfile\">Adds noise to the WAV file:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> random <span class=\"hljs-keyword\">import</span> uniform\nsamples_f, prms = read_wav_file(<span class=\"hljs-string\">'test.wav'</span>)\nsamples_f = (f + uniform(<span class=\"hljs-number\">-0.02</span>, <span class=\"hljs-number\">0.02</span>) <span class=\"hljs-keyword\">for</span> f <span class=\"hljs-keyword\">in</span> samples_f)\nwrite_to_wav_file(<span class=\"hljs-string\">'test.wav'</span>, samples_f, p=prms)\n</code></pre></div>\n\n<div><h3 id=\"audioplayer\">Audio Player</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install nava</span>\n<span class=\"hljs-keyword\">from</span> nava <span class=\"hljs-keyword\">import</span> play\nplay(<span class=\"hljs-string\">'test.wav'</span>)\n</code></pre></div>\n\n<div><h3 id=\"texttospeech\">Text to Speech</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install piper-tts sounddevice</span>\n<span class=\"hljs-keyword\">import</span> os, piper, sounddevice\nos.system(<span class=\"hljs-string\">'python3 -m piper.download_voices en_US-lessac-high'</span>)\nvoice = piper.PiperVoice.load(<span class=\"hljs-string\">'en_US-lessac-high.onnx'</span>)\n<span class=\"hljs-keyword\">for</span> sentence <span class=\"hljs-keyword\">in</span> voice.synthesize(<span class=\"hljs-string\">'Sally sells seashells by the seashore.'</span>):\n    sounddevice.wait()\n    sounddevice.play(sentence.audio_float_array, sentence.sample_rate)\nsounddevice.wait()\n</code></pre></div>\n\n<div><h2 id=\"synthesizer\"><a href=\"#synthesizer\" name=\"synthesizer\">#</a>Synthesizer</h2><div><h4 id=\"playspopcornbygershonkingsley\">Plays Popcorn by Gershon Kingsley:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install numpy sounddevice</span>\n<span class=\"hljs-keyword\">import</span> itertools <span class=\"hljs-keyword\">as</span> it, math, numpy <span class=\"hljs-keyword\">as</span> np, sounddevice\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">play_notes</span><span class=\"hljs-params\">(notes, bpm=<span class=\"hljs-number\">132</span>, fs=<span class=\"hljs-number\">44100</span>, volume=<span class=\"hljs-number\">0.1</span>)</span>:</span>\n    beat_len  = <span class=\"hljs-number\">60</span>/bpm * fs\n    get_pause = <span class=\"hljs-keyword\">lambda</span> n_beats: it.repeat(<span class=\"hljs-number\">0</span>, int(n_beats * beat_len))\n    get_sinus = <span class=\"hljs-keyword\">lambda</span> i, hz: math.sin(i * <span class=\"hljs-number\">2</span> * math.pi * hz / fs) * volume\n    get_wave  = <span class=\"hljs-keyword\">lambda</span> hz, n_beats: (get_sinus(i, hz) <span class=\"hljs-keyword\">for</span> i <span class=\"hljs-keyword\">in</span> range(int(n_beats * beat_len)))\n    get_hertz = <span class=\"hljs-keyword\">lambda</span> note: <span class=\"hljs-number\">440</span> * <span class=\"hljs-number\">2</span> ** ((int(note[:<span class=\"hljs-number\">2</span>]) - <span class=\"hljs-number\">69</span>) / <span class=\"hljs-number\">12</span>)\n    get_beats = <span class=\"hljs-keyword\">lambda</span> note: <span class=\"hljs-number\">1</span>/<span class=\"hljs-number\">2</span> <span class=\"hljs-keyword\">if</span> <span class=\"hljs-string\">'♩'</span> <span class=\"hljs-keyword\">in</span> note <span class=\"hljs-keyword\">else</span> <span class=\"hljs-number\">1</span>/<span class=\"hljs-number\">4</span> <span class=\"hljs-keyword\">if</span> <span class=\"hljs-string\">'♪'</span> <span class=\"hljs-keyword\">in</span> note <span class=\"hljs-keyword\">else</span> <span class=\"hljs-number\">1</span>\n    get_samps = <span class=\"hljs-keyword\">lambda</span> n: get_wave(get_hertz(n), get_beats(n)) <span class=\"hljs-keyword\">if</span> n <span class=\"hljs-keyword\">else</span> get_pause(<span class=\"hljs-number\">1</span>/<span class=\"hljs-number\">4</span>)\n    samples_f = it.chain(get_pause(<span class=\"hljs-number\">1</span>/<span class=\"hljs-number\">2</span>), *(get_samps(n) <span class=\"hljs-keyword\">for</span> n <span class=\"hljs-keyword\">in</span> notes.split(<span class=\"hljs-string\">','</span>)))\n    sounddevice.play(np.fromiter(samples_f, np.float32), fs, blocking=<span class=\"hljs-keyword\">True</span>)\n\nplay_notes(<span class=\"hljs-string\">'83♩,81♪,,83♪,,78♪,,74♪,,78♪,,71♪,,,,83♪,,81♪,,83♪,,78♪,,74♪,,78♪,,71♪,,,,'</span>\n           <span class=\"hljs-string\">'83♩,85♪,,86♪,,85♪,,86♪,,83♪,,85♩,83♪,,85♪,,81♪,,83♪,,81♪,,83♪,,79♪,,83♪,,,,'</span>)\n</code></pre></div></div>\n\n\n<div><h2 id=\"pygame\"><a href=\"#pygame\" name=\"pygame\">#</a>Pygame</h2><div><h4 id=\"opensawindowanddrawsasquarethatcanbemovedwitharrowkeys\">Opens a window and draws a square that can be moved with arrow keys:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install pygame</span>\n<span class=\"hljs-keyword\">import</span> pygame <span class=\"hljs-keyword\">as</span> pg\n\npg.init()\nscreen = pg.display.set_mode((<span class=\"hljs-number\">500</span>, <span class=\"hljs-number\">500</span>))\nrect = pg.Rect(<span class=\"hljs-number\">240</span>, <span class=\"hljs-number\">240</span>, <span class=\"hljs-number\">20</span>, <span class=\"hljs-number\">20</span>)\n<span class=\"hljs-keyword\">while</span> <span class=\"hljs-keyword\">not</span> pg.event.get(pg.QUIT):\n    <span class=\"hljs-keyword\">for</span> event <span class=\"hljs-keyword\">in</span> pg.event.get(pg.KEYDOWN):\n        dx = (event.key == pg.K_RIGHT) - (event.key == pg.K_LEFT)\n        dy = (event.key == pg.K_DOWN) - (event.key == pg.K_UP)\n        rect = rect.move((dx * <span class=\"hljs-number\">20</span>, dy * <span class=\"hljs-number\">20</span>))\n    screen.fill(pg.Color(<span class=\"hljs-string\">'black'</span>))\n    pg.draw.rect(screen, pg.Color(<span class=\"hljs-string\">'white'</span>), rect)\n    pg.display.flip()\npg.quit()\n</code></pre></div></div>\n\n\n<div><h3 id=\"rect\">Rect</h3><p><strong>Object for storing rectangular coordinates.</strong></p><pre><code class=\"python language-python hljs\">&lt;Rect&gt; = pg.Rect(x, y, width, height)           <span class=\"hljs-comment\"># Creates Rect object. Truncates passed floats.</span>\n&lt;int&gt;  = &lt;Rect&gt;.x/y/centerx/centery/…           <span class=\"hljs-comment\"># `top/right/bottom/left`. Allows assignments.</span>\n&lt;tup.&gt; = &lt;Rect&gt;.topleft/center/…                <span class=\"hljs-comment\"># `topright/bottomright/bottomleft/size`. Same.</span>\n&lt;Rect&gt; = &lt;Rect&gt;.move((delta_x, delta_y))        <span class=\"hljs-comment\"># Use move_ip() to move the rectangle in-place.</span>\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;bool&gt; = &lt;Rect&gt;.collidepoint((x, y))            <span class=\"hljs-comment\"># Returns True if rectangle contains the point.</span>\n&lt;bool&gt; = &lt;Rect&gt;.colliderect(&lt;Rect&gt;)             <span class=\"hljs-comment\"># Returns True if the rectangles are colliding.</span>\n&lt;int&gt;  = &lt;Rect&gt;.collidelist(&lt;list_of_Rect&gt;)     <span class=\"hljs-comment\"># Returns index of first colliding Rect or -1.</span>\n&lt;list&gt; = &lt;Rect&gt;.collidelistall(&lt;list_of_Rect&gt;)  <span class=\"hljs-comment\"># Returns indices of all colliding rectangles.</span>\n</code></pre>\n<div><h3 id=\"surface\">Surface</h3><p><strong>Object for representing images.</strong></p><pre><code class=\"python language-python hljs\">&lt;Surf&gt; = pg.display.set_mode((width, height))   <span class=\"hljs-comment\"># Opens new window and returns surface object.</span>\n&lt;Surf&gt; = pg.Surface((width, height))            <span class=\"hljs-comment\"># New RGB surface. RGBA if `flags=pg.SRCALPHA`.</span>\n&lt;Surf&gt; = pg.image.load(&lt;path/file&gt;)             <span class=\"hljs-comment\"># Loads the image. Also get_width/get_height().</span>\n&lt;Surf&gt; = pg.surfarray.make_surface(&lt;np_array&gt;)  <span class=\"hljs-comment\"># Also `&lt;np_arr&gt; = surfarray.pixels3d(&lt;Surf&gt;)`.</span>\n&lt;Surf&gt; = &lt;Surf&gt;.subsurface(&lt;Rect&gt;)              <span class=\"hljs-comment\"># Creates a new surface object from the cutout.</span>\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;Surf&gt;.fill(color)                              <span class=\"hljs-comment\"># Pass tuple of ints or pg.Color('&lt;name/hex&gt;').</span>\n&lt;Surf&gt;.set_at((x, y), color)                    <span class=\"hljs-comment\"># Updates a pixel. Also &lt;Surf&gt;.get_at((x, y)).</span>\n&lt;Surf&gt;.blit(&lt;Surf&gt;, (x, y))                     <span class=\"hljs-comment\"># Draws passed surface at a specified location.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> pygame.transform <span class=\"hljs-keyword\">import</span> scale, rotate      <span class=\"hljs-comment\"># Also flip, smoothscale, scale_by, rotozoom.</span>\n&lt;Surf&gt; = scale(&lt;Surf&gt;, (width, height))         <span class=\"hljs-comment\"># Scales the surface. `smoothscale()` blurs it.</span>\n&lt;Surf&gt; = rotate(&lt;Surf&gt;, angle)                  <span class=\"hljs-comment\"># Rotates the surface for counterclock degrees.</span>\n&lt;Surf&gt; = flip(&lt;Surf&gt;, flip_x=<span class=\"hljs-keyword\">True</span>)              <span class=\"hljs-comment\"># Mirrors over the y axis. Also `flip_y=True`.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">from</span> pygame.draw <span class=\"hljs-keyword\">import</span> line, arc, rect         <span class=\"hljs-comment\"># Also ellipse, circle, polygon, lines, aaline.</span>\nline(&lt;Surf&gt;, color, (x1, y1), (x2, y2))         <span class=\"hljs-comment\"># Draws line to surface. Accepts `width=&lt;int&gt;`.</span>\narc(&lt;Surf&gt;, color, &lt;Rect&gt;, from_rad, to_rad)    <span class=\"hljs-comment\"># Also ellipse(&lt;Surf&gt;, color, &lt;Rect&gt;, width=0).</span>\nrect(&lt;Surf&gt;, color, &lt;Rect&gt;, width=<span class=\"hljs-number\">0</span>)            <span class=\"hljs-comment\"># Also polygon(&lt;Surf&gt;, color, points, width=0).</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;Font&gt; = pg.font.Font(&lt;path/file&gt;, size)        <span class=\"hljs-comment\"># Loads a TTF file. Pass None for default font.</span>\n&lt;Surf&gt; = &lt;Font&gt;.render(text, antialias, color)  <span class=\"hljs-comment\"># Accepts background color via fourth argument.</span>\n</code></pre>\n<div><h3 id=\"sound\">Sound</h3><pre><code class=\"python language-python hljs\">&lt;Sound&gt; = pg.mixer.Sound(&lt;path/file/bytes&gt;)     <span class=\"hljs-comment\"># Accepts WAV file or array of short integers.</span>\n&lt;Sound&gt;.play/stop()                             <span class=\"hljs-comment\"># Also set_volume(&lt;float&gt;) and fadeout(msec).</span>\n</code></pre></div>\n\n<div><h3 id=\"basicmariobrothersexample\">Basic Mario Brothers Example</h3><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">import</span> collections, dataclasses, enum, io, itertools <span class=\"hljs-keyword\">as</span> it, pygame <span class=\"hljs-keyword\">as</span> pg, urllib.request\n<span class=\"hljs-keyword\">from</span> random <span class=\"hljs-keyword\">import</span> randint\n\nP = collections.namedtuple(<span class=\"hljs-string\">'P'</span>, <span class=\"hljs-string\">'x y'</span>)          <span class=\"hljs-comment\"># Position (x and y coordinates).</span>\nD = enum.Enum(<span class=\"hljs-string\">'D'</span>, <span class=\"hljs-string\">'n e s w'</span>)                   <span class=\"hljs-comment\"># Direction (north, east, etc.).</span>\nW, H, MAX_S = <span class=\"hljs-number\">50</span>, <span class=\"hljs-number\">50</span>, P(<span class=\"hljs-number\">5</span>, <span class=\"hljs-number\">10</span>)                  <span class=\"hljs-comment\"># Width, height, maximum speed.</span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">main</span><span class=\"hljs-params\">()</span>:</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_screen</span><span class=\"hljs-params\">()</span>:</span>\n        pg.init()\n        <span class=\"hljs-keyword\">return</span> pg.display.set_mode((W*<span class=\"hljs-number\">16</span>, H*<span class=\"hljs-number\">16</span>))\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_images</span><span class=\"hljs-params\">()</span>:</span>\n        url = <span class=\"hljs-string\">'https://gto76.github.io/python-cheatsheet/web/mario_bros.png'</span>\n        img = pg.image.load(io.BytesIO(urllib.request.urlopen(url).read()))\n        <span class=\"hljs-keyword\">return</span> [img.subsurface(get_rect(x, <span class=\"hljs-number\">0</span>)) <span class=\"hljs-keyword\">for</span> x <span class=\"hljs-keyword\">in</span> range(img.get_width() // <span class=\"hljs-number\">16</span>)]\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_mario</span><span class=\"hljs-params\">()</span>:</span>\n        Mario = dataclasses.make_dataclass(<span class=\"hljs-string\">'Mario'</span>, <span class=\"hljs-string\">'rect spd facing_left frame_cycle'</span>.split())\n        <span class=\"hljs-keyword\">return</span> Mario(get_rect(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">1</span>), P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">0</span>), <span class=\"hljs-keyword\">False</span>, it.cycle(range(<span class=\"hljs-number\">3</span>)))\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_tiles</span><span class=\"hljs-params\">()</span>:</span>\n        border = [(x, y) <span class=\"hljs-keyword\">for</span> x <span class=\"hljs-keyword\">in</span> range(W) <span class=\"hljs-keyword\">for</span> y <span class=\"hljs-keyword\">in</span> range(H) <span class=\"hljs-keyword\">if</span> x <span class=\"hljs-keyword\">in</span> [<span class=\"hljs-number\">0</span>, W-<span class=\"hljs-number\">1</span>] <span class=\"hljs-keyword\">or</span> y <span class=\"hljs-keyword\">in</span> [<span class=\"hljs-number\">0</span>, H-<span class=\"hljs-number\">1</span>]]\n        platforms = [(randint(<span class=\"hljs-number\">1</span>, W-<span class=\"hljs-number\">2</span>), randint(<span class=\"hljs-number\">2</span>, H-<span class=\"hljs-number\">2</span>)) <span class=\"hljs-keyword\">for</span> _ <span class=\"hljs-keyword\">in</span> range(W*H // <span class=\"hljs-number\">10</span>)]\n        <span class=\"hljs-keyword\">return</span> [get_rect(x, y) <span class=\"hljs-keyword\">for</span> x, y <span class=\"hljs-keyword\">in</span> border + platforms]\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_rect</span><span class=\"hljs-params\">(x, y)</span>:</span>\n        <span class=\"hljs-keyword\">return</span> pg.Rect(x*<span class=\"hljs-number\">16</span>, y*<span class=\"hljs-number\">16</span>, <span class=\"hljs-number\">16</span>, <span class=\"hljs-number\">16</span>)\n    run(get_screen(), get_images(), get_mario(), get_tiles())\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">run</span><span class=\"hljs-params\">(screen, images, mario, tiles)</span>:</span>\n    clock = pg.time.Clock()\n    pressed = set()\n    <span class=\"hljs-keyword\">while</span> <span class=\"hljs-keyword\">not</span> pg.event.get(pg.QUIT):\n        clock.tick(<span class=\"hljs-number\">28</span>)\n        pressed |= {e.key <span class=\"hljs-keyword\">for</span> e <span class=\"hljs-keyword\">in</span> pg.event.get(pg.KEYDOWN)}\n        pressed -= {e.key <span class=\"hljs-keyword\">for</span> e <span class=\"hljs-keyword\">in</span> pg.event.get(pg.KEYUP)}\n        update_speed(mario, tiles, pressed)\n        update_position(mario, tiles)\n        draw(screen, images, mario, tiles)\n    pg.quit()\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">update_speed</span><span class=\"hljs-params\">(mario, tiles, pressed)</span>:</span>\n    x, y = mario.spd\n    x += <span class=\"hljs-number\">2</span> * ((pg.K_RIGHT <span class=\"hljs-keyword\">in</span> pressed) - (pg.K_LEFT <span class=\"hljs-keyword\">in</span> pressed))\n    x += (x &lt; <span class=\"hljs-number\">0</span>) - (x &gt; <span class=\"hljs-number\">0</span>)\n    y += <span class=\"hljs-number\">1</span> <span class=\"hljs-keyword\">if</span> D.s <span class=\"hljs-keyword\">not</span> <span class=\"hljs-keyword\">in</span> get_boundaries(mario.rect, tiles) <span class=\"hljs-keyword\">else</span> (pg.K_UP <span class=\"hljs-keyword\">in</span> pressed) * <span class=\"hljs-number\">-10</span>\n    mario.spd = P(x=max(-MAX_S.x, min(MAX_S.x, x)), y=max(-MAX_S.y, min(MAX_S.y, y)))\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">update_position</span><span class=\"hljs-params\">(mario, tiles)</span>:</span>\n    x, y = mario.rect.topleft\n    n_steps = max(abs(s) <span class=\"hljs-keyword\">for</span> s <span class=\"hljs-keyword\">in</span> mario.spd)\n    <span class=\"hljs-keyword\">for</span> _ <span class=\"hljs-keyword\">in</span> range(n_steps):\n        mario.spd = stop_on_collision(mario.spd, get_boundaries(mario.rect, tiles))\n        mario.rect.topleft = x, y = x + (mario.spd.x / n_steps), y + (mario.spd.y / n_steps)\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_boundaries</span><span class=\"hljs-params\">(rect, tiles)</span>:</span>\n    deltas = {D.n: P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">-1</span>), D.e: P(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">0</span>), D.s: P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">1</span>), D.w: P(<span class=\"hljs-number\">-1</span>, <span class=\"hljs-number\">0</span>)}\n    <span class=\"hljs-keyword\">return</span> {d <span class=\"hljs-keyword\">for</span> d, delta <span class=\"hljs-keyword\">in</span> deltas.items() <span class=\"hljs-keyword\">if</span> rect.move(delta).collidelist(tiles) != <span class=\"hljs-number\">-1</span>}\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">stop_on_collision</span><span class=\"hljs-params\">(spd, bounds)</span>:</span>\n    <span class=\"hljs-keyword\">return</span> P(x=<span class=\"hljs-number\">0</span> <span class=\"hljs-keyword\">if</span> (D.w <span class=\"hljs-keyword\">in</span> bounds <span class=\"hljs-keyword\">and</span> spd.x &lt; <span class=\"hljs-number\">0</span>) <span class=\"hljs-keyword\">or</span> (D.e <span class=\"hljs-keyword\">in</span> bounds <span class=\"hljs-keyword\">and</span> spd.x &gt; <span class=\"hljs-number\">0</span>) <span class=\"hljs-keyword\">else</span> spd.x,\n             y=<span class=\"hljs-number\">0</span> <span class=\"hljs-keyword\">if</span> (D.n <span class=\"hljs-keyword\">in</span> bounds <span class=\"hljs-keyword\">and</span> spd.y &lt; <span class=\"hljs-number\">0</span>) <span class=\"hljs-keyword\">or</span> (D.s <span class=\"hljs-keyword\">in</span> bounds <span class=\"hljs-keyword\">and</span> spd.y &gt; <span class=\"hljs-number\">0</span>) <span class=\"hljs-keyword\">else</span> spd.y)\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">draw</span><span class=\"hljs-params\">(screen, images, mario, tiles)</span>:</span>\n    screen.fill((<span class=\"hljs-number\">85</span>, <span class=\"hljs-number\">168</span>, <span class=\"hljs-number\">255</span>))\n    mario.facing_left = mario.spd.x &lt; <span class=\"hljs-number\">0</span> <span class=\"hljs-keyword\">if</span> mario.spd.x <span class=\"hljs-keyword\">else</span> mario.facing_left\n    is_airborne = D.s <span class=\"hljs-keyword\">not</span> <span class=\"hljs-keyword\">in</span> get_boundaries(mario.rect, tiles)\n    image_index = <span class=\"hljs-number\">4</span> <span class=\"hljs-keyword\">if</span> is_airborne <span class=\"hljs-keyword\">else</span> next(mario.frame_cycle) <span class=\"hljs-keyword\">if</span> mario.spd.x <span class=\"hljs-keyword\">else</span> <span class=\"hljs-number\">6</span>\n    screen.blit(images[image_index + (mario.facing_left * <span class=\"hljs-number\">9</span>)], mario.rect)\n    <span class=\"hljs-keyword\">for</span> tile <span class=\"hljs-keyword\">in</span> tiles:\n        is_border = tile.x <span class=\"hljs-keyword\">in</span> [<span class=\"hljs-number\">0</span>, (W-<span class=\"hljs-number\">1</span>)*<span class=\"hljs-number\">16</span>] <span class=\"hljs-keyword\">or</span> tile.y <span class=\"hljs-keyword\">in</span> [<span class=\"hljs-number\">0</span>, (H-<span class=\"hljs-number\">1</span>)*<span class=\"hljs-number\">16</span>]\n        screen.blit(images[<span class=\"hljs-number\">18</span> <span class=\"hljs-keyword\">if</span> is_border <span class=\"hljs-keyword\">else</span> <span class=\"hljs-number\">19</span>], tile)\n    pg.display.flip()\n\n<span class=\"hljs-keyword\">if</span> __name__ == <span class=\"hljs-string\">'__main__'</span>:\n    main()\n</code></pre></div>\n\n<div><h2 id=\"pandas\"><a href=\"#pandas\" name=\"pandas\">#</a>Pandas</h2><p><strong>Data analysis library. For examples see <a href=\"#plotly\">Plotly</a>.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install pandas matplotlib</span>\n<span class=\"hljs-keyword\">import</span> pandas <span class=\"hljs-keyword\">as</span> pd, matplotlib.pyplot <span class=\"hljs-keyword\">as</span> plt\n</code></pre></div>\n\n\n<div><h3 id=\"series\">Series</h3><p><strong>Ordered dictionary with a name.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>s = pd.Series([<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>], index=[<span class=\"hljs-string\">'x'</span>, <span class=\"hljs-string\">'y'</span>], name=<span class=\"hljs-string\">'a'</span>); s\nx    <span class=\"hljs-number\">1</span>\ny    <span class=\"hljs-number\">2</span>\nName: a, dtype: int64\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;S&gt;  = pd.Series(&lt;list&gt;)                       <span class=\"hljs-comment\"># Uses list's indices for 'index'.</span>\n&lt;S&gt;  = pd.Series(&lt;dict&gt;)                       <span class=\"hljs-comment\"># Uses dictionary's keys for 'index'.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;el&gt; = &lt;S&gt;.loc[key]                            <span class=\"hljs-comment\"># Or: &lt;S&gt;.iloc[i]</span>\n&lt;S&gt;  = &lt;S&gt;.loc[coll_of_keys]                   <span class=\"hljs-comment\"># Or: &lt;S&gt;.iloc[coll_of_i]</span>\n&lt;S&gt;  = &lt;S&gt;.loc[from_key : to_key_inc]          <span class=\"hljs-comment\"># Or: &lt;S&gt;.iloc[from_i : to_i_exc]</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;el&gt; = &lt;S&gt;[key/i]                              <span class=\"hljs-comment\"># Or: &lt;S&gt;.&lt;key&gt;</span>\n&lt;S&gt;  = &lt;S&gt;[coll_of_keys/coll_of_i]             <span class=\"hljs-comment\"># Or: &lt;S&gt;[key/i : key/i]</span>\n&lt;S&gt;  = &lt;S&gt;[&lt;S_of_bools&gt;]                       <span class=\"hljs-comment\"># Or: &lt;S&gt;.loc/iloc[&lt;S_of_bools&gt;]</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;S&gt;  = &lt;S&gt; &gt; &lt;el/S&gt;                            <span class=\"hljs-comment\"># Returns S of bools. For logic use &amp;, |, ~.</span>\n&lt;S&gt;  = &lt;S&gt; + &lt;el/S&gt;                            <span class=\"hljs-comment\"># Items with non-matching keys get value NaN.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;S&gt;  = &lt;S&gt;.head/describe/sort_values()         <span class=\"hljs-comment\"># Also &lt;S&gt;.unique/value_counts/round/dropna().</span>\n&lt;S&gt;  = &lt;S&gt;.str.strip/lower/contains/replace()  <span class=\"hljs-comment\"># Also split().str[i] or split(expand=True).</span>\n&lt;S&gt;  = &lt;S&gt;.dt.year/month/day/hour              <span class=\"hljs-comment\"># Use pd.to_datetime(&lt;S&gt;) to get S of datetimes.</span>\n&lt;S&gt;  = &lt;S&gt;.dt.to_period(<span class=\"hljs-string\">'y/m/d/h'</span>)             <span class=\"hljs-comment\"># Quantizes datetimes into Period objects.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;S&gt;.plot.line/area/bar/pie/hist()              <span class=\"hljs-comment\"># Generates a plot. Accepts `title=&lt;str&gt;`.</span>\nplt.show()                                     <span class=\"hljs-comment\"># Displays the plot. Also plt.savefig(&lt;path&gt;).</span>\n</code></pre>\n<ul>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'print(&lt;S&gt;.to_string())'</span></code> to print a Series that has more than sixty items.</strong></li>\n<li><strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;S&gt;.index'</span></code> to get collection of keys and <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;S&gt;.index = &lt;coll&gt;'</span></code> to update them.</strong></li>\n<li><strong>Only pass a list or Series to loc/iloc because <code class=\"python hljs\"><span class=\"hljs-string\">'obj[x, y]'</span></code> is converted to <code class=\"python hljs\"><span class=\"hljs-string\">'obj[(x, y)]'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;S&gt;.loc[key_1, key_2]'</span></code> is how you retrieve a value from a multi-indexed Series.</strong></li>\n<li><strong>Pandas uses NumPy types like <code class=\"python hljs\"><span class=\"hljs-string\">'np.int64'</span></code>. Series is converted to <code class=\"python hljs\"><span class=\"hljs-string\">'float64'</span></code> if np.nan is assigned to any item. Use <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;S&gt;.astype(&lt;str/type&gt;)'</span></code> to get converted Series.</strong></li>\n</ul>\n<div><h4 id=\"seriesaggregatetransformmap\">Series — Aggregate, Transform, Map:</h4><pre><code class=\"python language-python hljs\">&lt;el&gt; = &lt;S&gt;.sum/max/mean/std/idxmax/count()     <span class=\"hljs-comment\"># Or: &lt;S&gt;.agg(lambda &lt;S&gt;: &lt;el&gt;)</span>\n&lt;S&gt;  = &lt;S&gt;.rank/diff/cumsum/ffill/interpol…()  <span class=\"hljs-comment\"># Or: &lt;S&gt;.agg/transform(lambda &lt;S&gt;: &lt;S&gt;)</span>\n&lt;S&gt;  = &lt;S&gt;.isna/fillna/isin([&lt;el/coll&gt;])       <span class=\"hljs-comment\"># Or: &lt;S&gt;.agg/transform/map(lambda &lt;el&gt;: &lt;el&gt;)</span>\n</code></pre></div>\n\n<pre><code class=\"python hljs\">┏━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\n┃              │    <span class=\"hljs-string\">'sum'</span>    │   [<span class=\"hljs-string\">'sum'</span>]   │ {<span class=\"hljs-string\">'s'</span>: <span class=\"hljs-string\">'sum'</span>}  ┃\n┠──────────────┼─────────────┼─────────────┼───────────────┨\n┃ s.apply(…)   │      <span class=\"hljs-number\">3</span>      │    sum  <span class=\"hljs-number\">3</span>   │     s  <span class=\"hljs-number\">3</span>      ┃\n┃ s.agg(…)     │             │             │               ┃\n┗━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n\n┏━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\n┃              │    <span class=\"hljs-string\">'rank'</span>   │   [<span class=\"hljs-string\">'rank'</span>]  │ {<span class=\"hljs-string\">'r'</span>: <span class=\"hljs-string\">'rank'</span>} ┃\n┠──────────────┼─────────────┼─────────────┼───────────────┨\n┃ s.apply(…)   │             │      rank   │               ┃\n┃ s.agg(…)     │    x  <span class=\"hljs-number\">1.0</span>   │   x   <span class=\"hljs-number\">1.0</span>   │   r  x  <span class=\"hljs-number\">1.0</span>   ┃\n┃              │    y  <span class=\"hljs-number\">2.0</span>   │   y   <span class=\"hljs-number\">2.0</span>   │      y  <span class=\"hljs-number\">2.0</span>   ┃\n┗━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n</code></pre>\n\n<div><h3 id=\"dataframe\">DataFrame</h3><p><strong>Table with labeled rows and columns.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>df = pd.DataFrame([[<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>], [<span class=\"hljs-number\">3</span>, <span class=\"hljs-number\">4</span>]], index=[<span class=\"hljs-string\">'a'</span>, <span class=\"hljs-string\">'b'</span>], columns=[<span class=\"hljs-string\">'x'</span>, <span class=\"hljs-string\">'y'</span>]); df\n   x  y\na  <span class=\"hljs-number\">1</span>  <span class=\"hljs-number\">2</span>\nb  <span class=\"hljs-number\">3</span>  <span class=\"hljs-number\">4</span>\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;DF&gt;   = pd.DataFrame(&lt;list_of_rows&gt;)          <span class=\"hljs-comment\"># Rows can be either lists, dicts or series.</span>\n&lt;DF&gt;   = pd.DataFrame(&lt;dict_of_columns&gt;)       <span class=\"hljs-comment\"># Columns can be either lists, dicts or series.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;el&gt;   = &lt;DF&gt;.loc[row_key, col_key]            <span class=\"hljs-comment\"># Or: &lt;DF&gt;.iloc[row_i, col_i]</span>\n&lt;S/DF&gt; = &lt;DF&gt;.loc[row_key/s]                   <span class=\"hljs-comment\"># Or: &lt;DF&gt;.iloc[row_i/s]</span>\n&lt;S/DF&gt; = &lt;DF&gt;.loc[:, col_key/s]                <span class=\"hljs-comment\"># Or: &lt;DF&gt;.iloc[:, col_i/s]</span>\n&lt;DF&gt;   = &lt;DF&gt;.loc[row_bools, col_bools]        <span class=\"hljs-comment\"># Or: &lt;DF&gt;.iloc[row_bools, col_bools]</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;S/DF&gt; = &lt;DF&gt;[col_key/s]                       <span class=\"hljs-comment\"># Or: &lt;DF&gt;.&lt;col_key&gt;</span>\n&lt;DF&gt;   = &lt;DF&gt;[&lt;S_of_bools&gt;]                    <span class=\"hljs-comment\"># Filters rows. For example `df[df.x &gt; 1]`.</span>\n&lt;DF&gt;   = &lt;DF&gt;[&lt;DF_of_bools&gt;]                   <span class=\"hljs-comment\"># Assigns NaN to items that are False in bools.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;DF&gt;   = &lt;DF&gt; &gt; &lt;el/S/DF&gt;                      <span class=\"hljs-comment\"># Returns DF of bools. Treats series as a row.</span>\n&lt;DF&gt;   = &lt;DF&gt; + &lt;el/S/DF&gt;                      <span class=\"hljs-comment\"># Items with non-matching keys get value NaN.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;DF&gt;   = &lt;DF&gt;.set_index(col_key)               <span class=\"hljs-comment\"># Replaces row keys with column's values.</span>\n&lt;DF&gt;   = &lt;DF&gt;.reset_index(drop=<span class=\"hljs-keyword\">False</span>)          <span class=\"hljs-comment\"># Drops or moves row keys to column named index.</span>\n&lt;DF&gt;   = &lt;DF&gt;.sort_index(ascending=<span class=\"hljs-keyword\">True</span>)       <span class=\"hljs-comment\"># Sorts rows by row keys. Use `axis=1` for cols.</span>\n&lt;DF&gt;   = &lt;DF&gt;.sort_values(col_key/s)           <span class=\"hljs-comment\"># Sorts rows by passed column/s. Also `axis=1`.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;DF&gt;   = &lt;DF&gt;.head/tail/sample(&lt;int&gt;)          <span class=\"hljs-comment\"># Returns first, last, or random n rows.</span>\n&lt;DF&gt;   = &lt;DF&gt;.describe()                       <span class=\"hljs-comment\"># Describes columns. Also info(), corr(), shape.</span>\n&lt;DF&gt;   = &lt;DF&gt;.query(<span class=\"hljs-string\">'&lt;query&gt;'</span>)                 <span class=\"hljs-comment\"># Filters rows. For example `df.query('x &gt; 1')`.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;DF&gt;.plot.line/area/bar/scatter(x=col_key, …)  <span class=\"hljs-comment\"># `y=col_key/s`. Also hist/box(column/by=col_k).</span>\nplt.show()                                     <span class=\"hljs-comment\"># Displays the plot. Also plt.savefig(&lt;path&gt;).</span>\n</code></pre>\n<div><h4 id=\"dataframemergejoinconcat\">DataFrame — Merge, Join, Concat:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>df_2 = pd.DataFrame([[<span class=\"hljs-number\">4</span>, <span class=\"hljs-number\">5</span>], [<span class=\"hljs-number\">6</span>, <span class=\"hljs-number\">7</span>]], index=[<span class=\"hljs-string\">'b'</span>, <span class=\"hljs-string\">'c'</span>], columns=[<span class=\"hljs-string\">'y'</span>, <span class=\"hljs-string\">'z'</span>]); df_2\n   y  z\nb  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">5</span>\nc  <span class=\"hljs-number\">6</span>  <span class=\"hljs-number\">7</span>\n</code></pre></div>\n\n<pre><code class=\"python hljs\">┏━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃                       │    <span class=\"hljs-string\">'outer'</span>    │   <span class=\"hljs-string\">'inner'</span>  │   <span class=\"hljs-string\">'left'</span>   │       Description         ┃\n┠───────────────────────┼───────────────┼────────────┼────────────┼───────────────────────────┨\n┃ df.merge(df_2,        │    x   y   z  │ x   y   z  │ x   y   z  │ Merges on column if 'on'  ┃\n┃          on=<span class=\"hljs-string\">'y'</span>,      │ <span class=\"hljs-number\">0</span>  <span class=\"hljs-number\">1</span>   <span class=\"hljs-number\">2</span>   .  │ <span class=\"hljs-number\">3</span>   <span class=\"hljs-number\">4</span>   <span class=\"hljs-number\">5</span>  │ <span class=\"hljs-number\">1</span>   <span class=\"hljs-number\">2</span>   .  │ or 'left_on/right_on' are ┃\n┃          how=…)       │ <span class=\"hljs-number\">1</span>  <span class=\"hljs-number\">3</span>   <span class=\"hljs-number\">4</span>   <span class=\"hljs-number\">5</span>  │            │ <span class=\"hljs-number\">3</span>   <span class=\"hljs-number\">4</span>   <span class=\"hljs-number\">5</span>  │ set, else on shared cols. ┃\n┃                       │ <span class=\"hljs-number\">2</span>  .   <span class=\"hljs-number\">6</span>   <span class=\"hljs-number\">7</span>  │            │            │ Uses <span class=\"hljs-string\">'inner'</span> by default.  ┃\n┠───────────────────────┼───────────────┼────────────┼────────────┼───────────────────────────┨\n┃ df.join(df_2,         │    x yl yr  z │            │ x yl yr  z │ Merges on row keys.       ┃\n┃         lsuffix=<span class=\"hljs-string\">'l'</span>,  │ a  <span class=\"hljs-number\">1</span>  <span class=\"hljs-number\">2</span>  .  . │ x yl yr  z │ <span class=\"hljs-number\">1</span>  <span class=\"hljs-number\">2</span>  .  . │ Uses <span class=\"hljs-string\">'left'</span> by default.   ┃\n┃         rsuffix=<span class=\"hljs-string\">'r'</span>,  │ b  <span class=\"hljs-number\">3</span>  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">5</span> │ <span class=\"hljs-number\">3</span>  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">5</span> │ <span class=\"hljs-number\">3</span>  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">5</span> │ If Series is passed, it   ┃\n┃         how=…)        │ c  .  .  <span class=\"hljs-number\">6</span>  <span class=\"hljs-number\">7</span> │            │            │ is treated as a column.   ┃\n┠───────────────────────┼───────────────┼────────────┼────────────┼───────────────────────────┨\n┃ pd.concat([df, df_2], │    x   y   z  │     y      │            │ Adds rows at the bottom.  ┃\n┃           axis=<span class=\"hljs-number\">0</span>,     │ a  <span class=\"hljs-number\">1</span>   <span class=\"hljs-number\">2</span>   .  │     <span class=\"hljs-number\">2</span>      │            │ Uses <span class=\"hljs-string\">'outer'</span> by default.  ┃\n┃           join=…)     │ b  <span class=\"hljs-number\">3</span>   <span class=\"hljs-number\">4</span>   .  │     <span class=\"hljs-number\">4</span>      │            │ A Series is treated as a  ┃\n┃                       │ b  .   <span class=\"hljs-number\">4</span>   <span class=\"hljs-number\">5</span>  │     <span class=\"hljs-number\">4</span>      │            │ column. To add a row use  ┃\n┃                       │ c  .   <span class=\"hljs-number\">6</span>   <span class=\"hljs-number\">7</span>  │     <span class=\"hljs-number\">6</span>      │            │ pd.concat([df, DF([s])]). ┃\n┠───────────────────────┼───────────────┼────────────┼────────────┼───────────────────────────┨\n┃ pd.concat([df, df_2], │    x  y  y  z │            │            │ Adds columns at the       ┃\n┃           axis=<span class=\"hljs-number\">1</span>,     │ a  <span class=\"hljs-number\">1</span>  <span class=\"hljs-number\">2</span>  .  . │ x  y  y  z │            │ right end. Uses <span class=\"hljs-string\">'outer'</span>   ┃\n┃           join=…)     │ b  <span class=\"hljs-number\">3</span>  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">5</span> │ <span class=\"hljs-number\">3</span>  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">5</span> │            │ by default. A Series is   ┃\n┃                       │ c  .  .  <span class=\"hljs-number\">6</span>  <span class=\"hljs-number\">7</span> │            │            │ treated as a column.      ┃\n┗━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n</code></pre>\n<div><h4 id=\"dataframeaggregatetransformmap\">DataFrame — Aggregate, Transform, Map:</h4><pre><code class=\"python language-python hljs\">&lt;S&gt;  = &lt;DF&gt;.sum/max/mean/std/idxmax/count()    <span class=\"hljs-comment\"># Or: &lt;DF&gt;.apply/agg(lambda &lt;S&gt;: &lt;el&gt;)</span>\n&lt;DF&gt; = &lt;DF&gt;.rank/diff/cumsum/ffill/interpo…()  <span class=\"hljs-comment\"># Or: &lt;DF&gt;.apply/agg/transform(lambda &lt;S&gt;: &lt;S&gt;)</span>\n&lt;DF&gt; = &lt;DF&gt;.isna/fillna/isin([&lt;el/coll&gt;])      <span class=\"hljs-comment\"># Or: &lt;DF&gt;.applymap(lambda &lt;el&gt;: &lt;el&gt;)</span>\n</code></pre></div>\n\n<pre><code class=\"python hljs\">┏━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\n┃                 │     <span class=\"hljs-string\">'sum'</span>     │    [<span class=\"hljs-string\">'sum'</span>]    │ {<span class=\"hljs-string\">'x'</span>: <span class=\"hljs-string\">'sum'</span>}  ┃\n┠─────────────────┼───────────────┼───────────────┼───────────────┨\n┃ df.apply(…)     │      x  <span class=\"hljs-number\">4</span>     │        x  y   │     x  <span class=\"hljs-number\">4</span>      ┃\n┃ df.agg(…)       │      y  <span class=\"hljs-number\">6</span>     │   sum  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">6</span>   │               ┃\n┗━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n\n┏━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\n┃                 │     <span class=\"hljs-string\">'rank'</span>    │    [<span class=\"hljs-string\">'rank'</span>]   │ {<span class=\"hljs-string\">'x'</span>: <span class=\"hljs-string\">'rank'</span>} ┃\n┠─────────────────┼───────────────┼───────────────┼───────────────┨\n┃ df.apply(…)     │               │       x    y  │               ┃\n┃ df.agg(…)       │       x    y  │    rank rank  │         x     ┃\n┃ df.transform(…) │  a  <span class=\"hljs-number\">1.0</span>  <span class=\"hljs-number\">1.0</span>  │  a  <span class=\"hljs-number\">1.0</span>  <span class=\"hljs-number\">1.0</span>  │    a  <span class=\"hljs-number\">1.0</span>     ┃\n┃                 │  b  <span class=\"hljs-number\">2.0</span>  <span class=\"hljs-number\">2.0</span>  │  b  <span class=\"hljs-number\">2.0</span>  <span class=\"hljs-number\">2.0</span>  │    b  <span class=\"hljs-number\">2.0</span>     ┃\n┗━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n</code></pre>\n\n<ul>\n<li><strong>Listed methods process the columns unless they receive <code class=\"python hljs\"><span class=\"hljs-string\">'axis=1'</span></code>. Exceptions to this rule are <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;DF&gt;.dropna()'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;DF&gt;.drop(row_key/s)'</span></code> and <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;DF&gt;.rename(&lt;dict/func&gt;)'</span></code>.</strong></li>\n<li><strong>Fifth result's columns are indexed with a multi-index. This means we need a tuple of column keys to specify a column: <code class=\"python hljs\"><span class=\"hljs-string\">'&lt;DF&gt;.loc[row_key, (col_key_1, col_key_2)]'</span></code>.</strong></li>\n</ul>\n<div><h3 id=\"multiindex\">Multi-Index</h3><pre><code class=\"python language-python hljs\">&lt;DF&gt; = &lt;DF&gt;.loc[row_key_1]                     <span class=\"hljs-comment\"># Or: &lt;DF&gt;.xs(row_key_1)</span>\n&lt;DF&gt; = &lt;DF&gt;.loc[:, (slice(<span class=\"hljs-keyword\">None</span>), col_key_2)]   <span class=\"hljs-comment\"># Or: &lt;DF&gt;.xs(col_key_2, axis=1, level=1)</span>\n&lt;DF&gt; = &lt;DF&gt;.set_index(col_keys)                <span class=\"hljs-comment\"># Creates index from cols. Also `append=False`.</span>\n&lt;DF&gt; = &lt;DF&gt;.pivot_table(index=col_key/s)       <span class=\"hljs-comment\"># `columns=key/s, values=key/s, aggfunc='mean'`.</span>\n&lt;S&gt;  = &lt;DF&gt;.stack/unstack(level=<span class=\"hljs-number\">-1</span>)            <span class=\"hljs-comment\"># Combines col keys with row keys or vice versa.</span>\n</code></pre></div>\n\n<div><h3 id=\"fileformats\">File Formats</h3><pre><code class=\"python language-python hljs\">&lt;S/DF&gt; = pd.read_json/pickle(&lt;path/url/file&gt;)  <span class=\"hljs-comment\"># Also io.StringIO(&lt;str&gt;), io.BytesIO(&lt;bytes&gt;).</span>\n&lt;DF&gt;   = pd.read_csv/excel(&lt;path/url/file&gt;)    <span class=\"hljs-comment\"># Also `header/index_col/dtype/usecols/…=&lt;obj&gt;`.</span>\n&lt;list&gt; = pd.read_html(&lt;path/url/file&gt;)         <span class=\"hljs-comment\"># Raises ImportError if webpage has zero tables.</span>\n&lt;S/DF&gt; = pd.read_parquet/feather/hdf(&lt;path…&gt;)  <span class=\"hljs-comment\"># Function read_hdf() accepts `key=&lt;s/df_name&gt;`.</span>\n&lt;DF&gt;   = pd.read_sql(<span class=\"hljs-string\">'&lt;table/query&gt;'</span>, &lt;conn&gt;)  <span class=\"hljs-comment\"># Pass SQLite3/Alchemy connection. See #SQLite.</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;DF&gt;.to_json/csv/html/latex/parquet(&lt;path&gt;)    <span class=\"hljs-comment\"># Returns a string/bytes if path is omitted.</span>\n&lt;DF&gt;.to_pickle/excel/feather/hdf(&lt;path&gt;)       <span class=\"hljs-comment\"># Method to_hdf() requires `key=&lt;s/df_name&gt;`.</span>\n&lt;DF&gt;.to_sql(<span class=\"hljs-string\">'&lt;table_name&gt;'</span>, &lt;connection&gt;)      <span class=\"hljs-comment\"># Also `if_exists='fail/replace/append'`.</span>\n</code></pre>\n<ul>\n<li><strong><code class=\"python hljs\"><span class=\"hljs-string\">'$ pip3 install \"pandas[excel]\" odfpy lxml pyarrow'</span></code> installs dependencies.</strong></li>\n<li><strong>Csv functions use the same dialect as standard library's csv module (e.g. <code class=\"python hljs\"><span class=\"hljs-string\">'sep=\",\"'</span></code>).</strong></li>\n<li><strong>Read_csv() only parses dates of columns that are listed in 'parse_dates'. It automatically tries to detect the format, but it can be helped with 'date_format' or 'dayfirst' arguments.</strong></li>\n<li><strong>We get a dataframe with DatetimeIndex if 'parse_dates' argument includes 'index_col'. Its <code class=\"python hljs\"><span class=\"hljs-string\">'resample(\"y/m/d/h\")'</span></code> method returns Resampler object that is similar to GroupBy.</strong></li>\n</ul>\n<div><h3 id=\"groupby\">GroupBy</h3><p><strong>Object that groups together rows of a dataframe based on the value of the passed column.</strong></p><pre><code class=\"python language-python hljs\">&lt;GB&gt; = &lt;DF&gt;.groupby(col_key/s)                 <span class=\"hljs-comment\"># Splits DF into groups based on passed column.</span>\n&lt;DF&gt; = &lt;GB&gt;.apply/filter(&lt;func&gt;)               <span class=\"hljs-comment\"># Filter drops a group if func returns False.</span>\n&lt;DF&gt; = &lt;GB&gt;.get_group(&lt;el&gt;)                    <span class=\"hljs-comment\"># Selects a group by grouping column's value.</span>\n&lt;S&gt;  = &lt;GB&gt;.size()                             <span class=\"hljs-comment\"># S of group sizes. Same keys as get_group().</span>\n&lt;GB&gt; = &lt;GB&gt;[col_key]                           <span class=\"hljs-comment\"># Single column GB. All operations return S.</span>\n</code></pre></div>\n\n\n<pre><code class=\"python language-python hljs\">&lt;DF&gt; = &lt;GB&gt;.sum/max/mean/std/idxmax/count()    <span class=\"hljs-comment\"># Or: &lt;GB&gt;.agg(lambda &lt;S&gt;: &lt;el&gt;)</span>\n&lt;DF&gt; = &lt;GB&gt;.rank/diff/cumsum/ffill()           <span class=\"hljs-comment\"># Or: &lt;GB&gt;.transform(lambda &lt;S&gt;: &lt;S&gt;)</span>\n&lt;DF&gt; = &lt;GB&gt;.fillna(&lt;el&gt;)                       <span class=\"hljs-comment\"># Or: &lt;GB&gt;.transform(lambda &lt;S&gt;: &lt;S&gt;)</span>\n</code></pre>\n<div><h4 id=\"dividesrowsintogroupsandsumstheircolumnsresulthasanamedindexthatcreatescolumnzonreset_index\">Divides rows into groups and sums their columns. Result has a named index that creates column <code class=\"python hljs\"><span class=\"hljs-string\">'z'</span></code> on reset_index():</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-meta\">&gt;&gt;&gt; </span>df = pd.DataFrame([[<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>], [<span class=\"hljs-number\">4</span>, <span class=\"hljs-number\">5</span>, <span class=\"hljs-number\">6</span>], [<span class=\"hljs-number\">7</span>, <span class=\"hljs-number\">8</span>, <span class=\"hljs-number\">6</span>]], list(<span class=\"hljs-string\">'abc'</span>), list(<span class=\"hljs-string\">'xyz'</span>))\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>gb = df.groupby(<span class=\"hljs-string\">'z'</span>); gb.apply(print)\n   x  y  z\na  <span class=\"hljs-number\">1</span>  <span class=\"hljs-number\">2</span>  <span class=\"hljs-number\">3</span>\n   x  y  z\nb  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">5</span>  <span class=\"hljs-number\">6</span>\nc  <span class=\"hljs-number\">7</span>  <span class=\"hljs-number\">8</span>  <span class=\"hljs-number\">6</span>\n<span class=\"hljs-meta\">&gt;&gt;&gt; </span>gb.sum()\n    x   y\nz\n<span class=\"hljs-number\">3</span>   <span class=\"hljs-number\">1</span>   <span class=\"hljs-number\">2</span>\n<span class=\"hljs-number\">6</span>  <span class=\"hljs-number\">11</span>  <span class=\"hljs-number\">13</span></code></pre></div>\n\n<div><h3 id=\"rolling\">Rolling</h3><p><strong>Object for rolling window calculations.</strong></p><pre><code class=\"python language-python hljs\">&lt;RS/RDF/RGB&gt; = &lt;S/DF/GB&gt;.rolling(win_size)     <span class=\"hljs-comment\"># Also: `min_periods=None, center=False`.</span>\n&lt;RS/RDF/RGB&gt; = &lt;RDF/RGB&gt;[col_key/s]            <span class=\"hljs-comment\"># Or: &lt;RDF/RGB&gt;.&lt;col_key&gt;</span>\n&lt;S/DF&gt;       = &lt;R&gt;.mean/sum/max()              <span class=\"hljs-comment\"># Or: &lt;R&gt;.apply/agg(&lt;agg_func/str&gt;)</span>\n</code></pre></div>\n\n\n<div><h2 id=\"plotly\"><a href=\"#plotly\" name=\"plotly\">#</a>Plotly</h2><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install plotly kaleido pandas</span>\n<span class=\"hljs-keyword\">import</span> plotly.express <span class=\"hljs-keyword\">as</span> px, pandas <span class=\"hljs-keyword\">as</span> pd\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\">&lt;Fig&gt; = px.line(&lt;DF&gt; [, y=col_key/s [, x=col_key]])   <span class=\"hljs-comment\"># Also px.line(y=&lt;list&gt; [, x=&lt;list&gt;]).</span>\n&lt;Fig&gt;.update_layout(paper_bgcolor=<span class=\"hljs-string\">'#rrggbb'</span>)          <span class=\"hljs-comment\"># Also `margin=dict(t=0, r=0, b=0, l=0)`.</span>\n&lt;Fig&gt;.write_html/json/image(<span class=\"hljs-string\">'&lt;path&gt;'</span>)                 <span class=\"hljs-comment\"># Use &lt;Fig&gt;.show() to display the plot.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\">&lt;Fig&gt; = px.area/bar/box(&lt;DF&gt;, x=col_key, y=col_keys)  <span class=\"hljs-comment\"># Also `color=col_key`. All are optional.</span>\n&lt;Fig&gt; = px.scatter(&lt;DF&gt;, x=col_key, y=col_keys)       <span class=\"hljs-comment\"># Also `color/size/symbol=col_key`. Same.</span>\n&lt;Fig&gt; = px.scatter_3d(&lt;DF&gt;, x=col_key, y=col_key, …)  <span class=\"hljs-comment\"># `z=col_key`. Also color, size, symbol.</span>\n&lt;Fig&gt; = px.histogram(&lt;DF&gt;, x=col_keys, y=col_key)     <span class=\"hljs-comment\"># Also color, nbins. All are optional.</span>\n</code></pre>\n<div><h4 id=\"displaysalinechartoftotalcovid19deathspermilliongroupedbycontinent\">Displays a line chart of total COVID-19 deaths per million grouped by continent:</h4><p></p><div id=\"2a950764-39fc-416d-97fe-0a6226a3095f\" class=\"plotly-graph-div\" style=\"height:312px; width:914px;\"></div><pre><code class=\"python language-python hljs\">covid = pd.read_csv(<span class=\"hljs-string\">'https://raw.githubusercontent.com/owid/covid-19-data/8dde8ca49b'</span>\n                    <span class=\"hljs-string\">'6e648c17dd420b2726ca0779402651/public/data/owid-covid-data.csv'</span>,\n                    usecols=[<span class=\"hljs-string\">'iso_code'</span>, <span class=\"hljs-string\">'date'</span>, <span class=\"hljs-string\">'population'</span>, <span class=\"hljs-string\">'total_deaths'</span>])\ncontinents = pd.read_csv(<span class=\"hljs-string\">'https://gto76.github.io/python-cheatsheet/web/continents.csv'</span>,\n                         usecols=[<span class=\"hljs-string\">'Three_Letter_Country_Code'</span>, <span class=\"hljs-string\">'Continent_Name'</span>])\ndf = pd.merge(covid, continents, left_on=<span class=\"hljs-string\">'iso_code'</span>, right_on=<span class=\"hljs-string\">'Three_Letter_Country_Code'</span>)\ndf = df.groupby([<span class=\"hljs-string\">'Continent_Name'</span>, <span class=\"hljs-string\">'date'</span>]).sum().reset_index()\ndf[<span class=\"hljs-string\">'Total Deaths per Million'</span>] = df.total_deaths * <span class=\"hljs-number\">1e6</span> / df.population\ndf = df[df.date &gt; <span class=\"hljs-string\">'2020-03-14'</span>]\ndf = df.rename({<span class=\"hljs-string\">'date'</span>: <span class=\"hljs-string\">'Date'</span>, <span class=\"hljs-string\">'Continent_Name'</span>: <span class=\"hljs-string\">'Continent'</span>}, axis=<span class=\"hljs-string\">'columns'</span>)\npx.line(df, x=<span class=\"hljs-string\">'Date'</span>, y=<span class=\"hljs-string\">'Total Deaths per Million'</span>, color=<span class=\"hljs-string\">'Continent'</span>)\n</code></pre></div>\n\n\n\n<div><h4 id=\"displaysamultiaxislinechartoftotalcovid19casesandchangesinpricesofbitcoindowjonesandgold\">Displays a multi-axis line chart of total COVID-19 cases and changes in prices of Bitcoin, Dow Jones and gold:</h4><p></p><div id=\"e23ccacc-a456-478b-b467-7282a2165921\" class=\"plotly-graph-div\" style=\"height:285px; width:935px;\"></div><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install pandas lxml selenium plotly</span>\n<span class=\"hljs-keyword\">import</span> pandas <span class=\"hljs-keyword\">as</span> pd, selenium.webdriver, io, plotly.graph_objects <span class=\"hljs-keyword\">as</span> go\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">main</span><span class=\"hljs-params\">()</span>:</span>\n    covid, (bitcoin, gold, dow) = get_covid_cases(), get_tickers()\n    df = wrangle_data(covid, bitcoin, gold, dow)\n    display_data(df)\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_covid_cases</span><span class=\"hljs-params\">()</span>:</span>\n    url = <span class=\"hljs-string\">'https://catalog.ourworldindata.org/garden/covid/latest/compact/compact.csv'</span>\n    df = pd.read_csv(url, parse_dates=[<span class=\"hljs-string\">'date'</span>])\n    df = df[df.country == <span class=\"hljs-string\">'World'</span>]\n    s = df.set_index(<span class=\"hljs-string\">'date'</span>).total_cases\n    <span class=\"hljs-keyword\">return</span> s.rename(<span class=\"hljs-string\">'Total Cases'</span>)\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_tickers</span><span class=\"hljs-params\">()</span>:</span>\n    <span class=\"hljs-keyword\">with</span> selenium.webdriver.Chrome() <span class=\"hljs-keyword\">as</span> driver:\n        driver.implicitly_wait(<span class=\"hljs-number\">10</span>)\n        symbols = {<span class=\"hljs-string\">'Bitcoin'</span>: <span class=\"hljs-string\">'BTC-USD'</span>, <span class=\"hljs-string\">'Gold'</span>: <span class=\"hljs-string\">'GC=F'</span>, <span class=\"hljs-string\">'Dow Jones'</span>: <span class=\"hljs-string\">'%5EDJI'</span>}\n        <span class=\"hljs-keyword\">return</span> [get_ticker(driver, name, symbol) <span class=\"hljs-keyword\">for</span> name, symbol <span class=\"hljs-keyword\">in</span> symbols.items()]\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_ticker</span><span class=\"hljs-params\">(driver, name, symbol)</span>:</span>\n    url = <span class=\"hljs-string\">f'https://finance.yahoo.com/quote/<span class=\"hljs-subst\">{symbol}</span>/history/'</span>\n    driver.get(url + <span class=\"hljs-string\">'?period1=1579651200&amp;period2=9999999999'</span>)\n    <span class=\"hljs-keyword\">if</span> buttons := driver.find_elements(<span class=\"hljs-string\">'xpath'</span>, <span class=\"hljs-string\">'//button[@name=\"reject\"]'</span>):\n        buttons[<span class=\"hljs-number\">0</span>].click()\n    html = io.StringIO(driver.page_source)\n    dataframes = pd.read_html(html, parse_dates=[<span class=\"hljs-string\">'Date'</span>])\n    s = dataframes[<span class=\"hljs-number\">0</span>].set_index(<span class=\"hljs-string\">'Date'</span>).Open\n    <span class=\"hljs-keyword\">return</span> s.rename(name)\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">wrangle_data</span><span class=\"hljs-params\">(covid, bitcoin, gold, dow)</span>:</span>\n    df = pd.concat([bitcoin, gold, dow], axis=<span class=\"hljs-number\">1</span>)  <span class=\"hljs-comment\"># Creates table by joining columns on dates.</span>\n    df = df.sort_index().interpolate()            <span class=\"hljs-comment\"># Sorts rows by date and interpolates NaN-s.</span>\n    df = df.loc[<span class=\"hljs-string\">'2020-02-23'</span>:<span class=\"hljs-string\">'2021-12-20'</span>]        <span class=\"hljs-comment\"># Keeps rows between specified dates.</span>\n    df = (df / df.iloc[<span class=\"hljs-number\">0</span>]) * <span class=\"hljs-number\">100</span>                  <span class=\"hljs-comment\"># Calculates percentages relative to day 1.</span>\n    df = df.join(covid)                           <span class=\"hljs-comment\"># Adds column with covid cases.</span>\n    <span class=\"hljs-keyword\">return</span> df.sort_values(df.index[<span class=\"hljs-number\">-1</span>], axis=<span class=\"hljs-number\">1</span>)   <span class=\"hljs-comment\"># Sorts columns by last day's value.</span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">display_data</span><span class=\"hljs-params\">(df)</span>:</span>\n    figure = go.Figure()\n    <span class=\"hljs-keyword\">for</span> col_name <span class=\"hljs-keyword\">in</span> reversed(df.columns):\n        yaxis = <span class=\"hljs-string\">'y1'</span> <span class=\"hljs-keyword\">if</span> col_name == <span class=\"hljs-string\">'Total Cases'</span> <span class=\"hljs-keyword\">else</span> <span class=\"hljs-string\">'y2'</span>\n        trace = go.Scatter(x=df.index, y=df[col_name], yaxis=yaxis, name=col_name)\n        figure.add_trace(trace)\n    figure.update_layout(\n        width=<span class=\"hljs-number\">944</span>,\n        height=<span class=\"hljs-number\">423</span>,\n        yaxis1=dict(title=<span class=\"hljs-string\">'Total Cases'</span>, rangemode=<span class=\"hljs-string\">'tozero'</span>),\n        yaxis2=dict(title=<span class=\"hljs-string\">'%'</span>, rangemode=<span class=\"hljs-string\">'tozero'</span>, overlaying=<span class=\"hljs-string\">'y'</span>, side=<span class=\"hljs-string\">'right'</span>),\n        colorway=[<span class=\"hljs-string\">'#EF553B'</span>, <span class=\"hljs-string\">'#636EFA'</span>, <span class=\"hljs-string\">'#00CC96'</span>, <span class=\"hljs-string\">'#FFA152'</span>],\n        legend=dict(x=<span class=\"hljs-number\">1.08</span>)\n    )\n    figure.show()\n\n<span class=\"hljs-keyword\">if</span> __name__ == <span class=\"hljs-string\">'__main__'</span>:\n    main()\n</code></pre></div>\n\n\n\n<div><h2 id=\"appendix\"><a href=\"#appendix\" name=\"appendix\">#</a>Appendix</h2><div><h3 id=\"cython\">Cython</h3><p><strong>Library that compiles Python-like code into C.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\"># $ pip3 install cython</span>\n<span class=\"hljs-keyword\">import</span> pyximport; pyximport.install()                <span class=\"hljs-comment\"># Module that runs Cython scripts.</span>\n<span class=\"hljs-keyword\">import</span> &lt;cython_script&gt;                               <span class=\"hljs-comment\"># Script must have '.pyx' extension.</span>\n</code></pre></div></div>\n\n\n\n<div><h4 id=\"allcdefdefinitionsareoptionalbuttheycontributetothespeedup\">All <code class=\"python hljs\"><span class=\"hljs-string\">'cdef'</span></code> definitions are optional, but they contribute to the speed-up:</h4><pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">cdef</span> &lt;type&gt; &lt;var_name&gt; [= &lt;obj/var&gt;]                 <span class=\"hljs-comment\"># Either Python or C type variable.</span>\n<span class=\"hljs-keyword\">cdef</span> &lt;ctype&gt; *&lt;pointer_name&gt; [= &amp;&lt;var&gt;]              <span class=\"hljs-comment\"># Use &lt;pointer&gt;[0] to get the value.</span>\n<span class=\"hljs-keyword\">cdef</span> &lt;ctype&gt;[size] &lt;array_name&gt; [= &lt;coll/array&gt;]     <span class=\"hljs-comment\"># Also `&lt;ctype&gt;[:] &lt;mview&gt; = &lt;array&gt;`.</span>\n<span class=\"hljs-keyword\">cdef</span> &lt;ctype&gt; *&lt;array_name&gt; [= &lt;coll/array/pointer&gt;]  <span class=\"hljs-comment\"># E.g. `&lt;&lt;ctype&gt; *&gt; malloc(n_bytes)`.</span>\n</code></pre></div>\n\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">cdef</span> &lt;type&gt; &lt;func_name&gt;(&lt;type&gt; [*]&lt;arg_name&gt;): ...   <span class=\"hljs-comment\"># Omitted types default to `object`.</span>\n</code></pre>\n<pre><code class=\"python language-python hljs\"><span class=\"hljs-keyword\">cdef</span> <span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> &lt;<span class=\"hljs-title\">class_name</span>&gt;:</span>                             <span class=\"hljs-comment\"># Also `cdef struct &lt;struct_name&gt;:`.</span>\n    <span class=\"hljs-keyword\">cdef</span> <span class=\"hljs-keyword\">public</span> &lt;type&gt; [*]&lt;attr_name&gt;                <span class=\"hljs-comment\"># Also `... &lt;ctype&gt; [*]&lt;field_name&gt;`.</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, &lt;type&gt; &lt;arg_name&gt;)</span>:</span>           <span class=\"hljs-comment\"># Also `cdef __dealloc__(self):`.</span>\n        self.&lt;attr_name&gt; = &lt;arg_name&gt;                <span class=\"hljs-comment\"># Also `... free(&lt;array/pointer&gt;)`.</span>\n</code></pre>\n<div><h3 id=\"virtualenvironments\">Virtual Environments</h3><p><strong>System for installing libraries directly into project's directory.</strong></p><pre><code class=\"python hljs\">$ python3 -m venv NAME         <span class=\"hljs-comment\"># Creates virtual environment in current directory.</span>\n$ source NAME/bin/activate     <span class=\"hljs-comment\"># Activates it. On Windows run `NAME\\Scripts\\activate`.</span>\n$ pip3 install LIBRARY         <span class=\"hljs-comment\"># Installs the library into active environment.</span>\n$ python3 FILE                 <span class=\"hljs-comment\"># Runs the script in active environment. Also `./FILE`.</span>\n$ deactivate                   <span class=\"hljs-comment\"># Deactivates the active virtual environment.</span>\n</code></pre></div>\n\n\n<div><h3 id=\"basicscripttemplate\">Basic Script Template</h3><p><strong>Run the script with <code class=\"python hljs\"><span class=\"hljs-string\">'$ python3 FILE'</span></code> or <code class=\"python hljs\"><span class=\"hljs-string\">'$ chmod u+x FILE; ./FILE'</span></code>. To automatically start the debugger when uncaught exception occurs run <code class=\"python hljs\"><span class=\"hljs-string\">'$ python3 -m pdb -cc FILE'</span></code>.</strong></p><pre><code class=\"python language-python hljs\"><span class=\"hljs-comment\">#!/usr/bin/env python3</span>\n<span class=\"hljs-comment\">#</span>\n<span class=\"hljs-comment\"># Usage: .py</span>\n<span class=\"hljs-comment\">#</span>\n\n<span class=\"hljs-keyword\">from</span> sys <span class=\"hljs-keyword\">import</span> argv, exit\n<span class=\"hljs-keyword\">from</span> collections <span class=\"hljs-keyword\">import</span> defaultdict, namedtuple\n<span class=\"hljs-keyword\">from</span> dataclasses <span class=\"hljs-keyword\">import</span> make_dataclass\n<span class=\"hljs-keyword\">from</span> enum <span class=\"hljs-keyword\">import</span> Enum\n<span class=\"hljs-keyword\">import</span> functools <span class=\"hljs-keyword\">as</span> ft, itertools <span class=\"hljs-keyword\">as</span> it, operator <span class=\"hljs-keyword\">as</span> op, re\n\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">main</span><span class=\"hljs-params\">()</span>:</span>\n    <span class=\"hljs-keyword\">pass</span>\n\n\n<span class=\"hljs-comment\">###</span>\n<span class=\"hljs-comment\">##  UTIL</span>\n<span class=\"hljs-comment\">#</span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">read_file</span><span class=\"hljs-params\">(filename)</span>:</span>\n    <span class=\"hljs-keyword\">with</span> open(filename, encoding=<span class=\"hljs-string\">'utf-8'</span>) <span class=\"hljs-keyword\">as</span> file:\n        <span class=\"hljs-keyword\">return</span> file.readlines()\n\n\n<span class=\"hljs-keyword\">if</span> __name__ == <span class=\"hljs-string\">'__main__'</span>:\n    main()\n</code></pre></div>\n\n\n<div><h2 id=\"index\"><a href=\"#index\" name=\"index\">#</a>Index</h2><ul><li><strong>Ctrl+F / ⌘F is usually sufficient.</strong></li>\n<li><strong>Searching <code class=\"python hljs\"><span class=\"hljs-string\">'#&lt;title&gt;'</span></code> will limit the search to the titles.</strong></li>\n<li><strong>Click on the title's <code class=\"python hljs\"><span class=\"hljs-string\">'#'</span></code> to get a link to its section.</strong></li>\n</ul></div>\n \n\n  <footer>\n    <aside>March 19, 2026</aside>\n    <a href=\"https://gto76.github.io\" rel=\"author\">Jure Šorn</a>\n  </footer>\n\n  <a href=\"javascript:\" id=\"return-to-top\"><i class=\"icon-chevron-up\"></i></a>\n\n  <script src=\"web/jquery-3.4.0.min.js\"></script>\n  <script src=\"web/script_2.js\"></script>\n  <script type=\"text/javascript\" src=\"https://transactions.sendowl.com/assets/sendowl.js\" ></script>\n  <script src=\"web/plotly.min.js\"></script>\n  <script src=\"web/covid_deaths.js\"></script>\n  <script src=\"web/covid_cases.js\"></script>\n</body>\n\n</html>\n"
  },
  {
    "path": "parse.js",
    "content": "#!/usr/bin/env node\n// Usage: node parse.js\n//\n// Script that creates index.html out of web/template.html and README.md.\n//\n// It is written in JS because this code used to be executed on the client side.\n// To install the Node.js and npm run:\n// $ sudo apt install nodejs npm  # On macOS use `brew install ...` instead.\n//\n// To install dependencies globally, run:\n// $ npm install -g jsdom jquery showdown highlightjs@9.12.0\n//\n// If running on macOS and modules can't be found after installation add:\n// export NODE_PATH=/usr/local/lib/node_modules\n// to the ~/.bash_profile or ~/.bashrc file and run '$ bash'.\n//\n// To avoid problems with permissions and path variables, install modules\n// into project's directory using:\n// $ npm install jsdom jquery showdown highlightjs@9.12.0\n//\n// It is also advisable to add a Bash script into .git/hooks directory, that will\n// run this script before every commit. It should be named 'pre-commit' and it\n// should contain the following line: `./parse.js`.\n\n\nconst fs = require('fs');\nconst jsdom = require('jsdom');\nconst showdown  = require('showdown');\nconst hljs = require('highlightjs');\n\n\nconst TOC =\n  '<pre style=\"border-left: none;padding-left: 1.9px;\"><code class=\"hljs bash\" style=\"line-height: 1.327em;\"><strong>ToC</strong> = {\\n' +\n  '    <strong><span class=\"hljs-string\">\\'1. Collections\\'</span></strong>: [<a href=\"#list\">List</a>, <a href=\"#dictionary\">Dictionary</a>, <a href=\"#set\">Set</a>, <a href=\"#tuple\">Tuple</a>, <a href=\"#range\">Range</a>, <a href=\"#enumerate\">Enumerate</a>, <a href=\"#iterator\">Iterator</a>, <a href=\"#generator\">Generator</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'2. Types\\'</span></strong>:       [<a href=\"#type\">Type</a>, <a href=\"#string\">String</a>, <a href=\"#regex\">Regular_Exp</a>, <a href=\"#format\">Format</a>, <a href=\"#numbers\">Numbers</a>, <a href=\"#combinatorics\">Combinatorics</a>, <a href=\"#datetime\">Datetime</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'3. Syntax\\'</span></strong>:      [<a href=\"#function\">Function</a>, <a href=\"#inline\">Inline</a>, <a href=\"#imports\">Import</a>, <a href=\"#decorator\">Decorator</a>, <a href=\"#class\">Class</a>, <a href=\"#ducktypes\">Duck_Type</a>, <a href=\"#enum\">Enum</a>, <a href=\"#exceptions\">Except</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'4. System\\'</span></strong>:      [<a href=\"#exit\">Exit</a>, <a href=\"#print\">Print</a>, <a href=\"#input\">Input</a>, <a href=\"#commandlinearguments\">Command_Line_Arguments</a>, <a href=\"#open\">Open</a>, <a href=\"#paths\">Path</a>, <a href=\"#oscommands\">OS_Commands</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'5. Data\\'</span></strong>:        [<a href=\"#json\">JSON</a>, <a href=\"#pickle\">Pickle</a>, <a href=\"#csv\">CSV</a>, <a href=\"#sqlite\">SQLite</a>, <a href=\"#bytes\">Bytes</a>, <a href=\"#struct\">Struct</a>, <a href=\"#array\">Array</a>, <a href=\"#memoryview\">Memory_View</a>, <a href=\"#deque\">Deque</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'6. Advanced\\'</span></strong>:    [<a href=\"#operator\">Operator</a>, <a href=\"#matchstatement\">Match_Statement</a>, <a href=\"#logging\">Logging</a>, <a href=\"#introspection\">Introspection</a>, <a href=\"#threading\">Threads</a>, <a href=\"#asyncio\">Asyncio</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'7. Libraries\\'</span></strong>:   [<a href=\"#progressbar\">Progress_Bar</a>, <a href=\"#plot\">Plot</a>, <a href=\"#table\">Table</a>, <a href=\"#consoleapp\">Console_App</a>, <a href=\"#guiapp\">GUI</a>, <a href=\"#scraping\">Scraping</a>, <a href=\"#webapp\">Web</a>, <a href=\"#profiling\">Profile</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'8. Multimedia\\'</span></strong>:  [<a href=\"#numpy\">NumPy</a>, <a href=\"#image\">Image</a>, <a href=\"#animation\">Animation</a>, <a href=\"#audio\">Audio</a>, <a href=\"#synthesizer\">Synthesizer</a>, <a href=\"#pygame\">Pygame</a>, <a href=\"#pandas\">Pandas</a>, <a href=\"#plotly\">Plotly</a>]\\n' +\n  '}\\n' +\n  '</code></pre>\\n';\n\nconst BIN_HEX =\n  '&lt;int&gt; = <span class=\"hljs-number\">0x</span>&lt;hex&gt;                                <span class=\"hljs-comment\"># E.g. `0xFf == 255`. Also 0b&lt;bin&gt;.</span>\\n' +\n  '&lt;int&gt; = int(<span class=\"hljs-string\">\\'±&lt;hex&gt;\\'</span>, <span class=\"hljs-number\">16</span>)                      <span class=\"hljs-comment\"># Also int(\\'±0x&lt;hex&gt;/±0b&lt;bin&gt;\\', 0).</span>\\n' +\n  '&lt;str&gt; = hex(&lt;int&gt;)                             <span class=\"hljs-comment\"># Returns \\'[-]0x&lt;hex&gt;\\'. Also bin().</span>\\n';\n\nconst CACHE =\n  '<span class=\"hljs-keyword\">from</span> functools <span class=\"hljs-keyword\">import</span> cache\\n' +\n  '\\n' +\n  '<span class=\"hljs-meta\">@cache</span>\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">fib</span><span class=\"hljs-params\">(n)</span>:</span>\\n' +\n  '    <span class=\"hljs-keyword\">return</span> n <span class=\"hljs-keyword\">if</span> n &lt; <span class=\"hljs-number\">2</span> <span class=\"hljs-keyword\">else</span> fib(n-<span class=\"hljs-number\">2</span>) + fib(n-<span class=\"hljs-number\">1</span>)';\n\nconst SPLAT =\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">add</span><span class=\"hljs-params\">(*a)</span>:</span>\\n' +\n  '<span class=\"hljs-meta\">... </span>    <span class=\"hljs-keyword\">return</span> sum(a)\\n' +\n  '<span class=\"hljs-meta\">... </span>\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>add(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>)\\n' +\n  '<span class=\"hljs-number\">6</span>\\n';\n\nconst PARAMETRIZED_DECORATOR =\n  '<span class=\"hljs-keyword\">from</span> functools <span class=\"hljs-keyword\">import</span> wraps\\n' +\n  '\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">debug</span><span class=\"hljs-params\">(print_result=<span class=\"hljs-keyword\">False</span>)</span>:</span>\\n' +\n  '    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">decorator</span><span class=\"hljs-params\">(func)</span>:</span>\\n' +\n  '<span class=\"hljs-meta\">        @wraps(func)</span>\\n' +\n  '        <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">out</span><span class=\"hljs-params\">(*args, **kwargs)</span>:</span>\\n' +\n  '            result = func(*args, **kwargs)\\n' +\n  '            print(func.__name__, result <span class=\"hljs-keyword\">if</span> print_result <span class=\"hljs-keyword\">else</span> <span class=\"hljs-string\">\\'\\'</span>)\\n' +\n  '            <span class=\"hljs-keyword\">return</span> result\\n' +\n  '        <span class=\"hljs-keyword\">return</span> out\\n' +\n  '    <span class=\"hljs-keyword\">return</span> decorator\\n' +\n  '\\n' +\n  '<span class=\"hljs-meta\">@debug(print_result=True)</span>\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">add</span><span class=\"hljs-params\">(x, y)</span>:</span>\\n' +\n  '    <span class=\"hljs-keyword\">return</span> x + y\\n';\n\nconst REPR_USE_CASES =\n  '<span class=\"hljs-string\">f\\'<span class=\"hljs-subst\">{obj!r}</span>\\'</span>\\n' +\n  'print/str/repr([obj])\\n' +\n  'print/str/repr({obj: obj})\\n' +\n  'print/str/repr(MyDataClass(obj))\\n';\n\nconst CONSTRUCTOR_OVERLOADING =\n  '<span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> &lt;<span class=\"hljs-title\">name</span>&gt;:</span>\\n' +\n  '    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, a=<span class=\"hljs-keyword\">None</span>)</span>:</span>\\n' +\n  '        self.a = a\\n';\n\nconst SHUTIL_COPY =\n  'shutil.copy(from, to)            <span class=\"hljs-comment\"># Copies the file (\\'to\\' can exist or be a dir).</span>\\n' +\n  'shutil.copy2(from, to)           <span class=\"hljs-comment\"># Also copies the creation and modification time.</span>\\n' +\n  'shutil.copytree(from, to)        <span class=\"hljs-comment\"># Copies the directory (\\'to\\' should not exist).</span>\\n';\n\nconst OS_RENAME =\n  'os.rename(from, to)              <span class=\"hljs-comment\"># Renames or moves the file or directory \\'from\\'.</span>\\n' +\n  'os.replace(from, to)             <span class=\"hljs-comment\"># Same, but overwrites file \\'to\\' even on Windows.</span>\\n' +\n  'shutil.move(from, to)            <span class=\"hljs-comment\"># `rename()` that moves into \\'to\\' if it\\'s a dir.</span>\\n';\n\nconst STRUCT_FORMAT =\n  '<span class=\"hljs-section\">\\'&lt;n&gt;s\\'</span><span class=\"hljs-attribute\"></span>';\n\nconst MATCH =\n  '<span class=\"hljs-keyword\">match</span> &lt;object/expression&gt;:\\n' +\n  '    <span class=\"hljs-keyword\">case</span> &lt;pattern&gt; [<span class=\"hljs-keyword\">if</span> &lt;condition&gt;]:\\n' +\n  '        &lt;code&gt;\\n' +\n  '    ...\\n';\n\nconst MATCH_EXAMPLE =\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">from</span> pathlib <span class=\"hljs-keyword\">import</span> Path\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">match</span> Path(<span class=\"hljs-string\">\\'/home/ken/python-cheatsheet/README.md\\'</span>):\\n' +\n  '<span class=\"hljs-meta\">... </span>    <span class=\"hljs-keyword\">case</span> Path(\\n' +\n  '<span class=\"hljs-meta\">... </span>        parts=[<span class=\"hljs-string\">\\'/\\'</span>, <span class=\"hljs-string\">\\'home\\'</span>, user, *_]\\n' +\n  '<span class=\"hljs-meta\">... </span>    ) <span class=\"hljs-keyword\">as</span> p <span class=\"hljs-keyword\">if</span> p.name.lower().startswith(<span class=\"hljs-string\">\\'readme\\'</span>) <span class=\"hljs-keyword\">and</span> p.is_file():\\n' +\n  '<span class=\"hljs-meta\">... </span>        print(<span class=\"hljs-string\">f\\'<span class=\"hljs-subst\">{p.name}</span> is a readme file that belongs to user <span class=\"hljs-subst\">{user}</span>.\\'</span>)\\n' +\n  'README.md is a readme file that belongs to user ken.\\n';\n\nconst COROUTINES =\n  '<span class=\"hljs-keyword\">import</span> asyncio, collections, curses, curses.textpad, enum, random\\n' +\n  '\\n' +\n  'P = collections.namedtuple(<span class=\"hljs-string\">\\'P\\'</span>, <span class=\"hljs-string\">\\'x y\\'</span>)     <span class=\"hljs-comment\"># Position (x and y coordinates).</span>\\n' +\n  'D = enum.Enum(<span class=\"hljs-string\">\\'D\\'</span>, <span class=\"hljs-string\">\\'n e s w\\'</span>)              <span class=\"hljs-comment\"># Direction (north, east, etc.).</span>\\n' +\n  'W, H = <span class=\"hljs-number\">15</span>, <span class=\"hljs-number\">7</span>                               <span class=\"hljs-comment\"># Width and height of the field.</span>\\n' +\n  '\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">main</span><span class=\"hljs-params\">(screen)</span>:</span>\\n' +\n  '    curses.curs_set(<span class=\"hljs-number\">0</span>)                     <span class=\"hljs-comment\"># Makes the cursor invisible.</span>\\n' +\n  '    screen.nodelay(<span class=\"hljs-keyword\">True</span>)                   <span class=\"hljs-comment\"># Makes getch() non-blocking.</span>\\n' +\n  '    asyncio.run(main_coroutine(screen))    <span class=\"hljs-comment\"># Starts running asyncio code.</span>\\n' +\n  '\\n' +\n  '<span class=\"hljs-keyword\">async</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">main_coroutine</span><span class=\"hljs-params\">(screen)</span>:</span>\\n' +\n  '    moves = asyncio.Queue()\\n' +\n  '    state = {<span class=\"hljs-string\">\\'*\\'</span>: P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">0</span>)} | dict.fromkeys(range(<span class=\"hljs-number\">10</span>), P(W//<span class=\"hljs-number\">2</span>, H//<span class=\"hljs-number\">2</span>))\\n' +\n  '    ai    = [random_controller(id_, moves) <span class=\"hljs-keyword\">for</span> id_ <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">10</span>)]\\n' +\n  '    mvc   = [controller(screen, moves), model(moves, state), view(state, screen)]\\n' +\n  '    tasks = [asyncio.create_task(coro) <span class=\"hljs-keyword\">for</span> coro <span class=\"hljs-keyword\">in</span> ai + mvc]\\n' +\n  '    <span class=\"hljs-keyword\">await</span> asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED)\\n' +\n  '\\n' +\n  '<span class=\"hljs-keyword\">async</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">random_controller</span><span class=\"hljs-params\">(id_, moves)</span>:</span>\\n' +\n  '    <span class=\"hljs-keyword\">while</span> <span class=\"hljs-keyword\">True</span>:\\n' +\n  '        d = random.choice(list(D))\\n' +\n  '        moves.put_nowait((id_, d))\\n' +\n  '        <span class=\"hljs-keyword\">await</span> asyncio.sleep(random.triangular(<span class=\"hljs-number\">0.01</span>, <span class=\"hljs-number\">0.65</span>))\\n' +\n  '\\n' +\n  '<span class=\"hljs-keyword\">async</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">controller</span><span class=\"hljs-params\">(screen, moves)</span>:</span>\\n' +\n  '    <span class=\"hljs-keyword\">while</span> <span class=\"hljs-keyword\">True</span>:\\n' +\n  '        key_mappings = {<span class=\"hljs-number\">258</span>: D.s, <span class=\"hljs-number\">259</span>: D.n, <span class=\"hljs-number\">260</span>: D.w, <span class=\"hljs-number\">261</span>: D.e}\\n' +\n  '        <span class=\"hljs-keyword\">if</span> d := key_mappings.get(screen.getch()):\\n' +\n  '            moves.put_nowait((<span class=\"hljs-string\">\\'*\\'</span>, d))\\n' +\n  '        <span class=\"hljs-keyword\">await</span> asyncio.sleep(<span class=\"hljs-number\">0.005</span>)\\n' +\n  '\\n' +\n  '<span class=\"hljs-keyword\">async</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">model</span><span class=\"hljs-params\">(moves, state)</span>:</span>\\n' +\n  '    <span class=\"hljs-keyword\">while</span> state[<span class=\"hljs-string\">\\'*\\'</span>] <span class=\"hljs-keyword\">not</span> <span class=\"hljs-keyword\">in</span> (state[id_] <span class=\"hljs-keyword\">for</span> id_ <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">10</span>)):\\n' +\n  '        id_, d = <span class=\"hljs-keyword\">await</span> moves.get()\\n' +\n  '        deltas = {D.n: P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">-1</span>), D.e: P(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">0</span>), D.s: P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">1</span>), D.w: P(<span class=\"hljs-number\">-1</span>, <span class=\"hljs-number\">0</span>)}\\n' +\n  '        state[id_] = P((state[id_].x + deltas[d].x) % W, (state[id_].y + deltas[d].y) % H)\\n' +\n  '\\n' +\n  '<span class=\"hljs-keyword\">async</span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">view</span><span class=\"hljs-params\">(state, screen)</span>:</span>\\n' +\n  '    offset = P(curses.COLS//<span class=\"hljs-number\">2</span> - W//<span class=\"hljs-number\">2</span>, curses.LINES//<span class=\"hljs-number\">2</span> - H//<span class=\"hljs-number\">2</span>)\\n' +\n  '    <span class=\"hljs-keyword\">while</span> <span class=\"hljs-keyword\">True</span>:\\n' +\n  '        screen.erase()\\n' +\n  '        curses.textpad.rectangle(screen, offset.y-<span class=\"hljs-number\">1</span>, offset.x-<span class=\"hljs-number\">1</span>, offset.y+H, offset.x+W)\\n' +\n  '        <span class=\"hljs-keyword\">for</span> id_, p <span class=\"hljs-keyword\">in</span> state.items():\\n' +\n  '            screen.addstr(offset.y + (p.y - state[<span class=\"hljs-string\">\\'*\\'</span>].y + H//<span class=\"hljs-number\">2</span>) % H,\\n' +\n  '                          offset.x + (p.x - state[<span class=\"hljs-string\">\\'*\\'</span>].x + W//<span class=\"hljs-number\">2</span>) % W, str(id_))\\n' +\n  '        screen.refresh()\\n' +\n  '        <span class=\"hljs-keyword\">await</span> asyncio.sleep(<span class=\"hljs-number\">0.005</span>)\\n' +\n  '\\n' +\n  '<span class=\"hljs-keyword\">if</span> __name__ == <span class=\"hljs-string\">\\'__main__\\'</span>:\\n' +\n  '    curses.wrapper(main)\\n';\n\nconst CURSES =\n  '<span class=\"hljs-comment\"># $ pip3 install windows-curses</span>\\n' +\n  '<span class=\"hljs-keyword\">import</span> curses, os\\n' +\n  '<span class=\"hljs-keyword\">from</span> curses <span class=\"hljs-keyword\">import</span> A_REVERSE, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT\\n' +\n  '\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">main</span><span class=\"hljs-params\">(screen)</span>:</span>\\n' +\n  '    ch, first, selected, paths = <span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">0</span>, os.listdir()\\n' +\n  '    <span class=\"hljs-keyword\">while</span> ch != ord(<span class=\"hljs-string\">\\'q\\'</span>):\\n' +\n  '        height, width = screen.getmaxyx()\\n' +\n  '        screen.erase()\\n' +\n  '        <span class=\"hljs-keyword\">for</span> y, filename <span class=\"hljs-keyword\">in</span> enumerate(paths[first : first+height]):\\n' +\n  '            color = A_REVERSE <span class=\"hljs-keyword\">if</span> filename == paths[selected] <span class=\"hljs-keyword\">else</span> <span class=\"hljs-number\">0</span>\\n' +\n  '            screen.addnstr(y, <span class=\"hljs-number\">0</span>, filename, width-<span class=\"hljs-number\">1</span>, color)\\n' +\n  '        ch = screen.getch()\\n' +\n  '        selected -= (ch == KEY_UP) <span class=\"hljs-keyword\">and</span> (selected &gt; <span class=\"hljs-number\">0</span>)\\n' +\n  '        selected += (ch == KEY_DOWN) <span class=\"hljs-keyword\">and</span> (selected &lt; len(paths)-<span class=\"hljs-number\">1</span>)\\n' +\n  '        first -= (first &gt; selected)\\n' +\n  '        first += (first &lt; selected-(height-<span class=\"hljs-number\">1</span>))\\n' +\n  '        <span class=\"hljs-keyword\">if</span> ch <span class=\"hljs-keyword\">in</span> [KEY_LEFT, KEY_RIGHT, ord(<span class=\"hljs-string\">\\'\\\\n\\'</span>)]:\\n' +\n  '            new_dir = <span class=\"hljs-string\">\\'..\\'</span> <span class=\"hljs-keyword\">if</span> ch == KEY_LEFT <span class=\"hljs-keyword\">else</span> paths[selected]\\n' +\n  '            <span class=\"hljs-keyword\">if</span> os.path.isdir(new_dir):\\n' +\n  '                os.chdir(new_dir)\\n' +\n  '                first, selected, paths = <span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">0</span>, os.listdir()\\n' +\n  '\\n' +\n  '<span class=\"hljs-keyword\">if</span> __name__ == <span class=\"hljs-string\">\\'__main__\\'</span>:\\n' +\n  '    curses.wrapper(main)\\n';\n\nconst PROGRESS_BAR =\n  '<span class=\"hljs-comment\"># $ pip3 install tqdm</span>\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">import</span> tqdm, time\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span><span class=\"hljs-keyword\">for</span> el <span class=\"hljs-keyword\">in</span> tqdm.tqdm([<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>], desc=<span class=\"hljs-string\">\\'Processing\\'</span>):\\n' +\n  '<span class=\"hljs-meta\">... </span>    time.sleep(<span class=\"hljs-number\">1</span>)\\n' +\n  'Processing: 100%|████████████████████| 3/3 [00:03&lt;00:00,  1.00s/it]\\n';\n\nconst LOGGING_EXAMPLE =\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>logger = log.getLogger(<span class=\"hljs-string\">\\'my_module\\'</span>)\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>handler = log.FileHandler(<span class=\"hljs-string\">\\'test.log\\'</span>, encoding=<span class=\"hljs-string\">\\'utf-8\\'</span>)\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>format_str = <span class=\"hljs-string\">\\'%(asctime)s %(levelname)s:%(name)s:%(message)s\\'</span>\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>handler.setFormatter(log.Formatter(format_str))\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>logger.addHandler(handler)\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>logger.setLevel(<span class=\"hljs-string\">\\'DEBUG\\'</span>)\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>log.basicConfig()\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>roots_handler = log.root.handlers[<span class=\"hljs-number\">0</span>]\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>roots_handler.setLevel(<span class=\"hljs-string\">\\'WARNING\\'</span>)\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>logger.critical(<span class=\"hljs-string\">\\'Missing config file.\\'</span>)\\n' +\n  'CRITICAL:my_module:Missing config file.\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>print(open(<span class=\"hljs-string\">\\'test.log\\'</span>).read())\\n' +\n  '2023-02-07 23:21:01,430 CRITICAL:my_module:Missing config file.\\n';\n\nconst AUDIO_1 =\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">write_to_wav_file</span><span class=\"hljs-params\">(filename, samples_f, p=<span class=\"hljs-keyword\">None</span>, nchannels=<span class=\"hljs-number\">1</span>, sampwidth=<span class=\"hljs-number\">2</span>, fs=<span class=\"hljs-number\">44100</span>)</span>:</span>\\n' +\n  '    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_bytes</span><span class=\"hljs-params\">(a_float)</span>:</span>\\n' +\n  '        a_float = max(<span class=\"hljs-number\">-1</span>, min(<span class=\"hljs-number\">1</span> - <span class=\"hljs-number\">2e-16</span>, a_float)) + (p.sampwidth == <span class=\"hljs-number\">1</span>)\\n' +\n  '        a_float *= pow(<span class=\"hljs-number\">2</span>, (p.sampwidth * <span class=\"hljs-number\">8</span>) - <span class=\"hljs-number\">1</span>)\\n' +\n  '        <span class=\"hljs-keyword\">return</span> int(a_float).to_bytes(p.sampwidth, <span class=\"hljs-string\">\\'little\\'</span>, signed=(p.sampwidth != <span class=\"hljs-number\">1</span>))\\n' +\n  '    <span class=\"hljs-keyword\">if</span> p <span class=\"hljs-keyword\">is</span> <span class=\"hljs-keyword\">None</span>:\\n' +\n  '        p = wave._wave_params(nchannels, sampwidth, fs, <span class=\"hljs-number\">0</span>, <span class=\"hljs-string\">\\'NONE\\'</span>, <span class=\"hljs-string\">\\'not compressed\\'</span>)\\n' +\n  '    <span class=\"hljs-keyword\">with</span> wave.open(filename, <span class=\"hljs-string\">\\'wb\\'</span>) <span class=\"hljs-keyword\">as</span> file:\\n' +\n  '        file.setparams(p)\\n' +\n  '        file.writeframes(<span class=\"hljs-string\">b\\'\\'</span>.join(get_bytes(f) <span class=\"hljs-keyword\">for</span> f <span class=\"hljs-keyword\">in</span> samples_f))\\n';\n\nconst AUDIO_2 =\n  '<span class=\"hljs-keyword\">from</span> math <span class=\"hljs-keyword\">import</span> sin, pi\\n' +\n  'get_sin = <span class=\"hljs-keyword\">lambda</span> i: sin(i * <span class=\"hljs-number\">2</span> * pi * <span class=\"hljs-number\">440</span> / <span class=\"hljs-number\">44100</span>) * <span class=\"hljs-number\">0.2</span>\\n' +\n  'write_to_wav_file(<span class=\"hljs-string\">\\'test.wav\\'</span>, (get_sin(i) <span class=\"hljs-keyword\">for</span> i <span class=\"hljs-keyword\">in</span> range(<span class=\"hljs-number\">100_000</span>)))\\n';\n\nconst MARIO =\n  '<span class=\"hljs-keyword\">import</span> collections, dataclasses, enum, io, itertools <span class=\"hljs-keyword\">as</span> it, pygame <span class=\"hljs-keyword\">as</span> pg, urllib.request\\n' +\n  '<span class=\"hljs-keyword\">from</span> random <span class=\"hljs-keyword\">import</span> randint\\n' +\n  '\\n' +\n  'P = collections.namedtuple(<span class=\"hljs-string\">\\'P\\'</span>, <span class=\"hljs-string\">\\'x y\\'</span>)          <span class=\"hljs-comment\"># Position (x and y coordinates).</span>\\n' +\n  'D = enum.Enum(<span class=\"hljs-string\">\\'D\\'</span>, <span class=\"hljs-string\">\\'n e s w\\'</span>)                   <span class=\"hljs-comment\"># Direction (north, east, etc.).</span>\\n' +\n  'W, H, MAX_S = <span class=\"hljs-number\">50</span>, <span class=\"hljs-number\">50</span>, P(<span class=\"hljs-number\">5</span>, <span class=\"hljs-number\">10</span>)                  <span class=\"hljs-comment\"># Width, height, maximum speed.</span>\\n' +\n  '\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">main</span><span class=\"hljs-params\">()</span>:</span>\\n' +\n  '    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_screen</span><span class=\"hljs-params\">()</span>:</span>\\n' +\n  '        pg.init()\\n' +\n  '        <span class=\"hljs-keyword\">return</span> pg.display.set_mode((W*<span class=\"hljs-number\">16</span>, H*<span class=\"hljs-number\">16</span>))\\n' +\n  '    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_images</span><span class=\"hljs-params\">()</span>:</span>\\n' +\n  '        url = <span class=\"hljs-string\">\\'https://gto76.github.io/python-cheatsheet/web/mario_bros.png\\'</span>\\n' +\n  '        img = pg.image.load(io.BytesIO(urllib.request.urlopen(url).read()))\\n' +\n  '        <span class=\"hljs-keyword\">return</span> [img.subsurface(get_rect(x, <span class=\"hljs-number\">0</span>)) <span class=\"hljs-keyword\">for</span> x <span class=\"hljs-keyword\">in</span> range(img.get_width() // <span class=\"hljs-number\">16</span>)]\\n' +\n  '    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_mario</span><span class=\"hljs-params\">()</span>:</span>\\n' +\n  '        Mario = dataclasses.make_dataclass(<span class=\"hljs-string\">\\'Mario\\'</span>, <span class=\"hljs-string\">\\'rect spd facing_left frame_cycle\\'</span>.split())\\n' +\n  '        <span class=\"hljs-keyword\">return</span> Mario(get_rect(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">1</span>), P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">0</span>), <span class=\"hljs-keyword\">False</span>, it.cycle(range(<span class=\"hljs-number\">3</span>)))\\n' +\n  '    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_tiles</span><span class=\"hljs-params\">()</span>:</span>\\n' +\n  '        border = [(x, y) <span class=\"hljs-keyword\">for</span> x <span class=\"hljs-keyword\">in</span> range(W) <span class=\"hljs-keyword\">for</span> y <span class=\"hljs-keyword\">in</span> range(H) <span class=\"hljs-keyword\">if</span> x <span class=\"hljs-keyword\">in</span> [<span class=\"hljs-number\">0</span>, W-<span class=\"hljs-number\">1</span>] <span class=\"hljs-keyword\">or</span> y <span class=\"hljs-keyword\">in</span> [<span class=\"hljs-number\">0</span>, H-<span class=\"hljs-number\">1</span>]]\\n' +\n  '        platforms = [(randint(<span class=\"hljs-number\">1</span>, W-<span class=\"hljs-number\">2</span>), randint(<span class=\"hljs-number\">2</span>, H-<span class=\"hljs-number\">2</span>)) <span class=\"hljs-keyword\">for</span> _ <span class=\"hljs-keyword\">in</span> range(W*H // <span class=\"hljs-number\">10</span>)]\\n' +\n  '        <span class=\"hljs-keyword\">return</span> [get_rect(x, y) <span class=\"hljs-keyword\">for</span> x, y <span class=\"hljs-keyword\">in</span> border + platforms]\\n' +\n  '    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_rect</span><span class=\"hljs-params\">(x, y)</span>:</span>\\n' +\n  '        <span class=\"hljs-keyword\">return</span> pg.Rect(x*<span class=\"hljs-number\">16</span>, y*<span class=\"hljs-number\">16</span>, <span class=\"hljs-number\">16</span>, <span class=\"hljs-number\">16</span>)\\n' +\n  '    run(get_screen(), get_images(), get_mario(), get_tiles())\\n' +\n  '\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">run</span><span class=\"hljs-params\">(screen, images, mario, tiles)</span>:</span>\\n' +\n  '    clock = pg.time.Clock()\\n' +\n  '    pressed = set()\\n' +\n  '    <span class=\"hljs-keyword\">while</span> <span class=\"hljs-keyword\">not</span> pg.event.get(pg.QUIT):\\n' +\n  '        clock.tick(<span class=\"hljs-number\">28</span>)\\n' +\n  '        pressed |= {e.key <span class=\"hljs-keyword\">for</span> e <span class=\"hljs-keyword\">in</span> pg.event.get(pg.KEYDOWN)}\\n' +\n  '        pressed -= {e.key <span class=\"hljs-keyword\">for</span> e <span class=\"hljs-keyword\">in</span> pg.event.get(pg.KEYUP)}\\n' +\n  '        update_speed(mario, tiles, pressed)\\n' +\n  '        update_position(mario, tiles)\\n' +\n  '        draw(screen, images, mario, tiles)\\n' +\n  '    pg.quit()\\n' +\n  '\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">update_speed</span><span class=\"hljs-params\">(mario, tiles, pressed)</span>:</span>\\n' +\n  '    x, y = mario.spd\\n' +\n  '    x += <span class=\"hljs-number\">2</span> * ((pg.K_RIGHT <span class=\"hljs-keyword\">in</span> pressed) - (pg.K_LEFT <span class=\"hljs-keyword\">in</span> pressed))\\n' +\n  '    x += (x &lt; <span class=\"hljs-number\">0</span>) - (x &gt; <span class=\"hljs-number\">0</span>)\\n' +\n  '    y += <span class=\"hljs-number\">1</span> <span class=\"hljs-keyword\">if</span> D.s <span class=\"hljs-keyword\">not</span> <span class=\"hljs-keyword\">in</span> get_boundaries(mario.rect, tiles) <span class=\"hljs-keyword\">else</span> (pg.K_UP <span class=\"hljs-keyword\">in</span> pressed) * <span class=\"hljs-number\">-10</span>\\n' +\n  '    mario.spd = P(x=max(-MAX_S.x, min(MAX_S.x, x)), y=max(-MAX_S.y, min(MAX_S.y, y)))\\n' +\n  '\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">update_position</span><span class=\"hljs-params\">(mario, tiles)</span>:</span>\\n' +\n  '    x, y = mario.rect.topleft\\n' +\n  '    n_steps = max(abs(s) <span class=\"hljs-keyword\">for</span> s <span class=\"hljs-keyword\">in</span> mario.spd)\\n' +\n  '    <span class=\"hljs-keyword\">for</span> _ <span class=\"hljs-keyword\">in</span> range(n_steps):\\n' +\n  '        mario.spd = stop_on_collision(mario.spd, get_boundaries(mario.rect, tiles))\\n' +\n  '        mario.rect.topleft = x, y = x + (mario.spd.x / n_steps), y + (mario.spd.y / n_steps)\\n' +\n  '\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">get_boundaries</span><span class=\"hljs-params\">(rect, tiles)</span>:</span>\\n' +\n  '    deltas = {D.n: P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">-1</span>), D.e: P(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">0</span>), D.s: P(<span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">1</span>), D.w: P(<span class=\"hljs-number\">-1</span>, <span class=\"hljs-number\">0</span>)}\\n' +\n  '    <span class=\"hljs-keyword\">return</span> {d <span class=\"hljs-keyword\">for</span> d, delta <span class=\"hljs-keyword\">in</span> deltas.items() <span class=\"hljs-keyword\">if</span> rect.move(delta).collidelist(tiles) != <span class=\"hljs-number\">-1</span>}\\n' +\n  '\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">stop_on_collision</span><span class=\"hljs-params\">(spd, bounds)</span>:</span>\\n' +\n  '    <span class=\"hljs-keyword\">return</span> P(x=<span class=\"hljs-number\">0</span> <span class=\"hljs-keyword\">if</span> (D.w <span class=\"hljs-keyword\">in</span> bounds <span class=\"hljs-keyword\">and</span> spd.x &lt; <span class=\"hljs-number\">0</span>) <span class=\"hljs-keyword\">or</span> (D.e <span class=\"hljs-keyword\">in</span> bounds <span class=\"hljs-keyword\">and</span> spd.x &gt; <span class=\"hljs-number\">0</span>) <span class=\"hljs-keyword\">else</span> spd.x,\\n' +\n  '             y=<span class=\"hljs-number\">0</span> <span class=\"hljs-keyword\">if</span> (D.n <span class=\"hljs-keyword\">in</span> bounds <span class=\"hljs-keyword\">and</span> spd.y &lt; <span class=\"hljs-number\">0</span>) <span class=\"hljs-keyword\">or</span> (D.s <span class=\"hljs-keyword\">in</span> bounds <span class=\"hljs-keyword\">and</span> spd.y &gt; <span class=\"hljs-number\">0</span>) <span class=\"hljs-keyword\">else</span> spd.y)\\n' +\n  '\\n' +\n  '<span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">draw</span><span class=\"hljs-params\">(screen, images, mario, tiles)</span>:</span>\\n' +\n  '    screen.fill((<span class=\"hljs-number\">85</span>, <span class=\"hljs-number\">168</span>, <span class=\"hljs-number\">255</span>))\\n' +\n  '    mario.facing_left = mario.spd.x &lt; <span class=\"hljs-number\">0</span> <span class=\"hljs-keyword\">if</span> mario.spd.x <span class=\"hljs-keyword\">else</span> mario.facing_left\\n' +\n  '    is_airborne = D.s <span class=\"hljs-keyword\">not</span> <span class=\"hljs-keyword\">in</span> get_boundaries(mario.rect, tiles)\\n' +\n  '    image_index = <span class=\"hljs-number\">4</span> <span class=\"hljs-keyword\">if</span> is_airborne <span class=\"hljs-keyword\">else</span> next(mario.frame_cycle) <span class=\"hljs-keyword\">if</span> mario.spd.x <span class=\"hljs-keyword\">else</span> <span class=\"hljs-number\">6</span>\\n' +\n  '    screen.blit(images[image_index + (mario.facing_left * <span class=\"hljs-number\">9</span>)], mario.rect)\\n' +\n  '    <span class=\"hljs-keyword\">for</span> tile <span class=\"hljs-keyword\">in</span> tiles:\\n' +\n  '        is_border = tile.x <span class=\"hljs-keyword\">in</span> [<span class=\"hljs-number\">0</span>, (W-<span class=\"hljs-number\">1</span>)*<span class=\"hljs-number\">16</span>] <span class=\"hljs-keyword\">or</span> tile.y <span class=\"hljs-keyword\">in</span> [<span class=\"hljs-number\">0</span>, (H-<span class=\"hljs-number\">1</span>)*<span class=\"hljs-number\">16</span>]\\n' +\n  '        screen.blit(images[<span class=\"hljs-number\">18</span> <span class=\"hljs-keyword\">if</span> is_border <span class=\"hljs-keyword\">else</span> <span class=\"hljs-number\">19</span>], tile)\\n' +\n  '    pg.display.flip()\\n' +\n  '\\n' +\n  '<span class=\"hljs-keyword\">if</span> __name__ == <span class=\"hljs-string\">\\'__main__\\'</span>:\\n' +\n  '    main()\\n';\n\nconst GROUPBY =\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>df = pd.DataFrame([[<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>, <span class=\"hljs-number\">3</span>], [<span class=\"hljs-number\">4</span>, <span class=\"hljs-number\">5</span>, <span class=\"hljs-number\">6</span>], [<span class=\"hljs-number\">7</span>, <span class=\"hljs-number\">8</span>, <span class=\"hljs-number\">6</span>]], list(<span class=\"hljs-string\">\\'abc\\'</span>), list(<span class=\"hljs-string\">\\'xyz\\'</span>))\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>gb = df.groupby(<span class=\"hljs-string\">\\'z\\'</span>); gb.apply(print)\\n' +\n  '   x  y  z\\n' +\n  'a  <span class=\"hljs-number\">1</span>  <span class=\"hljs-number\">2</span>  <span class=\"hljs-number\">3</span>\\n' +\n  '   x  y  z\\n' +\n  'b  <span class=\"hljs-number\">4</span>  <span class=\"hljs-number\">5</span>  <span class=\"hljs-number\">6</span>\\n' +\n  'c  <span class=\"hljs-number\">7</span>  <span class=\"hljs-number\">8</span>  <span class=\"hljs-number\">6</span>\\n' +\n  '<span class=\"hljs-meta\">&gt;&gt;&gt; </span>gb.sum()\\n' +\n  '    x   y\\n' +\n  'z\\n' +\n  '<span class=\"hljs-number\">3</span>   <span class=\"hljs-number\">1</span>   <span class=\"hljs-number\">2</span>\\n' +\n  '<span class=\"hljs-number\">6</span>  <span class=\"hljs-number\">11</span>  <span class=\"hljs-number\">13</span>';\n\nconst CYTHON_1 =\n  '<span class=\"hljs-keyword\">cdef</span> &lt;type&gt; &lt;var_name&gt; [= &lt;obj/var&gt;]                 <span class=\"hljs-comment\"># Either Python or C type variable.</span>\\n' +\n  '<span class=\"hljs-keyword\">cdef</span> &lt;ctype&gt; *&lt;pointer_name&gt; [= &amp;&lt;var&gt;]              <span class=\"hljs-comment\"># Use &lt;pointer&gt;[0] to get the value.</span>\\n' +\n  '<span class=\"hljs-keyword\">cdef</span> &lt;ctype&gt;[size] &lt;array_name&gt; [= &lt;coll/array&gt;]     <span class=\"hljs-comment\"># Also `&lt;ctype&gt;[:] &lt;mview&gt; = &lt;array&gt;`.</span>\\n' +\n  '<span class=\"hljs-keyword\">cdef</span> &lt;ctype&gt; *&lt;array_name&gt; [= &lt;coll/array/pointer&gt;]  <span class=\"hljs-comment\"># E.g. `&lt;&lt;ctype&gt; *&gt; malloc(n_bytes)`.</span>\\n';\n\nconst CYTHON_2 =\n  '<span class=\"hljs-keyword\">cdef</span> &lt;type&gt; &lt;func_name&gt;(&lt;type&gt; [*]&lt;arg_name&gt;): ...   <span class=\"hljs-comment\"># Omitted types default to `object`.</span>\\n';\n\nconst CYTHON_3 =\n  '<span class=\"hljs-keyword\">cdef</span> <span class=\"hljs-class\"><span class=\"hljs-keyword\">class</span> &lt;<span class=\"hljs-title\">class_name</span>&gt;:</span>                             <span class=\"hljs-comment\"># Also `cdef struct &lt;struct_name&gt;:`.</span>\\n' +\n  '    <span class=\"hljs-keyword\">cdef</span> <span class=\"hljs-keyword\">public</span> &lt;type&gt; [*]&lt;attr_name&gt;                <span class=\"hljs-comment\"># Also `... &lt;ctype&gt; [*]&lt;field_name&gt;`.</span>\\n' +\n  '    <span class=\"hljs-function\"><span class=\"hljs-keyword\">def</span> <span class=\"hljs-title\">__init__</span><span class=\"hljs-params\">(self, &lt;type&gt; &lt;arg_name&gt;)</span>:</span>           <span class=\"hljs-comment\"># Also `cdef __dealloc__(self):`.</span>\\n' +\n  '        self.&lt;attr_name&gt; = &lt;arg_name&gt;                <span class=\"hljs-comment\"># Also `... free(&lt;array/pointer&gt;)`.</span>\\n';\n\nconst INDEX =\n  '<li><strong>Ctrl+F / ⌘F is usually sufficient.</strong></li>\\n' +\n  '<li><strong>Searching <code class=\"python hljs\"><span class=\"hljs-string\">\\'#&lt;title&gt;\\'</span></code> will limit the search to the titles.</strong></li>\\n' +\n  '<li><strong>Click on the title\\'s <code class=\"python hljs\"><span class=\"hljs-string\">\\'#\\'</span></code> to get a link to its section.</strong></li>\\n';\n\n\nconst DIAGRAM_1_A =\n  '+------------------+------------+------------+------------+\\n' +\n  '|                  |  Iterable  | Collection |  Sequence  |\\n' +\n  '+------------------+------------+------------+------------+\\n';\n\nconst DIAGRAM_1_B =\n  '┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┓\\n' +\n  '┃                  │  Iterable  │ Collection │  Sequence  ┃\\n' +\n  '┠──────────────────┼────────────┼────────────┼────────────┨\\n' +\n  '┃ list, range, str │     ✓      │     ✓      │     ✓      ┃\\n' +\n  '┃ dict, set        │     ✓      │     ✓      │            ┃\\n' +\n  '┃ iter             │     ✓      │            │            ┃\\n' +\n  '┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┛\\n';\n\nconst DIAGRAM_2_A =\n  '+--------------------+-----------+-----------+----------+----------+----------+\\n' +\n  '|                    |   Number  |  Complex  |   Real   | Rational | Integral |\\n' +\n  '+--------------------+-----------+-----------+----------+----------+----------+\\n';\n\nconst DIAGRAM_2_B =\n  '┏━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\\n' +\n  '┃                    │   Number  │  Complex  │   Real   │ Rational │ Integral ┃\\n' +\n  '┠────────────────────┼───────────┼───────────┼──────────┼──────────┼──────────┨\\n' +\n  '┃ int                │     ✓     │     ✓     │    ✓     │    ✓     │    ✓     ┃\\n' +\n  '┃ fractions.Fraction │     ✓     │     ✓     │    ✓     │    ✓     │          ┃\\n' +\n  '┃ float              │     ✓     │     ✓     │    ✓     │          │          ┃\\n' +\n  '┃ complex            │     ✓     │     ✓     │          │          │          ┃\\n' +\n  '┃ decimal.Decimal    │     ✓     │           │          │          │          ┃\\n' +\n  '┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\\n';\n\nconst DIAGRAM_3_A =\n  '+---------------+----------+----------+----------+----------+----------+\\n';\n\nconst DIAGRAM_3_B =\n  '┏━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\\n' +\n  '┃               │ [ !#$%…] │ [a-zA-Z] │  [¼½¾]   │  [²³¹]   │  [0-9]   ┃\\n' +\n  '┠───────────────┼──────────┼──────────┼──────────┼──────────┼──────────┨\\n' +\n  '┃ isprintable() │    ✓     │    ✓     │    ✓     │    ✓     │    ✓     ┃\\n' +\n  '┃ isalnum()     │          │    ✓     │    ✓     │    ✓     │    ✓     ┃\\n' +\n  '┃ isnumeric()   │          │          │    ✓     │    ✓     │    ✓     ┃\\n' +\n  '┃ isdigit()     │          │          │          │    ✓     │    ✓     ┃\\n' +\n  '┃ isdecimal()   │          │          │          │          │    ✓     ┃\\n' +\n  '┗━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\\n';\n\nconst DIAGRAM_4_A =\n  \"+--------------+----------------+----------------+----------------+----------------+\\n\" +\n  \"|              |    {<float>}   |   {<float>:f}  |   {<float>:e}  |   {<float>:%}  |\\n\" +\n  \"+--------------+----------------+----------------+----------------+----------------+\\n\";\n\nconst DIAGRAM_4_B =\n  \"┏━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃              │    {&lt;float&gt;}   │   {&lt;float&gt;:f}  │   {&lt;float&gt;:e}  │   {&lt;float&gt;:%}  ┃\\n\" +\n  \"┠──────────────┼────────────────┼────────────────┼────────────────┼────────────────┨\\n\" +\n  \"┃  0.000056789 │   '5.6789e-05' │    '0.000057'  │ '5.678900e-05' │    '0.005679%' ┃\\n\" +\n  \"┃  0.00056789  │   '0.00056789' │    '0.000568'  │ '5.678900e-04' │    '0.056789%' ┃\\n\" +\n  \"┃  0.0056789   │   '0.0056789'  │    '0.005679'  │ '5.678900e-03' │    '0.567890%' ┃\\n\" +\n  \"┃  0.056789    │   '0.056789'   │    '0.056789'  │ '5.678900e-02' │    '5.678900%' ┃\\n\" +\n  \"┃  0.56789     │   '0.56789'    │    '0.567890'  │ '5.678900e-01' │   '56.789000%' ┃\\n\" +\n  \"┃  5.6789      │   '5.6789'     │    '5.678900'  │ '5.678900e+00' │  '567.890000%' ┃\\n\" +\n  \"┃ 56.789       │  '56.789'      │   '56.789000'  │ '5.678900e+01' │ '5678.900000%' ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛\\n\" +\n  \"\\n\" +\n  \"┏━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃              │  {&lt;float&gt;:.2}  │  {&lt;float&gt;:.2f} │  {&lt;float&gt;:.2e} │  {&lt;float&gt;:.2%} ┃\\n\" +\n  \"┠──────────────┼────────────────┼────────────────┼────────────────┼────────────────┨\\n\" +\n  \"┃  0.000056789 │    '5.7e-05'   │      '0.00'    │   '5.68e-05'   │      '0.01%'   ┃\\n\" +\n  \"┃  0.00056789  │    '0.00057'   │      '0.00'    │   '5.68e-04'   │      '0.06%'   ┃\\n\" +\n  \"┃  0.0056789   │    '0.0057'    │      '0.01'    │   '5.68e-03'   │      '0.57%'   ┃\\n\" +\n  \"┃  0.056789    │    '0.057'     │      '0.06'    │   '5.68e-02'   │      '5.68%'   ┃\\n\" +\n  \"┃  0.56789     │    '0.57'      │      '0.57'    │   '5.68e-01'   │     '56.79%'   ┃\\n\" +\n  \"┃  5.6789      │    '5.7'       │      '5.68'    │   '5.68e+00'   │    '567.89%'   ┃\\n\" +\n  \"┃ 56.789       │    '5.7e+01'   │     '56.79'    │   '5.68e+01'   │   '5678.90%'   ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛\\n\";\n\nconst DIAGRAM_5_A =\n  \"+--------------+----------------+----------------+----------------+----------------+\\n\" +\n  \"|              |  {<float>:.2}  |  {<float>:.2f} |  {<float>:.2e} |  {<float>:.2%} |\\n\" +\n  \"+--------------+----------------+----------------+----------------+----------------+\\n\";\n\nconst DIAGRAM_55_A =\n  \"+---------------------------+----------------+--------------+--------------+\\n\";\n\nconst DIAGRAM_55_B =\n  '┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\\n' +\n  '┃                           │ func(x=<span class=\"hljs-number\">1</span>, y=<span class=\"hljs-number\">2</span>) │ func(<span class=\"hljs-number\">1</span>, y=<span class=\"hljs-number\">2</span>) │  func(<span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">2</span>)  ┃\\n' +\n  '┠───────────────────────────┼────────────────┼──────────────┼──────────────┨\\n' +\n  '┃ <span class=\"hljs-title\">func</span>(x, *args, **kwargs): │       ✓        │      ✓       │      ✓       ┃\\n' +\n  '┃ <span class=\"hljs-title\">func</span>(*args, y, **kwargs): │       ✓        │      ✓       │              ┃\\n' +\n  '┃ <span class=\"hljs-title\">func</span>(*, x, **kwargs):     │       ✓        │              │              ┃\\n' +\n  '┗━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\\n';\n\n\nconst DIAGRAM_6_A =\n  '+------------+------------+------------+------------+--------------+\\n' +\n  '|            |  Iterable  | Collection |  Sequence  | abc.Sequence |\\n' +\n  '+------------+------------+------------+------------+--------------+\\n';\n\nconst DIAGRAM_6_B =\n  '┏━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\\n' +\n  '┃            │  Iterable  │ Collection │  Sequence  │ abc.Sequence ┃\\n' +\n  '┠────────────┼────────────┼────────────┼────────────┼──────────────┨\\n' +\n  '┃ iter()     │     !      │     !      │     ✓      │      ✓       ┃\\n' +\n  '┃ contains() │     ✓      │     ✓      │     ✓      │      ✓       ┃\\n' +\n  '┃ len()      │            │     !      │     !      │      !       ┃\\n' +\n  '┃ getitem()  │            │            │     !      │      !       ┃\\n' +\n  '┃ reversed() │            │            │     ✓      │      ✓       ┃\\n' +\n  '┃ index()    │            │            │            │      ✓       ┃\\n' +\n  '┃ count()    │            │            │            │      ✓       ┃\\n' +\n  '┗━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\\n';\n\nconst DIAGRAM_7_A =\n  'BaseException\\n' +\n  ' +-- SystemExit';\n\nconst DIAGRAM_7_B =\n  \"BaseException\\n\" +\n  \" ├── SystemExit                   <span class='hljs-comment'># Raised when `sys.exit()` is called. See #Exit for details.</span>\\n\" +\n  \" ├── KeyboardInterrupt            <span class='hljs-comment'># Raised when the user hits the interrupt key, i.e. `ctrl-c`.</span>\\n\" +\n  \" └── Exception                    <span class='hljs-comment'># User-defined exceptions should be derived from this class.</span>\\n\" +\n  \"      ├── ArithmeticError         <span class='hljs-comment'># Base class for arithmetic errors such as ZeroDivisionError.</span>\\n\" +\n  \"      ├── AssertionError          <span class='hljs-comment'># Raised by `assert &lt;exp&gt;` if expression returns false value.</span>\\n\" +\n  \"      ├── AttributeError          <span class='hljs-comment'># Raised when object doesn't have requested attribute/method.</span>\\n\" +\n  \"      ├── EOFError                <span class='hljs-comment'># Raised by `input()` when it hits an end-of-file condition.</span>\\n\" +\n  \"      ├── LookupError             <span class='hljs-comment'># Base class for errors when a collection can't find an item.</span>\\n\" +\n  \"      │    ├── IndexError         <span class='hljs-comment'># Raised when index of a sequence (list/str) is out of range.</span>\\n\" +\n  \"      │    └── KeyError           <span class='hljs-comment'># Raised when a dictionary's key or a set element is missing.</span>\\n\" +\n  \"      ├── MemoryError             <span class='hljs-comment'># Out of memory. May be too late to start deleting variables.</span>\\n\" +\n  \"      ├── NameError               <span class='hljs-comment'># Raised when nonexistent name (variable/func/class) is used.</span>\\n\" +\n  \"      │    └── UnboundLocalError  <span class='hljs-comment'># Raised when a local name is used before it's being defined.</span>\\n\" +\n  \"      ├── OSError                 <span class='hljs-comment'># Errors such as FileExistsError and TimeoutError. See #Open.</span>\\n\" +\n  \"      │    └── ConnectionError    <span class='hljs-comment'># Errors such as BrokenPipeError and ConnectionAbortedError.</span>\\n\" +\n  \"      ├── RuntimeError            <span class='hljs-comment'># Is raised by errors that do not fit into other categories.</span>\\n\" +\n  \"      │    ├── NotImplementedEr…  <span class='hljs-comment'># Can be raised by abstract methods or by an unfinished code.</span>\\n\" +\n  \"      │    └── RecursionError     <span class='hljs-comment'># Raised if max recursion depth is exceeded (3k by default).</span>\\n\" +\n  \"      ├── StopIteration           <span class='hljs-comment'># Raised when exhausted (empty) iterator is passed to next().</span>\\n\" +\n  \"      ├── TypeError               <span class='hljs-comment'># Raised when argument of wrong type is passed to a function.</span>\\n\" +\n  \"      └── ValueError              <span class='hljs-comment'># Raised when it has the right type but inappropriate value.</span>\\n\";\n\nconst DIAGRAM_8_A =\n  '+-----------+------------+------------+------------+\\n' +\n  '|           |    List    |    Set     |    Dict    |\\n' +\n  '+-----------+------------+------------+------------+\\n';\n\nconst DIAGRAM_8_B =\n  '┏━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┓\\n' +\n  '┃           │    List    │    Set     │    Dict    ┃\\n' +\n  '┠───────────┼────────────┼────────────┼────────────┨\\n' +\n  '┃ getitem() │ IndexError │            │  KeyError  ┃\\n' +\n  '┃ pop()     │ IndexError │  KeyError  │  KeyError  ┃\\n' +\n  '┃ remove()  │ ValueError │  KeyError  │            ┃\\n' +\n  '┃ index()   │ ValueError │            │            ┃\\n' +\n  '┗━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┛\\n';\n\nconst DIAGRAM_9_A =\n  '+------------------+--------------+--------------+--------------+\\n' +\n  '|                  |     excel    |   excel-tab  |     unix     |\\n' +\n  '+------------------+--------------+--------------+--------------+\\n';\n\nconst DIAGRAM_9_B =\n  \"┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                  │     excel    │   excel-tab  │     unix     ┃\\n\" +\n  \"┠──────────────────┼──────────────┼──────────────┼──────────────┨\\n\" +\n  \"┃ delimiter        │       ','    │      '\\\\t'    │       ','    ┃\\n\" +\n  \"┃ lineterminator   │    '\\\\r\\\\n'    │    '\\\\r\\\\n'    │      '\\\\n'    ┃\\n\" +\n  \"┃ quotechar        │       '\\\"'    │       '\\\"'    │       '\\\"'    ┃\\n\" +\n  \"┃ escapechar       │      None    │      None    │      None    ┃\\n\" +\n  \"┃ doublequote      │      True    │      True    │      True    ┃\\n\" +\n  \"┃ quoting          │         0    │         0    │         1    ┃\\n\" +\n  \"┃ skipinitialspace │     False    │     False    │     False    ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\\n\";\n\nconst DIAGRAM_95_A =\n  '+-----------------+--------------+----------------------------------+\\n' +\n  '| Dialect         | pip3 install |           Dependencies           |\\n' +\n  '+-----------------+--------------+----------------------------------+\\n';\n\nconst DIAGRAM_95_B =\n  '┏━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n' +\n  '┃ Dialect         │ pip3 install │           Dependencies           ┃\\n' +\n  '┠─────────────────┼──────────────┼──────────────────────────────────┨\\n' +\n  '┃ mysql           │ mysqlclient  │ www.pypi.org/project/mysqlclient ┃\\n' +\n  '┃ postgresql      │ psycopg2     │ www.pypi.org/project/psycopg2    ┃\\n' +\n  '┃ mssql           │ pyodbc       │ www.pypi.org/project/pyodbc      ┃\\n' +\n  '┃ oracle+oracledb │ oracledb     │ www.pypi.org/project/oracledb    ┃\\n' +\n  '┗━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n';\n\nconst DIAGRAM_10_A =\n  '+-------------+-------------+\\n' +\n  '|   Classes   | Metaclasses |\\n' +\n  '+-------------+-------------|\\n' +\n  '|   MyClass <-- MyMetaClass |\\n';\n\nconst DIAGRAM_10_B =\n  '┏━━━━━━━━━━━━━┯━━━━━━━━━━━━━┓\\n' +\n  '┃   Classes   │ Metaclasses ┃\\n' +\n  '┠─────────────┼─────────────┨\\n' +\n  '┃   MyClass ←──╴MyMetaClass ┃\\n' +\n  '┃             │     ↑       ┃\\n' +\n  '┃    object ←─────╴type ←╮  ┃\\n' +\n  '┃             │     │ ╰──╯  ┃\\n' +\n  '┃     str ←─────────╯       ┃\\n' +\n  '┗━━━━━━━━━━━━━┷━━━━━━━━━━━━━┛\\n';\n\nconst DIAGRAM_11_A =\n  '+-------------+-------------+\\n' +\n  '|   Classes   | Metaclasses |\\n' +\n  '+-------------+-------------|\\n' +\n  '|   MyClass   | MyMetaClass |\\n';\n\nconst DIAGRAM_11_B =\n  '┏━━━━━━━━━━━━━┯━━━━━━━━━━━━━┓\\n' +\n  '┃   Classes   │ Metaclasses ┃\\n' +\n  '┠─────────────┼─────────────┨\\n' +\n  '┃   MyClass   │ MyMetaClass ┃\\n' +\n  '┃      ↑      │     ↑       ┃\\n' +\n  '┃    object╶─────→ type     ┃\\n' +\n  '┃      ↓      │             ┃\\n' +\n  '┃     str     │             ┃\\n' +\n  '┗━━━━━━━━━━━━━┷━━━━━━━━━━━━━┛\\n';\n\nconst DIAGRAM_115_A =\n  '+--------------+------------+-------------------------------+-------+------+\\n' +\n  '| pip3 install |   Target   |          How to run           | Lines | Live |\\n' +\n  '+--------------+------------+-------------------------------+-------+------+\\n';\n\nconst DIAGRAM_115_B =\n  '┏━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━┯━━━━━━┓\\n' +\n  '┃ pip3 install │   Target   │          How to run           │ Lines │ Live ┃\\n' +\n  '┠──────────────┼────────────┼───────────────────────────────┼───────┼──────┨\\n' +\n  '┃ pyinstrument │    CPU     │ pyinstrument test.py          │   ×   │  ×   ┃\\n' +\n  '┃ py-spy       │    CPU     │ py-spy top -- python3 test.py │   ×   │  ✓   ┃\\n' +\n  '┃ scalene      │ CPU+Memory │ scalene test.py               │   ✓   │  ×   ┃\\n' +\n  '┃ memray       │   Memory   │ memray run --live test.py     │   ✓   │  ✓   ┃\\n' +\n  '┗━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━┷━━━━━━┛\\n';\n\nconst DIAGRAM_12_A =\n  '+-----------+-----------+------+-----------+\\n' +\n  '| sampwidth |    min    | zero |    max    |\\n' +\n  '+-----------+-----------+------+-----------+\\n';\n\nconst DIAGRAM_12_B =\n  '┏━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━━┓\\n' +\n  '┃ sampwidth │    min    │ zero │    max    ┃\\n' +\n  '┠───────────┼───────────┼──────┼───────────┨\\n' +\n  '┃     1     │         0 │  128 │       255 ┃\\n' +\n  '┃     2     │    -32768 │    0 │     32767 ┃\\n' +\n  '┃     3     │  -8388608 │    0 │   8388607 ┃\\n' +\n  '┗━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━━┛\\n';\n\nconst DIAGRAM_13_A =\n  '| s.apply(…)   |      3      |    sum  3   |     s  3      |';\n\nconst DIAGRAM_13_B =\n  \"┏━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃              │    'sum'    │   ['sum']   │ {'s': 'sum'}  ┃\\n\" +\n  \"┠──────────────┼─────────────┼─────────────┼───────────────┨\\n\" +\n  \"┃ s.apply(…)   │      3      │    sum  3   │     s  3      ┃\\n\" +\n  \"┃ s.agg(…)     │             │             │               ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\\n\" +\n  \"\\n\" +\n  \"┏━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃              │    'rank'   │   ['rank']  │ {'r': 'rank'} ┃\\n\" +\n  \"┠──────────────┼─────────────┼─────────────┼───────────────┨\\n\" +\n  \"┃ s.apply(…)   │             │      rank   │               ┃\\n\" +\n  \"┃ s.agg(…)     │    x  1.0   │   x   1.0   │   r  x  1.0   ┃\\n\" +\n  \"┃              │    y  2.0   │   y   2.0   │      y  2.0   ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\\n\";\n\nconst DIAGRAM_13_BB =\n  \"┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                │    'mean'   │   ['mean']  │ {'m': 'mean'} ┃\\n\" +\n  \"┠────────────────┼─────────────┼─────────────┼───────────────┨\\n\" +\n  \"┃ s.apply/agg(…) │     1.5     │  mean  1.5  │     m  1.5    ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\\n\" +\n  \"\\n\" +\n  \"┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                │    'rank'   │   ['rank']  │ {'r': 'rank'} ┃\\n\" +\n  \"┠────────────────┼─────────────┼─────────────┼───────────────┨\\n\" +\n  \"┃ s.apply/agg(…) │             │      rank   │               ┃\\n\" +\n  \"┃                │    x  1.0   │   x   1.0   │   r  x  1.0   ┃\\n\" +\n  \"┃                │    y  2.0   │   y   2.0   │      y  2.0   ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\\n\";\n\nconst DIAGRAM_13_XXX =\n  \"┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                │   'sum'   │ ['sum', 'max'] │   'rank'  │ ['rank', 'diff'] ┃\\n\" +\n  \"┠────────────────┼───────────┼────────────────┼───────────┼──────────────────┨\\n\" +\n  \"┃ s.apply/agg(…) │     3     │    sum    3    │  x  1.0   │     rank  diff   ┃\\n\" +\n  \"┃                │           │    max    2    │  y  2.0   │  x   1.0   NaN   ┃\\n\" +\n  \"┃                │           │    Name: a     │  Name: a  │  y   2.0   1.0   ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛\\n\";\n\nconst DIAGRAM_13_XX =\n  \"┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                │   'sum'   │   'rank'  │ ['sum', 'max'] ┃\\n\" +\n  \"┠────────────────┼───────────┼───────────┼────────────────┨\\n\" +\n  \"┃ s.apply/agg(…) │     3     │  x  1.0   │    sum    3    ┃\\n\" +\n  \"┃                │           │  y  2.0   │    max    2    ┃\\n\" +\n  \"┃                │           │  Name: a  │    Name: a     ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛\\n\";\n\nconst DIAGRAM_13_X =\n  \"┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                │   'sum'   │   'rank'  │ ['sum', 'max'] │ ['rank', 'diff'] ┃\\n\" +\n  \"┠────────────────┼───────────┼───────────┼────────────────┼──────────────────┨\\n\" +\n  \"┃ s.apply/agg(…) │     3     │  x  1.0   │    sum    3    │     rank  diff   ┃\\n\" +\n  \"┃                │           │  y  2.0   │    max    2    │  x   1.0   NaN   ┃\\n\" +\n  \"┃                │           │  Name: a  │    Name: a     │  y   2.0   1.0   ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛\\n\";\n\nconst DIAGRAM_13_Y =\n  \"┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━┓\\n\" +\n  \"┃                │   'sum'   │   'rank'  │  ['sum']  │ ['rank']  ┃\\n\" +\n  \"┠────────────────┼───────────┼───────────┼───────────┼───────────┨\\n\" +\n  \"┃ s.apply/agg(…) │     3     │  x  1.0   │  sum 3    │     rank  ┃\\n\" +\n  \"┃                │           │  y  2.0   │  Name: a  │  x   1.0  ┃\\n\" +\n  \"┃                │           │  Name: a  │           │  y   2.0  ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━┛\\n\";\n\nconst DIAGRAM_13_BBB =\n  \"┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                │    'sum'    │   ['sum']   │ {'s': 'sum'}  ┃\\n\" +\n  \"┠────────────────┼─────────────┼─────────────┼───────────────┨\\n\" +\n  \"┃ s.apply/agg(…) │      3      │    sum  3   │     s  3      ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\\n\" +\n  \"\\n\" +\n  \"┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                │    'rank'   │   ['rank']  │ {'r': 'rank'} ┃\\n\" +\n  \"┠────────────────┼─────────────┼─────────────┼───────────────┨\\n\" +\n  \"┃ s.apply/agg(…) │             │      rank   │               ┃\\n\" +\n  \"┃                │    x  1.0   │   x   1.0   │   r  x  1.0   ┃\\n\" +\n  \"┃                │    y  2.0   │   y   2.0   │      y  2.0   ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\\n\";\n\nconst DIAGRAM_14_A =\n  \"|              |    'rank'   |   ['rank']  | {'r': 'rank'} |\";\n\nconst DIAGRAM_15_A =\n  '+-----------------------+---------------+------------+------------+---------------------------+';\n\nconst DIAGRAM_15_B =\n  \"┏━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                       │    'outer'    │   'inner'  │   'left'   │       Description         ┃\\n\" +\n  \"┠───────────────────────┼───────────────┼────────────┼────────────┼───────────────────────────┨\\n\" +\n  \"┃ df.merge(df_2,        │    x   y   z  │ x   y   z  │ x   y   z  │ Merges on column if 'on'  ┃\\n\" +\n  \"┃          on='y',      │ 0  1   2   .  │ 3   4   5  │ 1   2   .  │ or 'left_on/right_on' are ┃\\n\" +\n  \"┃          how=…)       │ 1  3   4   5  │            │ 3   4   5  │ set, else on shared cols. ┃\\n\" +\n  \"┃                       │ 2  .   6   7  │            │            │ Uses 'inner' by default.  ┃\\n\" +\n  \"┠───────────────────────┼───────────────┼────────────┼────────────┼───────────────────────────┨\\n\" +\n  \"┃ df.join(df_2,         │    x yl yr  z │            │ x yl yr  z │ Merges on row keys.       ┃\\n\" +\n  \"┃         lsuffix='l',  │ a  1  2  .  . │ x yl yr  z │ 1  2  .  . │ Uses 'left' by default.   ┃\\n\" +\n  \"┃         rsuffix='r',  │ b  3  4  4  5 │ 3  4  4  5 │ 3  4  4  5 │ If Series is passed, it   ┃\\n\" +\n  \"┃         how=…)        │ c  .  .  6  7 │            │            │ is treated as a column.   ┃\\n\" +\n  \"┠───────────────────────┼───────────────┼────────────┼────────────┼───────────────────────────┨\\n\" +\n  \"┃ pd.concat([df, df_2], │    x   y   z  │     y      │            │ Adds rows at the bottom.  ┃\\n\" +\n  \"┃           axis=0,     │ a  1   2   .  │     2      │            │ Uses 'outer' by default.  ┃\\n\" +\n  \"┃           join=…)     │ b  3   4   .  │     4      │            │ A Series is treated as a  ┃\\n\" +\n  \"┃                       │ b  .   4   5  │     4      │            │ column. To add a row use  ┃\\n\" +\n  \"┃                       │ c  .   6   7  │     6      │            │ pd.concat([df, DF([s])]). ┃\\n\" +\n  \"┠───────────────────────┼───────────────┼────────────┼────────────┼───────────────────────────┨\\n\" +\n  \"┃ pd.concat([df, df_2], │    x  y  y  z │            │            │ Adds columns at the       ┃\\n\" +\n  \"┃           axis=1,     │ a  1  2  .  . │ x  y  y  z │            │ right end. Uses 'outer'   ┃\\n\" +\n  \"┃           join=…)     │ b  3  4  4  5 │ 3  4  4  5 │            │ by default. A Series is   ┃\\n\" +\n  \"┃                       │ c  .  .  6  7 │            │            │ treated as a column.      ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\\n\";\n\nconst DIAGRAM_16_A =\n  '| df.apply(…)     |      x  4     |        x  y   |     x  4      |';\n\nconst DIAGRAM_16_B =\n  \"┏━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                 │     'sum'     │    ['sum']    │ {'x': 'sum'}  ┃\\n\" +\n  \"┠─────────────────┼───────────────┼───────────────┼───────────────┨\\n\" +\n  \"┃ df.apply(…)     │      x  4     │        x  y   │     x  4      ┃\\n\" +\n  \"┃ df.agg(…)       │      y  6     │   sum  4  6   │               ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\\n\" +\n  \"\\n\" +\n  \"┏━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                 │     'rank'    │    ['rank']   │ {'x': 'rank'} ┃\\n\" +\n  \"┠─────────────────┼───────────────┼───────────────┼───────────────┨\\n\" +\n  \"┃ df.apply(…)     │               │       x    y  │               ┃\\n\" +\n  \"┃ df.agg(…)       │       x    y  │    rank rank  │         x     ┃\\n\" +\n  \"┃ df.transform(…) │  a  1.0  1.0  │  a  1.0  1.0  │    a  1.0     ┃\\n\" +\n  \"┃                 │  b  2.0  2.0  │  b  2.0  2.0  │    b  2.0     ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\\n\";\n\nconst DIAGRAM_17_A =\n  \"|                 |     'rank'    |    ['rank']   | {'x': 'rank'} |\";\n\nconst DIAGRAM_18_A =\n  '| gb.agg(…)       |      x   y  |             |      x    y |               |';\n\nconst DIAGRAM_18_B =\n  \"┏━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\\n\" +\n  \"┃                 │    'sum'    │    'rank'   │   ['rank']  │ {'x': 'rank'} ┃\\n\" +\n  \"┠─────────────────┼─────────────┼─────────────┼─────────────┼───────────────┨\\n\" +\n  \"┃ gb.agg(…)       │      x   y  │             │      x    y │               ┃\\n\" +\n  \"┃                 │  z          │      x  y   │   rank rank │        x      ┃\\n\" +\n  \"┃                 │  3   1   2  │   a  1  1   │ a    1    1 │     a  1      ┃\\n\" +\n  \"┃                 │  6  11  13  │   b  1  1   │ b    1    1 │     b  1      ┃\\n\" +\n  \"┃                 │             │   c  2  2   │ c    2    2 │     c  2      ┃\\n\" +\n  \"┠─────────────────┼─────────────┼─────────────┼─────────────┼───────────────┨\\n\" +\n  \"┃ gb.transform(…) │      x   y  │      x  y   │             │               ┃\\n\" +\n  \"┃                 │  a   1   2  │   a  1  1   │             │               ┃\\n\" +\n  \"┃                 │  b  11  13  │   b  1  1   │             │               ┃\\n\" +\n  \"┃                 │  c  11  13  │   c  2  2   │             │               ┃\\n\" +\n  \"┗━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\\n\";\n\nconst MENU = '<a href=\"https://raw.githubusercontent.com/gto76/python-cheatsheet/main/README.md\">Download text file</a>, <a href=\"https://github.com/gto76/python-cheatsheet\">Fork me on GitHub</a>, <a href=\"https://github.com/gto76/python-cheatsheet/wiki/Frequently-Asked-Questions\">Check out FAQ</a> or <a href=\"index.html?theme=dark3\">Switch to dark theme</a>.\\n';\n\nconst DARK_THEME_SCRIPT =\n  '<script>\\n' +\n  '  // Changes the banner image and link-to-theme if \"theme=dark\" is in query string\\n' +\n  '  // or if browser prefers dark mode and theme is not explicitly set.\\n' +\n  '\\n' +\n  'const theme_not_set_in_query = window.location.search.search(/[?&]theme=light/) == -1\\n' +\n  'const browser_prefers_dark = window.matchMedia(\\'(prefers-color-scheme: dark)\\').matches;\\n' +\n  '\\n' +\n  '  if ((window.location.search.search(/[?&]theme=dark/) !== -1) || \\n' +\n  '      (theme_not_set_in_query && browser_prefers_dark)) {\\n' +\n  '    activateDarkMode();\\n' +\n  '  }\\n' +\n  '\\n' +\n  '  function activateDarkMode() {\\n' +\n  '    var link_to_theme = document.createElement(\"a\")\\n' +\n  '    link_to_theme.href = \"index.html?theme=light\"\\n' +\n  '    link_to_theme.text = \"Switch to light theme\"\\n' +\n  '    document.getElementsByClassName(\"banner\")[0].firstChild.children[3].replaceWith(link_to_theme)\\n' +\n  '\\n' +\n  '    var img_dark = document.createElement(\"img\");\\n' +\n  '    img_dark.src = \"web/image_orig_blue6.png\";\\n' +\n  '    img_dark.alt = \"Monthy Python\";\\n' +\n  '    if ((window.location.search.search(/[?&]theme=dark2/) !== -1) ||\\n' +\n  '        (window.location.search.search(/[?&]theme=dark3/) !== -1) ||\\n' +\n  '        (theme_not_set_in_query && browser_prefers_dark)) {\\n' +\n  '      img_dark.style = \"width: 910px;\";\\n' +\n  '    } else {\\n' +\n  '      img_dark.style = \"width: 960px;\";\\n' +\n  '    }\\n' +\n  '    document.getElementsByClassName(\"banner\")[1].firstChild.replaceWith(img_dark);\\n' +\n  '  }\\n' +\n  '</script>';\n\n\nfunction main() {\n  const html = getMd();\n  initDom(html);\n  modifyPage();\n  var template = readFile('web/template.html');\n  template = updateDate(template);\n  const tokens = template.split('<div id=main_container></div>');\n  const text = `${tokens[0]} ${document.body.innerHTML} ${tokens[1]}`;\n  writeToFile('index.html', text);\n}\n\nfunction getMd() {\n  var readme = readFile('README.md');\n  var readme = removeHyphensFromLinks(readme);\n  const converter = new showdown.Converter();\n  return converter.makeHtml(readme);\n}\n\nfunction removeHyphensFromLinks(md) {\n  return md.replace(/\\(#([^)]+)\\)/g, (_, anchor) => {\n    const match = anchor.match(/^(.*?)(-\\d+)?$/);\n    const main = match[1].replace(/-/g, \"\");\n    const suffix = match[2] ?? \"\";\n    return `(#${main}${suffix})`;\n  });\n}\n\nfunction initDom(html) {\n  const { JSDOM } = jsdom;\n  const dom = new JSDOM(html);\n  const $ = (require('jquery'))(dom.window);\n  global.$ = $;\n  global.document = dom.window.document;\n}\n\nfunction modifyPage() {\n  changeMenu();\n  addDarkThemeScript();\n  removeOrigToc();\n  addToc();\n  insertLinks();\n  unindentBanner();\n  updateDiagrams();\n  highlightCode();\n  fixPandasDiagram();\n  removePlotImages();\n  fixABCSequenceDiv();\n  fixStructFormatDiv();\n}\n\nfunction changeMenu() {\n  $('sup').first().html(MENU)\n}\n\nfunction addDarkThemeScript() {\n  $('#main').before(DARK_THEME_SCRIPT);\n}\n\nfunction removeOrigToc() {\n  const headerContents = $('#contents');\n  const contentsList = headerContents.next();\n  headerContents.remove();\n  contentsList.remove();\n}\n\nfunction addToc() {\n  const nodes = $.parseHTML(TOC);\n  $('#main').before(nodes);\n}\n\nfunction insertLinks() {\n  $('h2').each(function() {\n    const aId = $(this).attr('id');\n    const text = $(this).text();\n    const line = `<a href=\"#${aId}\" name=\"${aId}\">#</a>${text}`;\n    $(this).html(line);\n  });\n}\n\nfunction unindentBanner() {\n  const montyImg = $('img').first();\n  montyImg.parent().addClass('banner');\n  montyImg.parent().css({\"margin-bottom\": \"20px\", \"padding-bottom\": \"7px\"})\n  const downloadPraragrapth = $('p').first();\n  downloadPraragrapth.addClass('banner');\n}\n\nfunction updateDiagrams() {\n  $(`code:contains(${DIAGRAM_1_A})`).html(DIAGRAM_1_B);\n  $(`code:contains(${DIAGRAM_2_A})`).html(DIAGRAM_2_B);\n  $(`code:contains(${DIAGRAM_4_A})`).html(DIAGRAM_4_B);\n  $(`code:contains(${DIAGRAM_5_A})`).parent().remove();\n  $(`code:contains(${DIAGRAM_55_A})`).html(DIAGRAM_55_B);\n  $(`code:contains(${DIAGRAM_6_A})`).html(DIAGRAM_6_B);\n  $(`code:contains(${DIAGRAM_7_A})`).html(DIAGRAM_7_B);\n  $(`code:contains(${DIAGRAM_8_A})`).html(DIAGRAM_8_B);\n  $(`code:contains(${DIAGRAM_9_A})`).html(DIAGRAM_9_B);\n  $(`code:contains(${DIAGRAM_95_A})`).html(DIAGRAM_95_B);\n  $(`code:contains(${DIAGRAM_115_A})`).html(DIAGRAM_115_B);\n  $(`code:contains(${DIAGRAM_12_A})`).html(DIAGRAM_12_B).removeClass(\"text\").removeClass(\"language-text\").addClass(\"python\");\n  $(`code:contains(${DIAGRAM_13_A})`).html(DIAGRAM_13_B).removeClass(\"text\").removeClass(\"language-text\").addClass(\"python\");\n  $(`code:contains(${DIAGRAM_14_A})`).parent().remove();\n  $(`code:contains(${DIAGRAM_15_A})`).html(DIAGRAM_15_B).removeClass(\"text\").removeClass(\"language-text\").addClass(\"python\");\n  $(`code:contains(${DIAGRAM_16_A})`).html(DIAGRAM_16_B).removeClass(\"text\").removeClass(\"language-text\").addClass(\"python\");\n  $(`code:contains(${DIAGRAM_17_A})`).parent().remove();\n}\n\nfunction highlightCode() {\n  changeCodeLanguages();\n  $('code').each(function(index) {\n      hljs.highlightBlock(this);\n  });\n  fixClasses();\n  fixHighlights();\n  preventPageBreaks();\n  fixPageBreaksFile();\n  fixPageBreaksStruct();\n  insertPageBreaks();\n}\n\nfunction changeCodeLanguages() {\n  setApaches(['<D>', '<T>', '<DT>', '<TD>', '<a>', '<n>']);\n  $('code').not('.python').not('.text').not('.bash').not('.apache').addClass('python');\n  $('code:contains(<el>       = <2d>[row_index, col_index])').removeClass().addClass('bash');\n  $('code:contains(<1d_array> = <2d>[row_indices, col_indices])').removeClass().addClass('bash');\n  $('code:contains(<2d_bools> = <2d> > <el/1d/2d>)').removeClass().addClass('bash');\n  $('code.perl').removeClass().addClass('python');\n}\n\nfunction setApaches(elements) {\n  for (el of elements) {\n    $(`code:contains(${el})`).addClass('apache');\n  }\n}\n\nfunction fixClasses() {\n  // Changes class=\"hljs-keyword\" to class=\"hljs-title\" of 'class' keyword.\n  $('.hljs-class').filter(':contains(class \\')').find(':first-child').removeClass('hljs-keyword').addClass('hljs-title')\n}\n\nfunction fixHighlights() {\n  $(`code:contains(<int> = 0x<hex>)`).html(BIN_HEX);\n  $(`code:contains( + fib(n)`).html(CACHE);\n  $(`code:contains(>>> def add)`).html(SPLAT);\n  $(`code:contains(@debug(print_result=True))`).html(PARAMETRIZED_DECORATOR);\n  $(`code:contains(print/str/repr([obj]))`).html(REPR_USE_CASES);\n  $(`code:contains(shutil.copy)`).html(SHUTIL_COPY);\n  $(`code:contains(os.rename)`).html(OS_RENAME);\n  $(`code:contains(\\'<n>s\\')`).html(STRUCT_FORMAT);\n  $(`code:contains(match <object/expression>:)`).html(MATCH);\n  $(`code:contains(>>> match Path)`).html(MATCH_EXAMPLE);\n  $(`code:contains(>>> log.basicConfig()`).html(LOGGING_EXAMPLE);\n  $(`code:contains(import asyncio, collections, curses, curses.textpad, enum, random)`).html(COROUTINES);\n  $(`code:contains(pip3 install tqdm)`).html(PROGRESS_BAR);\n  $(`code:contains(import curses, os)`).html(CURSES);\n  $(`code:contains(a_float = max()`).html(AUDIO_1);\n  $(`code:contains(get_sin = )`).html(AUDIO_2);\n  $(`code:contains(collections, dataclasses, enum, io, itertools)`).html(MARIO);\n  $(`code:contains(>>> gb = df.groupby)`).html(GROUPBY);\n  $(`code:contains(cdef <type> <var_name> [= <obj/var>])`).html(CYTHON_1);\n  $(`code:contains(cdef <type> <func_name>(<type> [*]<arg_name>): ...)`).html(CYTHON_2);\n  $(`code:contains(cdef class <class_name>:)`).html(CYTHON_3);\n  $(`ul:contains(Ctrl+F / ⌘F is usually sufficient.)`).html(INDEX);\n}\n\nfunction preventPageBreaks() {\n  $(':header').each(function(index) {\n    var el = $(this)\n    var untilPre = el.nextUntil('pre')\n    var untilH2 = el.nextUntil('h2')\n    if ((untilPre.length < untilH2.length) || el.prop('tagName') === 'H1') {\n      untilPre.add(el).next().add(el).wrapAll(\"<div></div>\");\n    } else {\n      untilH2.add(el).wrapAll(\"<div></div>\");\n    }\n  });\n}\n\nfunction fixPageBreaksFile() {\n  const modesDiv = $('#file').parent().parent().parent()\n  move(modesDiv, 'file')\n  move(modesDiv, 'exceptions-1')\n}\n\nfunction fixPageBreaksStruct() {\n  const formatDiv = $('#floatingpointtypesstructalwaysusesstandardsizes').parent().parent().parent().parent()\n  move(formatDiv, 'floatingpointtypesstructalwaysusesstandardsizes')\n  move(formatDiv, 'integersusecapitalletterforunsignedtypeminimumstandardsizesareinbrackets')\n  move(formatDiv, 'forstandardtypesizesandmanualalignmentpaddingstartformatstringwith')\n}\n\nfunction move(anchor_el, el_id) {\n  const el = $('#'+el_id).parent()\n  anchor_el.after(el)\n}\n\nfunction insertPageBreaks() {\n  insertPageBreakBefore('#decorator')\n  // insertPageBreakBefore('#print')\n}\n\nfunction insertPageBreakBefore(an_id) {\n  $('<div class=\"pagebreak\"></div>').insertBefore($(an_id).parent())\n}\n\nfunction fixPandasDiagram() {\n  const diagram_15 = '┏━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━┓';\n  $(`code:contains(${diagram_15})`).find(\".hljs-keyword:contains(and)\").after(\"and\");\n  $(`code:contains(${diagram_15})`).find(\".hljs-keyword:contains(as)\").after(\"as\");\n  $(`code:contains(${diagram_15})`).find(\".hljs-keyword:contains(is)\").after(\"is\");\n  $(`code:contains(${diagram_15})`).find(\".hljs-keyword:contains(if)\").after(\"if\");\n  $(`code:contains(${diagram_15})`).find(\".hljs-keyword:contains(or)\").after(\"or\");\n  $(`code:contains(${diagram_15})`).find(\".hljs-keyword:contains(else)\").after(\"else\");\n  $(`code:contains(${diagram_15})`).find(\".hljs-keyword\").remove();\n  $(`code:contains(${diagram_15})`).find(\".hljs-string:contains(\\'left_on/right_on\\')\").after(\"\\'left_on/right_on\\'\");\n  $(`code:contains(${diagram_15})`).find(\".hljs-string:contains(\\'left_on/right_on\\')\").remove();\n  $(`code:contains(${diagram_15})`).find(\".hljs-string:contains('on')\").after(\"'on'\");\n  $(`code:contains(${diagram_15})`).find(\".hljs-string:contains('on')\").remove();\n}\n\nfunction removePlotImages() {\n  $('img[alt=\"Covid Deaths\"]').remove();\n  $('img[alt=\"Covid Cases\"]').remove();\n}\n\nfunction fixABCSequenceDiv() {\n  $('#abcsequence').parent().insertBefore($('#tableofrequiredandautomaticallyavailablespecialmethods').parent())\n}\n\nfunction fixStructFormatDiv() {\n  const div = $('#format-2').parent()\n  $('#format-2').insertBefore(div)\n  $('#forstandardtypesizesandmanualalignmentpaddingstartformatstringwith').parent().insertBefore(div)\n}\n\nfunction updateDate(template) {\n  const date = new Date();\n  const date_str = date.toLocaleString('en-us', {month: 'long', day: 'numeric', year: 'numeric'});\n  template = template.replace('May 20, 2021', date_str);\n  template = template.replace('May 20, 2021', date_str);\n  return template;\n}\n\n\n// UTIL\n\nfunction readFile(filename) {\n  try {  \n    return fs.readFileSync(filename, 'utf8');\n  } catch(e) {\n    console.error('Error:', e.stack);\n  }\n}\n\nfunction writeToFile(filename, text) {\n  try {  \n    return fs.writeFileSync(filename, text, 'utf8');\n  } catch(e) {\n    console.error('Error:', e.stack);\n  }\n}\n\nmain();\n"
  },
  {
    "path": "pdf/Acrobat/Chapter_1.xml",
    "content": "﻿<?xml version = \"1.0\" encoding = \"UTF-8\" ?><HeaderFooterSettings version = \"8.0\"><Font name=\"Menlo\" type=\"TrueType\" size=\"8.0\"/><Color r=\"0.0\" g=\"0.0\" b=\"0.0\"/><Margin left=\"57.6002\" right=\"72.0\" top=\"36.0\" bottom=\"19.4403\"/><Appearance fixedprint=\"0\" shrink=\"0\"/><PageRange odd=\"1\" even=\"1\" start=\"1\" end=\"1\"/><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 1: Collections</Left><Center></Center><Right></Right></Footer></HeaderFooterSettings>"
  },
  {
    "path": "pdf/Acrobat/bottom_line.xml",
    "content": "﻿<?xml version = \"1.0\" encoding = \"UTF-8\" ?><HeaderFooterSettings version = \"8.0\"><Font name=\"Menlo\" type=\"TrueType\" size=\"8.0\"/><Color r=\"0.0\" g=\"0.0\" b=\"0.0\"/><Margin left=\"43.2004\" right=\"41.0405\" top=\"820.8\" bottom=\"19.4403\"/><Appearance fixedprint=\"0\" shrink=\"0\"/><PageRange odd=\"1\" even=\"1\" start=\"-1\" end=\"-1\"/><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></Left><Center></Center><Right></Right></Footer></HeaderFooterSettings>"
  },
  {
    "path": "pdf/Acrobat/chapter_2.xml",
    "content": "﻿<?xml version = \"1.0\" encoding = \"UTF-8\" ?><HeaderFooterSettings version = \"8.0\"><Font name=\"Menlo\" type=\"TrueType\" size=\"8.0\"/><Color r=\"0.0\" g=\"0.0\" b=\"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=\"3\" end=\"7\"/><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 2: Types</Left><Center></Center><Right></Right></Footer></HeaderFooterSettings>"
  },
  {
    "path": "pdf/Acrobat/chapter_3.xml",
    "content": "﻿<?xml version = \"1.0\" encoding = \"UTF-8\" ?><HeaderFooterSettings version = \"8.0\"><Font name=\"Menlo\" type=\"TrueType\" size=\"8.0\"/><Color r=\"0.0\" g=\"0.0\" b=\"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=\"9\" end=\"19\"/><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 3: Syntax</Left><Center></Center><Right></Right></Footer></HeaderFooterSettings>"
  },
  {
    "path": "pdf/Acrobat/chapter_4.xml",
    "content": "﻿<?xml version = \"1.0\" encoding = \"UTF-8\" ?><HeaderFooterSettings version = \"8.0\"><Font name=\"Menlo\" type=\"TrueType\" size=\"8.0\"/><Color r=\"0.0\" g=\"0.0\" b=\"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=\"21\" end=\"23\"/><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 4: System</Left><Center></Center><Right></Right></Footer></HeaderFooterSettings>"
  },
  {
    "path": "pdf/Acrobat/chapter_5.xml",
    "content": "﻿<?xml version = \"1.0\" encoding = \"UTF-8\" ?><HeaderFooterSettings version = \"8.0\"><Font name=\"Menlo\" type=\"TrueType\" size=\"8.0\"/><Color r=\"0.0\" g=\"0.0\" b=\"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=\"25\" end=\"27\"/><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 5: Data</Left><Center></Center><Right></Right></Footer></HeaderFooterSettings>"
  },
  {
    "path": "pdf/Acrobat/chapter_6.xml",
    "content": "﻿<?xml version = \"1.0\" encoding = \"UTF-8\" ?><HeaderFooterSettings version = \"8.0\"><Font name=\"Menlo\" type=\"TrueType\" size=\"8.0\"/><Color r=\"0.0\" g=\"0.0\" b=\"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=\"29\" end=\"31\"/><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 6: Advanced</Left><Center></Center><Right></Right></Footer></HeaderFooterSettings>"
  },
  {
    "path": "pdf/Acrobat/chapter_7.xml",
    "content": "﻿<?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.0002\" top=\"36.0001\" bottom=\"19.4457\"/><Appearance fixedprint=\"0\" shrink=\"0\"/><PageRange odd=\"0\" even=\"1\" start=\"33\" end=\"35\"/><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>"
  },
  {
    "path": "pdf/Acrobat/chapter_8.xml",
    "content": "﻿<?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.0002\" top=\"36.0001\" bottom=\"19.4457\"/><Appearance fixedprint=\"0\" shrink=\"0\"/><PageRange odd=\"0\" even=\"1\" start=\"37\" 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 8: Multimedia</Left><Center></Center><Right></Right></Footer></HeaderFooterSettings>"
  },
  {
    "path": "pdf/Acrobat/even_pages.xml",
    "content": "﻿<?xml version = \"1.0\" encoding = \"UTF-8\" ?><HeaderFooterSettings version = \"8.0\"><Font name=\"Menlo\" type=\"TrueType\" size=\"8.0\"/><Color r=\"0.0\" g=\"0.0\" b=\"0.0\"/><Margin left=\"43.2004\" right=\"72.0\" top=\"36.0\" bottom=\"19.4403\"/><Appearance fixedprint=\"0\" shrink=\"0\"/><PageRange odd=\"0\" even=\"1\" start=\"-1\" end=\"-1\"/><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><Page offset = \"0\"><PageIndex format=\"1\"/></Page></Left><Center></Center><Right></Right></Footer></HeaderFooterSettings>"
  },
  {
    "path": "pdf/Acrobat/odd_pages.xml",
    "content": "﻿<?xml version = \"1.0\" encoding = \"UTF-8\" ?><HeaderFooterSettings version = \"8.0\"><Font name=\"Menlo\" type=\"TrueType\" size=\"8.0\"/><Color r=\"0.0\" g=\"0.0\" b=\"0.0\"/><Margin left=\"72.0\" right=\"41.0405\" top=\"36.0\" bottom=\"19.4403\"/><Appearance fixedprint=\"0\" shrink=\"0\"/><PageRange odd=\"1\" even=\"0\" start=\"-1\" end=\"-1\"/><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></Left><Center></Center><Right><Page offset = \"0\"><PageIndex format=\"1\"/></Page></Right></Footer></HeaderFooterSettings>"
  },
  {
    "path": "pdf/README.md",
    "content": "How To Create PDF (on macOS)\n============================\n\n\nSetup\n-----\n* Install Adobe Acrobat Pro DC.\n* Copy headers and footers from `pdf/acrobat/` folder to `/Users/<username>/Library/Preferences/Adobe/Acrobat/DC/HeaderFooter/`.\n\n\nPrinting to PDF\n---------------\n### Normal PDF\n* Open `index.html` in text editor and first remove element `<p><br></p>` before the `<h1>Libraries</h1>`.\n* Then replace the index and footer with contents of `pdf/index_for_pdf.html` file and save.\n* Disable internet connection and open Chromium version 108.0.5328.0 (later versions will render the site incorrectly after index is added). Right click anywhere in the window and choose 'inspect'. Go to 'Network' tab and check 'Disable Cache'. Open the `index.html` file while keeping the inspect window open.\n* Right click on the border of the site and select inspect. Select `<body>` element under 'Elements' tab and change top margin and top padding from 16 to 0 in 'Styles' tab.\n* Change brightness of comments by right clicking on one of 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 77%.\n* Change the brightness of text to 13%.\n* Select 'Print...' with destination 'Save as PDF', paper size 'A4', 'Default' margins (top 10mm, right 9.5mm, bottom 8mm and left 10mm), 'Default' scale and no headers and footers and save (the document should be 51 pages long with last page empty).\n* Check if plots were rendered correctly.\n\n### PDF optimized for laser color printing\n* Run `./parse.js` again.\n* Change all links in text to normal text and add a page number in brackets like that: '(p. <page_num>)' by running './pdf/remove_links.py' (Links can be found with this regex: `<strong>.*a href.*</strong>`).\n* Open `index.html` in text editor and first remove element `<p><br></p>` before the `<h1>Libraries</h1>`.\n* Then replace the index and footer with contents of `pdf/index_for_pdf_print.html` file and save.\n* Disable internet connection and open Chromium version 108.0.5328.0 (later versions will render the site incorrectly after index is added). Right click anywhere in the window and choose 'inspect'. Go to 'Network' tab and check 'Disable Cache'. Open the `index.html` file while keeping the inspect window open.\n* Right click on the border of the site and select inspect. Select `<body>` element under 'Elements' tab and change top margin and top padding from 16 to 0 in 'Styles' tab.\n* 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.\n* Change lightness (L) percentage to:\n* 0% for the text.\n* 87% for the gray line on the left side of the code.\n* 89% for the gray hash characters by the titles\n* 37% for the red text and function names (they use their own red).\n* 60% for the blue text and the text in the contents (it uses its own blue), but leave color of decorators and the `>>>` intact.\n* 58% for the comments.\n* Individually change brightness of every comment line that starts with: `# $ pip3 install` and of comments in basic script template to 57%, by adding `color: hsla(0, 0%, 57%, 1);` to their element.style.\n* Select 'Print...' with destination 'Save as PDF', paper size 'A4', 'Default' margins (top 10mm, right 9.5mm, bottom 8mm and left 10mm), 'Default' scale and no headers and footers and save (the document should be 51 pages long with last page empty).\n* Check if plots were rendered correctly.\n\n\nAdding headers and footers to PDF (the same for both files)\n-----------------------------------------------------------\n* Open the PDF file in Adobe Acrobat Pro DC.\n* Select 'Organize Pages'.\n* Right click the second page and select 'Crop Pages...'.\n* Select units: 'Inches'.\n* In 'Change page size' section select 'A4' for 'Page Sizes' and set 'XOffset' to '0.1 in'. Then click on 'YOffset' input field, so the x offset gets registered. Select page range 'All' and click OK.\n* 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. Popup will say that font 'Menlo' contains invalid encoding. This is fine.\n* Start by adding the bottom_line preset and check afterward if bottom line on the first page is aligned properly with the text. If it is not close the file and start over.\n* Repeat the process for each preset. When popup asks you if you want to replace existing header or footer click 'Add New'.\n* Use this values for font and margins if presets get lost: 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.\n* Select 'Organize Pages' tab and remove the last page (it should be empty).\n* Select 'File/Properties...' and set title to 'Comprehensive Python Cheatsheet' and author to 'Jure Šorn'.\n* Save the progress by running 'Save as' in Format: 'Adobe PDF Files'.\n* Run 'Save as' again, this time in 'Adobe PDF Files, Optimized', so that Menlo font error gets fixed.\n\n\nCompressing\n-----------\n* Compress the two files together with HOW_TO_PRINT.txt instruction file that contains the instructions from the next section using: `zip 'Comprehensive Python Cheatsheet.zip' 'Comprehensive Python Cheatsheet.pdf' 'Comprehensive Python Cheatsheet (optimized for printing).pdf' 'HOW_TO_PRINT.txt'`.\n\n\nPrinting the PDF\n----------------\n* Open the PDF that was optimized for printing in Chrome and print on A4 on both sides with default margins, scale 98% and no headers and footers.\n"
  },
  {
    "path": "pdf/create_index.py",
    "content": "#!/usr/bin/env python3\n#\n# Usage: .py\n#\n\nfrom collections import namedtuple\nfrom dataclasses import make_dataclass\nfrom enum import Enum\nimport re\nimport sys\nfrom bs4 import BeautifulSoup\nfrom collections import defaultdict\n\n\ndef main():\n    html = read_file('index.html')\n    doc  = BeautifulSoup(''.join(html), 'html.parser')\n    hhh = defaultdict(lambda: defaultdict(list))\n    for i in range(2, 5):\n        for h in doc.find_all(f'h{i}'):\n            an_id = h.attrs['id']\n            text  = h.text.lstrip('#')\n            first_letter = text[0]\n            hhh[first_letter][text].append(an_id)\n    print_hhh(hhh)\n\n\ndef print_hhh(hhh):\n    letters = hhh.keys()\n    for letter in sorted(letters):\n        hh = hhh[letter]\n        print(f'### {letter}')\n        commands = hh.keys()\n        for command in sorted(commands):\n            links = hh[command]\n            lll = ', '.join(f'[1](#{l})' for l in links)\n            print(f'**{command} {lll}**  ')\n        print()\n\n\n###\n##  UTIL\n#\n\ndef read_file(filename):\n    with open(filename, encoding='utf-8') as file:\n        return file.readlines()\n\n\nif __name__ == '__main__':\n    main()"
  },
  {
    "path": "pdf/index_for_pdf.html",
    "content": "\n<div class=\"pagebreak\"></div>\n<h2 id=\"index\"><a href=\"#index\" name=\"index\">#</a>Index</h2>\n\n<div style=\"column-count: 3; width: 960px; page-break-inside: avoid\">\n<h3 id=\"a\">A</h3>\n<p><strong>abstract base classes, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#abcsequence\">19</a></strong><br>\n<strong>animation, <a href=\"#animation\">40</a>, <a href=\"#pygame\">42</a>-<a href=\"#basicmariobrothersexample\">43</a></strong><br>\n<strong>argparse module, <a href=\"#argumentparser\">22</a></strong><br>\n<strong>arguments, <a href=\"#function\">10</a>, <a href=\"#partial\">12</a>, <a href=\"#commandlinearguments\">22</a></strong><br>\n<strong>arrays, <a href=\"#array\">29</a>, <a href=\"#numpy\">37</a>-<a href=\"#indexing\">38</a></strong><br>\n<strong>asyncio module, <a href=\"#asyncio\">33</a></strong><br>\n<strong>audio, <a href=\"#audio\">40</a>-<a href=\"#synthesizer\">41</a>, <a href=\"#sound\">42</a></strong>  </p>\n<h3 id=\"b\">B</h3>\n<p><strong>beautifulsoup library, <a href=\"#scrapespythonsurlandlogofromitswikipediapage\">35</a></strong><br>\n<strong>binary representation, <a href=\"#ints\">7</a>, <a href=\"#hexadecimalnumbers\">8</a></strong><br>\n<strong>bitwise operators, <a href=\"#bitwiseoperators\">8</a>, <a href=\"#operator\">30</a></strong><br>\n<strong>bytes, <a href=\"#open\">22</a>-<a href=\"#modes\">23</a>, <a href=\"#pickle\">25</a>, <a href=\"#bytes\">28</a>-<a href=\"#memoryview\">29</a></strong>  </p>\n<h3 id=\"c\">C</h3>\n<p><strong>cache, <a href=\"#cache\">13</a></strong><br>\n<strong>callable, <a href=\"#callable\">17</a></strong><br>\n<strong>class, <a href=\"#type\">4</a>, <a href=\"#class\">14</a>-<a href=\"#inline-2\">20</a></strong><br>\n<strong>closure, <a href=\"#closure\">12</a>-<a href=\"#decorator\">13</a></strong><br>\n<strong>collection, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#collection\">18</a>, <a href=\"#tableofrequiredandautomaticallyavailablespecialmethods\">19</a></strong><br>\n<strong>collections module, <a href=\"#dictionary\">2</a>, <a href=\"#namedtuple\">3</a>, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#abcsequence\">19</a>, <a href=\"#deque\">29</a></strong><br>\n<strong>combinatorics, <a href=\"#combinatorics\">8</a></strong><br>\n<strong>command line arguments, <a href=\"#commandlinearguments\">22</a></strong><br>\n<strong>comprehensions, <a href=\"#list\">1</a>, <a href=\"#dictionary\">2</a>, <a href=\"#comprehensions\">11</a></strong><br>\n<strong>context manager, <a href=\"#contextmanager\">17</a>, <a href=\"#readtextfromfile\">23</a>, <a href=\"#or\">27</a>, <a href=\"#or-1\">32</a></strong><br>\n<strong>copy function, <a href=\"#copy\">15</a></strong><br>\n<strong>coroutine, <a href=\"#asyncio\">33</a></strong><br>\n<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>\n<strong>csv, <a href=\"#csv\">26</a>, <a href=\"#printsacsvspreadsheettotheconsole\">34</a>, <a href=\"#fileformats\">46</a>, <a href=\"#displaysalinechartoftotalcovid19deathspermilliongroupedbycontinent\">47</a></strong><br>\n<strong>curses module, <a href=\"#runsaterminalgamewhereyoucontrolanasteriskthatmustavoidnumbers\">33</a>, <a href=\"#consoleapp\">34</a></strong><br>\n<strong>cython, <a href=\"#typeannotations\">15</a>, <a href=\"#cython\">49</a></strong>  </p>\n<h3 id=\"d\">D</h3>\n<p><strong>dataclasses module, <a href=\"#namedtupleenumdataclass\">11</a>, <a href=\"#dataclass\">15</a></strong><br>\n<strong>datetime module, <a href=\"#datetime\">8</a>-<a href=\"#now\">9</a></strong><br>\n<strong>decorator, <a href=\"#decorator\">13</a>, <a href=\"#class\">14</a>, <a href=\"#dataclass\">15</a>, <a href=\"#sortable\">16</a></strong><br>\n<strong>deques, <a href=\"#deque\">29</a></strong><br>\n<strong>dictionaries, <a href=\"#dictionary\">2</a>, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#otheruses\">10</a>-<a href=\"#comprehensions\">11</a>, <a href=\"#tableofrequiredandautomaticallyavailablespecialmethods\">19</a>, <a href=\"#collectionsandtheirexceptions\">21</a></strong><br>\n<strong>duck types, <a href=\"#ducktypes\">16</a>-<a href=\"#abcsequence\">19</a></strong>  </p>\n<h3 id=\"e\">E</h3>\n<p><strong>enum module, <a href=\"#enum\">19</a>-<a href=\"#inline-2\">20</a></strong><br>\n<strong>enumerate function, <a href=\"#enumerate\">3</a></strong><br>\n<strong>excel, <a href=\"#fileformats\">46</a></strong><br>\n<strong>exceptions, <a href=\"#exceptions\">20</a>-<a href=\"#exceptionobject\">21</a>, <a href=\"#exceptions-1\">23</a>, <a href=\"#logging\">31</a></strong><br>\n<strong>exit function, <a href=\"#exit\">21</a></strong>  </p>\n<h3 id=\"f\">F</h3>\n<p><strong>files, <a href=\"#print\">22</a>-<a href=\"#memoryview\">29</a>, <a href=\"#runsabasicfileexplorerintheconsole\">34</a>, <a href=\"#fileformats\">46</a></strong><br>\n<strong>filter function, <a href=\"#mapfilterreduce\">11</a></strong><br>\n<strong>flask library, <a href=\"#webapp\">36</a></strong><br>\n<strong>floats, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#floats\">6</a>, <a href=\"#numbers\">7</a></strong><br>\n<strong>format, <a href=\"#format\">6</a>-<a href=\"#comparisonofpresentationtypes\">7</a></strong><br>\n<strong>functools module, <a href=\"#mapfilterreduce\">11</a>, <a href=\"#partial\">12</a>, <a href=\"#debuggerexample\">13</a>, <a href=\"#sortable\">16</a></strong>  </p>\n<h3 id=\"g\">G</h3>\n<p><strong>games, <a href=\"#runsaterminalgamewhereyoucontrolanasteriskthatmustavoidnumbers\">33</a>, <a href=\"#pygame\">42</a>-<a href=\"#basicmariobrothersexample\">43</a></strong><br>\n<strong>generators, <a href=\"#generator\">4</a>, <a href=\"#comprehensions\">11</a>, <a href=\"#iterator-1\">17</a></strong><br>\n<strong>global keyword, <a href=\"#function\">10</a>, <a href=\"#nonlocal\">12</a></strong><br>\n<strong>gui app, <a href=\"#guiapp\">35</a></strong>  </p>\n<h3 id=\"h\">H</h3>\n<p><strong>hashable, <a href=\"#dataclass\">15</a>, <a href=\"#hashable\">16</a></strong><br>\n<strong>hexadecimal representation, <a href=\"#ints\">7</a>, <a href=\"#hexadecimalnumbers\">8</a>, <a href=\"#encode-1\">28</a></strong>  </p>\n<h3 id=\"i\">I</h3>\n<p><strong>image, <a href=\"#scrapespythonsurlandlogofromitswikipediapage\">35</a>, <a href=\"#image\">39</a>-<a href=\"#animation\">40</a>, <a href=\"#surface\">42</a>-<a href=\"#basicmariobrothersexample\">43</a></strong><br>\n<strong>imports, <a href=\"#imports\">12</a></strong><br>\n<strong>inline, <a href=\"#inline\">11</a>, <a href=\"#dataclass\">15</a>, <a href=\"#inline-2\">20</a></strong><br>\n<strong>input function, <a href=\"#input\">22</a></strong><br>\n<strong>introspection,  <a href=\"#exceptionobject\">21</a>, <a href=\"#introspection\">31</a></strong><br>\n<strong>ints, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#ints\">7</a>-<a href=\"#random\">8</a>, <a href=\"#encode-1\">28</a></strong><br>\n<strong>is operator, <a href=\"#comparable\">16</a>, <a href=\"#operator\">30</a></strong><br>\n<strong>iterable, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#iterable\">18</a>, <a href=\"#tableofrequiredandautomaticallyavailablespecialmethods\">19</a></strong><br>\n<strong>iterator, <a href=\"#enumerate\">3</a>-<a href=\"#generator\">4</a>, <a href=\"#comprehensions\">11</a>, <a href=\"#iterator-1\">17</a></strong><br>\n<strong>itertools module, <a href=\"#iterator\">3</a>, <a href=\"#combinatorics\">8</a></strong>  </p>\n<h3 id=\"j\">J</h3>\n<p><strong>json, <a href=\"#json\">25</a>, <a href=\"#servingjson\">36</a>, <a href=\"#fileformats\">46</a></strong>  </p>\n<h3 id=\"l\">L</h3>\n<p><strong>lambda, <a href=\"#lambda\">11</a></strong><br>\n<strong>lists, <a href=\"#list\">1</a>-<a href=\"#list\">2</a>, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#otheruses\">10</a>-<a href=\"#comprehensions\">11</a>, <a href=\"#sequence\">18</a>-<a href=\"#abcsequence\">19</a>, <a href=\"#collectionsandtheirexceptions\">21</a></strong><br>\n<strong>locale module, <a href=\"#sortable\">16</a></strong><br>\n<strong>logging, <a href=\"#logging\">31</a></strong>  </p>\n<h3 id=\"m\">M</h3>\n<p><strong>main function, <a href=\"#main\">1</a>, <a href=\"#basicscripttemplate\">49</a></strong><br>\n<strong>match statement, <a href=\"#matchstatement\">30</a></strong><br>\n<strong>matplotlib library, <a href=\"#plot\">34</a>, <a href=\"#pandas\">44</a>, <a href=\"#dataframe\">45</a></strong><br>\n<strong>map function, <a href=\"#mapfilterreduce\">11</a>, <a href=\"#operator\">30</a></strong><br>\n<strong>math module, <a href=\"#numbers\">7</a></strong><br>\n<strong>memoryviews, <a href=\"#memoryview\">29</a></strong><br>\n<strong>module, <a href=\"#imports\">12</a></strong>  </p>\n<h3 id=\"n\">N</h3>\n<p><strong>namedtuples, <a href=\"#namedtuple\">3</a>, <a href=\"#example\">6</a></strong><br>\n<strong>nonlocal keyword, <a href=\"#nonlocal\">12</a></strong><br>\n<strong>numbers, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#numbers-1\">6</a>-<a href=\"#random\">8</a></strong><br>\n<strong>numpy library, <a href=\"#numpy\">37</a>-<a href=\"#indexing\">38</a>, <a href=\"#image\">39</a>, <a href=\"#series\">44</a></strong>  </p>\n<h3 id=\"o\">O</h3>\n<p><strong>open function, <a href=\"#contextmanager\">17</a>, <a href=\"#open\">22</a>-<a href=\"#modes\">23</a>, <a href=\"#readcollectionfromjsonfile\">25</a>, <a href=\"#readrowsfromcsvfile\">26</a>, <a href=\"#readbytesfromfile\">28</a></strong><br>\n<strong>operator module, <a href=\"#operator\">30</a></strong><br>\n<strong>os commands, <a href=\"#paths\">23</a>-<a href=\"#shellcommands\">25</a>, <a href=\"#runsabasicfileexplorerintheconsole\">34</a></strong>  </p>\n<h3 id=\"p\">P</h3>\n<p><strong>pandas library, <a href=\"#pandas\">44</a>-<a href=\"#displaysamultiaxislinechartoftotalcovid19casesandchangesinpricesofbitcoindowjonesandgold\">48</a></strong><br>\n<strong>partial function, <a href=\"#partial\">12</a>, <a href=\"#userdefinedfunctionscannotbevaluessotheymustbewrapped\">20</a></strong><br>\n<strong>paths, <a href=\"#paths\">23</a>-<a href=\"#oscommands\">24</a>, <a href=\"#runsabasicfileexplorerintheconsole\">34</a></strong><br>\n<strong>pickle module, <a href=\"#pickle\">25</a></strong><br>\n<strong>pillow library, <a href=\"#image\">39</a>-<a href=\"#animation\">40</a></strong><br>\n<strong>plotting, <a href=\"#plot\">34</a>, <a href=\"#pandas\">44</a>, <a href=\"#dataframe\">45</a>, <a href=\"#plotly\">47</a>-<a href=\"#displaysamultiaxislinechartoftotalcovid19casesandchangesinpricesofbitcoindowjonesandgold\">48</a></strong><br>\n<strong>print function, <a href=\"#class\">14</a>, <a href=\"#print\">22</a></strong><br>\n<strong>profiling, <a href=\"#profiling\">36</a>-<a href=\"#profilingbyline\">37</a></strong><br>\n<strong>progress bar, <a href=\"#progressbar\">34</a></strong><br>\n<strong>property decorator, <a href=\"#property\">15</a>, <a href=\"#hashable\">16</a></strong><br>\n<strong>pygame library, <a href=\"#pygame\">42</a>-<a href=\"#basicmariobrothersexample\">43</a></strong>  </p>\n<h3 id=\"q\">Q</h3>\n<p><strong>queues, <a href=\"#deque\">29</a>, <a href=\"#queue\">32</a>, <a href=\"#runsaterminalgamewhereyoucontrolanasteriskthatmustavoidnumbers\">33</a></strong>  </p>\n<h3 id=\"r\">R</h3>\n<p><strong>random module, <a href=\"#random\">8</a>, <a href=\"#runsaterminalgamewhereyoucontrolanasteriskthatmustavoidnumbers\">33</a>, <a href=\"#addsnoisetothewavfile\">41</a></strong><br>\n<strong>ranges, <a href=\"#range\">3</a>, <a href=\"#abstractbaseclasses\">4</a></strong><br>\n<strong>recursion, <a href=\"#cache\">13</a>, <a href=\"#builtinexceptions\">21</a></strong><br>\n<strong>reduce function, <a href=\"#mapfilterreduce\">11</a></strong><br>\n<strong>regular expressions, <a href=\"#regex\">5</a>-<a href=\"#specialsequences\">6</a></strong><br>\n<strong>requests library, <a href=\"#scrapespythonsurlandlogofromitswikipediapage\">35</a>, <a href=\"#startstheappinitsownthreadandqueriesitsrestapi\">36</a></strong>  </p>\n<h3 id=\"s\">S</h3>\n<p><strong>scope, <a href=\"#insidefunctiondefinition\">10</a>, <a href=\"#nonlocal\">12</a>, <a href=\"#complexexample\">20</a></strong><br>\n<strong>scraping, <a href=\"#scraping\">35</a>, <a href=\"#basicmariobrothersexample\">43</a>, <a href=\"#fileformats\">46</a>, <a href=\"#displaysalinechartoftotalcovid19deathspermilliongroupedbycontinent\">47</a>-<a href=\"#displaysamultiaxislinechartoftotalcovid19casesandchangesinpricesofbitcoindowjonesandgold\">48</a></strong><br>\n<strong>sequence, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#sequence\">18</a>-<a href=\"#abcsequence\">19</a></strong><br>\n<strong>sets, <a href=\"#set\">2</a>, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#otheruses\">10</a>-<a href=\"#comprehensions\">11</a>, <a href=\"#tableofrequiredandautomaticallyavailablespecialmethods\">19</a>, <a href=\"#collectionsandtheirexceptions\">21</a></strong><br>\n<strong>shell commands, <a href=\"#shellcommands\">25</a></strong><br>\n<strong>sleep function, <a href=\"#progressbar\">34</a></strong><br>\n<strong>sortable, <a href=\"#list\">1</a>, <a href=\"#sortable\">16</a></strong><br>\n<strong>splat operator, <a href=\"#splatoperator\">10</a>, <a href=\"#readrowsfromcsvfile\">26</a></strong><br>\n<strong>sql, <a href=\"#sqlite\">27</a>, <a href=\"#fileformats\">46</a></strong><br>\n<strong>statistics, <a href=\"#statistics\">7</a>, <a href=\"#numpy\">37</a>-<a href=\"#indexing\">38</a>, <a href=\"#pandas\">44</a>-<a href=\"#displaysamultiaxislinechartoftotalcovid19casesandchangesinpricesofbitcoindowjonesandgold\">48</a></strong><br>\n<strong>strings, <a href=\"#abstractbaseclasses\">4</a>-<a href=\"#comparisonofpresentationtypes\">7</a>, <a href=\"#class\">14</a></strong><br>\n<strong>struct module, <a href=\"#struct\">28</a>-<a href=\"#integertypesuseacapitalletterforunsignedtypeminimumandstandardsizesareinbrackets\">29</a></strong><br>\n<strong>subprocess module, <a href=\"#sends11tothebasiccalculatorandcapturesitsstdoutandstderrstreams\">25</a></strong><br>\n<strong>super function, <a href=\"#subclass\">14</a></strong><br>\n<strong>sys module, <a href=\"#cache\">13</a>, <a href=\"#exit\">21</a>-<a href=\"#commandlinearguments\">22</a></strong> </p>\n<h3 id=\"t\">T</h3>\n<p><strong>table, <a href=\"#csv\">26</a>, <a href=\"#example-1\">27</a>, <a href=\"#table\">34</a>, <a href=\"#numpy\">37</a>-<a href=\"#indexing\">38</a>, <a href=\"#dataframe\">45</a>-<a href=\"#dataframeaggregatetransformmap\">46</a></strong><br>\n<strong>template, <a href=\"#format\">6</a>, <a href=\"#servinghtml\">36</a></strong><br>\n<strong>threading module, <a href=\"#threading\">32</a>, <a href=\"#startstheappinitsownthreadandqueriesitsrestapi\">36</a></strong><br>\n<strong>time module, <a href=\"#progressbar\">34</a>, <a href=\"#profiling\">36</a></strong><br>\n<strong>tuples, <a href=\"#tuple\">3</a>, <a href=\"#abstractbaseclasses\">4</a>, <a href=\"#otheruses\">10</a>-<a href=\"#comprehensions\">11</a>, <a href=\"#sequence\">18</a>-<a href=\"#abcsequence\">19</a></strong><br>\n<strong>type, <a href=\"#type\">4</a>, <a href=\"#ducktypes\">16</a>, <a href=\"#matchstatement\">30</a></strong><br>\n<strong>type annotations, <a href=\"#typeannotations\">15</a>, <a href=\"#introspection\">31</a></strong>  </p>\n<h3 id=\"w\">W</h3>\n<p><strong>wave module, <a href=\"#audio\">40</a>-<a href=\"#writefloatsamplestowavfile\">41</a></strong><br>\n<strong>web app, <a href=\"#webapp\">36</a></strong>  </p>\n</div>"
  },
  {
    "path": "pdf/index_for_pdf_print.html",
    "content": "\n<div class=\"pagebreak\"></div>\n<h2 id=\"index\"><a href=\"#index\" name=\"index\">#</a>Index</h2>\n\n<div style=\"column-count: 3; width: 960px; page-break-inside: avoid\">\n<h3 id=\"a\">A</h3>\n<p><strong>abstract base classes, 4, 19</strong><br>\n<strong>animation, 40, 42-43</strong><br>\n<strong>argparse module, 22</strong><br>\n<strong>arguments, 10, 12, 22</strong><br>\n<strong>arrays, 29, 37-38</strong><br>\n<strong>asyncio module, 33</strong><br>\n<strong>audio, 40-41, 42</strong>  </p>\n<h3 id=\"b\">B</h3>\n<p><strong>beautifulsoup library, 35</strong><br>\n<strong>binary representation, 7, 8</strong><br>\n<strong>bitwise operators, 8, 30</strong><br>\n<strong>bytes, 22-23, 25, 28-29</strong>  </p>\n<h3 id=\"c\">C</h3>\n<p><strong>cache, 13</strong><br>\n<strong>callable, 17</strong><br>\n<strong>class, 4, 14-20</strong><br>\n<strong>closure, 12-13</strong><br>\n<strong>collection, 4, 18, 19</strong><br>\n<strong>collections module, 2, 3, 4, 19, 29</strong><br>\n<strong>combinatorics, 8</strong><br>\n<strong>command line arguments, 22</strong><br>\n<strong>comprehensions, 1, 2, 11</strong><br>\n<strong>context manager, 17, 23, 27, 32</strong><br>\n<strong>copy function, 15</strong><br>\n<strong>coroutine, 33</strong><br>\n<strong>counter, 2, 4, 12, 17</strong><br>\n<strong>csv, 26, 34, 46, 47</strong><br>\n<strong>curses module, 33, 34</strong><br>\n<strong>cython, 15, 49</strong>  </p>\n<h3 id=\"d\">D</h3>\n<p><strong>dataclasses module, 11, 15</strong><br>\n<strong>datetime module, 8-9</strong><br>\n<strong>decorator, 13, 14, 15, 16</strong><br>\n<strong>deques, 29</strong><br>\n<strong>dictionaries, 2, 4, 10-11, 19, 21</strong><br>\n<strong>duck types, 16-19</strong>  </p>\n<h3 id=\"e\">E</h3>\n<p><strong>enum module, 19-20</strong><br>\n<strong>enumerate function, 3</strong><br>\n<strong>excel, 46</strong><br>\n<strong>exceptions, 20-21, 23, 31</strong><br>\n<strong>exit function, 21</strong>  </p>\n<h3 id=\"f\">F</h3>\n<p><strong>files, 22-29, 34, 46</strong><br>\n<strong>filter function, 11</strong><br>\n<strong>flask library, 36</strong><br>\n<strong>floats, 4, 6, 7</strong><br>\n<strong>format, 6-7</strong><br>\n<strong>functools module, 11, 12, 13, 16</strong>  </p>\n<h3 id=\"g\">G</h3>\n<p><strong>games, 33, 42-43</strong><br>\n<strong>generators, 4, 11, 17</strong><br>\n<strong>global keyword, 10, 12</strong><br>\n<strong>gui, 35</strong>  </p>\n<h3 id=\"h\">H</h3>\n<p><strong>hashable, 15, 16</strong><br>\n<strong>hexadecimal representation, 7, 8, 28</strong>  </p>\n<h3 id=\"i\">I</h3>\n<p><strong>image, 35, 39-40, 42-43</strong><br>\n<strong>imports, 12</strong><br>\n<strong>inline, 11, 15, 20</strong><br>\n<strong>input function, 22</strong><br>\n<strong>introspection, 21, 31</strong><br>\n<strong>ints, 4, 7-8, 28</strong><br>\n<strong>is operator, 16, 30</strong><br>\n<strong>iterable, 4, 18, 19</strong><br>\n<strong>iterator, 3-4, 11, 17</strong><br>\n<strong>itertools module, 3, 8</strong>  </p>\n<h3 id=\"j\">J</h3>\n<p><strong>json, 25, 36, 46</strong>  </p>\n<h3 id=\"l\">L</h3>\n<p><strong>lambda, 11</strong><br>\n<strong>lists, 1-2, 4, 10-11, 18-19, 21</strong><br>\n<strong>locale module, 16</strong><br>\n<strong>logging, 31</strong>  </p>\n<h3 id=\"m\">M</h3>\n<p><strong>main function, 1, 49</strong><br>\n<strong>match statement, 30</strong><br>\n<strong>matplotlib library, 34, 44, 45</strong><br>\n<strong>map function, 11, 30</strong><br>\n<strong>math module, 7</strong><br>\n<strong>memoryviews, 29</strong><br>\n<strong>module, 12</strong>  </p>\n<h3 id=\"n\">N</h3>\n<p><strong>namedtuples, 3, 6</strong><br>\n<strong>nonlocal keyword, 12</strong><br>\n<strong>numbers, 4, 6-8</strong><br>\n<strong>numpy library, 37-38, 39, 44</strong>  </p>\n<h3 id=\"o\">O</h3>\n<p><strong>open function, 17, 22-23, 25, 26, 28</strong><br>\n<strong>operator module, 30</strong><br>\n<strong>os commands, 23-25, 34</strong>  </p>\n<h3 id=\"p\">P</h3>\n<p><strong>pandas library, 44-48</strong><br>\n<strong>partial function, 12, 20</strong><br>\n<strong>paths, 23-24, 34</strong><br>\n<strong>pickle module, 25</strong><br>\n<strong>pillow library, 39-40</strong><br>\n<strong>plotting, 34, 44, 45, 47-48</strong><br>\n<strong>print function, 14, 22</strong><br>\n<strong>profiling, 36-37</strong><br>\n<strong>progress bar, 34</strong><br>\n<strong>property decorator, 15, 16</strong><br>\n<strong>pygame library, 42-43</strong>  </p>\n<h3 id=\"q\">Q</h3>\n<p><strong>queues, 29, 32, 33</strong>  </p>\n<h3 id=\"r\">R</h3>\n<p><strong>random module, 8, 33, 41</strong><br>\n<strong>ranges, 3, 4</strong><br>\n<strong>recursion, 13, 21</strong><br>\n<strong>reduce function, 11</strong><br>\n<strong>regular expressions, 5-6</strong><br>\n<strong>requests library, 35, 36</strong>  </p>\n<h3 id=\"s\">S</h3>\n<p><strong>scope, 10, 12, 20</strong><br>\n<strong>scraping, 35, 43, 46, 47-48</strong><br>\n<strong>sequence, 4, 18-19</strong><br>\n<strong>sets, 2, 4, 10-11, 19, 21</strong><br>\n<strong>shell commands, 25</strong><br>\n<strong>sleep function, 34</strong><br>\n<strong>sortable, 1, 16</strong><br>\n<strong>splat operator, 10, 26</strong><br>\n<strong>sql, 27, 46</strong><br>\n<strong>statistics, 7, 37-38, 44-48</strong><br>\n<strong>strings, 4-7, 14</strong><br>\n<strong>struct module, 28-29</strong><br>\n<strong>subprocess module, 25</strong><br>\n<strong>super function, 14</strong><br>\n<strong>sys module, 13, 21-22</strong> </p>\n<h3 id=\"t\">T</h3>\n<p><strong>table, 26, 27, 34, 37-38, 45-46</strong><br>\n<strong>template, 6, 36</strong><br>\n<strong>threading module, 32, 36</strong><br>\n<strong>time module, 34, 36</strong><br>\n<strong>tuples, 3, 4, 10-11, 18-19</strong><br>\n<strong>type, 4, 16, 30</strong><br>\n<strong>type annotations, 15, 31</strong>  </p>\n<h3 id=\"w\">W</h3>\n<p><strong>wave module, 40-41</strong><br>\n<strong>web, 36</strong>  </p> \n</div>"
  },
  {
    "path": "pdf/popup.html",
    "content": "<div class=\"mt-3 px-4\">\n\n<p class=\"description\">\n</p>\n\n<img src=\"https://raw.githubusercontent.com/gto76/python-cheatsheet/main/pdf/descripitive_image_final.png\" style=\"display:block;margin-left:auto;margin-right:auto;margin-bottom:32px;max-width:95%\">\n\n<div style=\"text-align:center\"><b>“A very helpful cheat sheet, quite long.”</b>&nbsp;―&nbsp;<b><a href=\"https://www.cs.princeton.edu/courses/archive/spring19/cos333/python.help\" target=\"_blank\" rel=\"nofollow\">Brian&nbsp;Kernighan</a></b></div>\n\n<ul style=\"margin-top:16px;\">\n<li>Footers with page numbers and chapter titles.</li>\n<li>Index on the last page.</li>\n<li>Carefully chosen locations of page breaks.</li>\n<li>Includes a bonus PDF optimized for color laser printing.</li>\n<li>Free updates via Email (~2x per year).</li>\n<li>50 pages.</li>\n</ul>\n\n<ol class=\"summary-points-list\">\n</ol>\n\n<a href=\"https://transactions.sendowl.com/products/78175486/4422834F/purchase\" class=\"sendowl-ajax-load-link submit-btn btn btn-big btn-primary btn-block w-100 mt-3 mb-2 override-background-colour\" rel=\"nofollow\">\nBuy Now\n</a>\n\n</div>"
  },
  {
    "path": "pdf/remove_links.py",
    "content": "#!/usr/bin/env python3\n#\n# Usage: ./remove_links.py\n# Removes links from index.html and adds page numbers in brackets instead (p. XX).\n\nfrom pathlib import Path\n\n\nMATCHES = {\n    '<strong>For details about sort(), sorted(), min() and max() see <a href=\"#sortable\">Sortable</a>.</strong>': '<strong>For details about functions sort(), sorted(), max() and min() see duck type sortable (p. 16).</strong>',\n    '<strong>Module <a href=\"#operator\">operator</a> has function itemgetter() that can replace listed <a href=\"#lambda\">lambdas</a>.</strong>': '<strong>Listed lambda expressions can be replaced by the operator\\'s itemgetter() function (p. 31).</strong>',\n    '<strong>This text uses the term collection instead of <a href=\"#abstractbaseclasses\">iterable</a>. For rationale see <a href=\"#iterableducktypes\">duck types</a>.</strong>': '<strong>This text uses the term <em>collection</em> instead of <em>iterable</em>. For rationale see duck types (p. 18).</strong>',\n    '<strong>Calling <code class=\"python hljs\"><span class=\"hljs-string\">\\'iter(&lt;iter&gt;)\\'</span></code> returns unmodified iterator. For details see <a href=\"#iterator-1\">Iterator</a> duck type.</strong>': '<strong>Calling <code class=\"python hljs\"><span class=\"hljs-string\">\\'iter(&lt;iter&gt;)\\'</span></code> returns unmodified iterator. For details see duck types (p. 17).</strong>',\n    '<strong>Each abstract base class specifies a set of virtual subclasses. These classes are then recognized by isinstance() and issubclass() as <a href=\"#subclass\">subclasses</a> of the ABC, although they are really not. An ABC can also manually decide whether or not a specific class is its virtual subclass, usually based on which methods that class has implemented. For instance, Iterable ABC looks for method iter(), while Collection ABC looks for iter(), contains() and len().</strong>': '<strong>Each abstract base class specifies a set of virtual subclasses. These classes are then recognized by isinstance() and issubclass() as subclasses of the ABC, although they are really not. An ABC can also manually decide whether or not a specific class is its virtual subclass, usually based on which methods that class has implemented. For instance, Iterable ABC looks for method iter(), while Collection ABC looks for iter(), contains() and len().</strong>',\n    '<strong>Adding <code class=\"python hljs\"><span class=\"hljs-string\">\\'!r\\'</span></code> to the expression first calls result\\'s <a href=\"#class\">repr()</a> method and only then format().</strong>': '<strong>Adding <code class=\"python hljs\"><span class=\"hljs-string\">\\'!r\\'</span></code> to the expression first calls result\\'s repr() method and only then format().</strong>',\n    '<strong>Use relative imports, i.e. <code class=\"python hljs\"><span class=\"hljs-string\">\\'from .[…][&lt;pkg/mod&gt;[.…]] import &lt;obj&gt;\\'</span></code>, if project has scattered entry points. Another option is to install the whole project by moving its code into \\'src\\' dir, adding <a href=\"https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#basic-information\">\\'pyproject.toml\\'</a> to its root, and running <code class=\"python hljs\"><span class=\"hljs-string\">\\'$ pip3 install -e .\\'</span></code>.</strong>': '<strong>Use relative imports, i.e. <code class=\"python hljs\"><span class=\"hljs-string\">\\'from .[…][&lt;pkg/mod&gt;[.…]] import &lt;obj&gt;\\'</span></code>, if project has scattered entry points. Another option is to install the whole project by moving its code into \\'src\\' dir, adding \\'pyproject.toml\\' to its root, and running <code class=\"python hljs\"><span class=\"hljs-string\">\\'$ pip3 install -e .\\'</span></code>.</strong>',\n    '<strong>A decorator takes a function, adds some functionality and returns it. It can be any <a href=\"#callable\">callable</a>, but is usually implemented as a function that returns a <a href=\"#closure\">closure</a>.</strong>': '<strong>A decorator takes a function, adds some functionality and returns it. It can be any callable (p.&nbsp;17), but is usually implemented as a function that returns a closure (p. 12).</strong>',\n    '<strong>Hints are used by type checkers like <a href=\"https://pypi.org/project/mypy/\">mypy</a>, data validation libraries such as <a href=\"https://pypi.org/project/pydantic/\">Pydantic</a> and lately also by <a href=\"https://pypi.org/project/Cython/\">Cython</a> compiler. However, they are not enforced by CPython interpreter.</strong>': '<strong>Hints are used by type checkers like mypy, data validation libraries such as Pydantic and lately also by Cython compiler. However, they are not enforced by CPython interpreter.</strong>',\n    '<strong>Objects can be made <a href=\"#sortable\">sortable</a> with <code class=\"python hljs\"><span class=\"hljs-string\">\\'order=True\\'</span></code> and immutable with <code class=\"python hljs\"><span class=\"hljs-string\">\\'frozen=True\\'</span></code>.</strong>': '<strong>Objects can be made sortable with <code class=\"python hljs\"><span class=\"hljs-string\">\\'order=True\\'</span></code> and immutable with <code class=\"python hljs\"><span class=\"hljs-string\">\\'frozen=True\\'</span></code>.</strong>',\n    '<strong>For object to be <a href=\"#hashable\">hashable</a>, all attributes must be hashable and <code class=\"python hljs\"><span class=\"hljs-string\">\\'frozen\\'</span></code> must be <code class=\"python hljs\"><span class=\"hljs-string\">\\'True\\'</span></code>.</strong>': '<strong>For object to be hashable, all attributes must be hashable and <code class=\"python hljs\"><span class=\"hljs-string\">\\'frozen\\'</span></code> must be <code class=\"python hljs\"><span class=\"hljs-string\">\\'True\\'</span></code>.</strong>',\n    '<strong>Function field() is needed because <code class=\"python hljs\"><span class=\"hljs-string\">\\'&lt;attr_name&gt;: list = []\\'</span></code> would make a list that is&nbsp;shared among all instances. Its \\'default_factory\\' argument accepts any <a href=\"#callable\">callable</a> object.</strong>': '<strong>Function field() is needed because <code class=\"python hljs\"><span class=\"hljs-string\">\\'&lt;attr_name&gt;: list = []\\'</span></code> would make a list that is&nbsp;shared among all instances. Its \\'default_factory\\' argument accepts any callable object.</strong>',\n    '<strong>Sequence iterators returned by the <a href=\"#iterator\">iter()</a> function, such as list_iterator, etc.</strong>': '<strong>Sequence iterators returned by the iter() function, such as list_iterator, etc.</strong>',\n    '<strong>Objects returned by the <a href=\"#itertools\">itertools</a> module, such as count, repeat and cycle.</strong>': '<strong>Objects returned by the itertools module, such as count, repeat and cycle.</strong>',\n    '<strong>Generators returned by the <a href=\"#generator\">generator functions</a> and <a href=\"#comprehensions\">generator expressions</a>.</strong>': '<strong>Generators returned by the generator functions and generator expressions.</strong>',\n    '<strong>File objects returned by the <a href=\"#open\">open()</a> function, <a href=\"#sqlite\">SQLite</a> cursor objects, etc.</strong>': '<strong>File objects returned by the open() function, SQLite cursor objects, etc.</strong>',\n    '<strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">\\'logging.exception(&lt;str&gt;)\\'</span></code> to log the passed message, followed by the full error message of the caught exception. For details about how to set up the logger see <a href=\"#logging\">Logging</a>.</strong>': '<strong>Use <code class=\"python hljs\"><span class=\"hljs-string\">\\'logging.exception(&lt;str&gt;)\\'</span></code> to log the passed message, followed by the full error message of the caught exception. For details about the logger setup see Logging (p. 31).</strong>',\n    '<strong><code class=\"python hljs\"><span class=\"hljs-string\">\\'rb\\'</span></code> - Reads <a href=\"#bytes\">bytes objects</a>. Also <code class=\"python hljs\"><span class=\"hljs-string\">\\'wb\\'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">\\'xb\\'</span></code>, etc.</strong>': '<strong><code class=\"python hljs\"><span class=\"hljs-string\">\\'rb\\'</span></code> - Reads bytes (p. 28). Also <code class=\"python hljs\"><span class=\"hljs-string\">\\'wb\\'</span></code>, <code class=\"python hljs\"><span class=\"hljs-string\">\\'xb\\'</span></code>, etc.</strong>',\n    '<strong>Passed paths can be either strings, Path objects, or DirEntry objects.</strong>': '<strong>Provided paths can be either strings, Path objects, or DirEntry objects.</strong>',\n    '<strong>Functions report errors by raising OSError or one of its <a href=\"#exceptions-1\">subclasses</a>.</strong>': '<strong>Functions report errors by raising OSError or one of its subclasses (p. 23).</strong>',\n    '<strong>Without the <code class=\"python hljs\"><span class=\"hljs-string\">\\'newline=\"\"\\'</span></code> argument, every \\'\\\\r\\\\n\\' sequence that is embedded inside a quoted field will get converted to \\'\\\\n\\'. For details about the newline argument see <a href=\"#open\">Open</a>.</strong>': '<strong>Without the <code class=\"python hljs\"><span class=\"hljs-string\">\\'newline=\"\"\\'</span></code> argument, every \\'\\\\r\\\\n\\' sequence that is embedded inside a quoted field will get converted to \\'\\\\n\\'. For details about the newline arg. see Open (p. 22).</strong>',\n    '<strong>To nicely print the spreadsheet to the console use either <a href=\"#table\">Tabulate</a> or PrettyTable library.</strong>': '<strong>To print the spreadsheet to the console use either Tabulate or PrettyTable library (p. 34).</strong>',\n    '<strong>For XML and binary Excel files (with extensions xlsx, xlsm and xlsb) use <a href=\"#fileformats\">Pandas</a> library.</strong>': '<strong>For XML and binary Excel files (extensions xlsx, xlsm and xlsb) use Pandas library (p. 46).</strong>',\n    '<strong>Library for interacting with various DB systems via SQL, <a href=\"https://docs.sqlalchemy.org/en/latest/tutorial/data_select.html#the-select-sql-expression-construct\">method chaining</a> or <a href=\"https://docs.sqlalchemy.org/en/latest/orm/quickstart.html#simple-select\">ORM</a>.</strong>': '<strong>Library for interacting with various DB systems via SQL, method chaining, or ORM.</strong>',\n    '<strong>ProcessPoolExecutor provides true parallelism but: everything sent to and from workers must be <a href=\"#pickle\">pickable</a>, queues must be sent using executor\\'s \\'initargs\\' and \\'initializer\\' param­eters, and executor should only be reachable via <code class=\"python hljs\"><span class=\"hljs-string\">\\'if __name__ == \"__main__\": …\\'</span></code>.</strong>': '<strong>ProcessPoolExecutor provides true parallelism but: everything sent to and from workers must be pickable, queues must be sent using executor\\'s \\'initargs\\' and \\'initializer\\' param­eters, and executor should only be reachable via <code class=\"python hljs\"><span class=\"hljs-string\">\\'if __name__ == \"__main__\": …\\'</span></code>.</strong>',\n    '<strong>Install a <a href=\"https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface\">WSGI</a> server like <a href=\"https://flask.palletsprojects.com/en/latest/deploying/waitress/\">Waitress</a> and a HTTP server such as <a href=\"https://flask.palletsprojects.com/en/latest/deploying/nginx/\">Nginx</a> to get better security.</strong>': '<strong>Install a WSGI server like Waitress and a HTTP server such as Nginx to get better security.</strong>',\n    '<strong>Data analysis library. For examples see <a href=\"#plotly\">Plotly</a>.</strong>': '<strong>Data analysis library. For examples see Plotly (p. 47).</strong>',\n}\n\n\ndef main():\n    index_path = Path('..', 'index.html')\n    lines = read_file(index_path)\n    out = ''.join(lines)\n    for from_, to_ in MATCHES.items():\n        out = out.replace(from_, to_, 1)\n    write_to_file(index_path, out)\n\n\n###\n##  UTIL\n#\n\ndef read_file(filename):\n    p = Path(__file__).resolve().parent / filename\n    with open(p, encoding='utf-8') as file:\n        return file.readlines()\n\n\ndef write_to_file(filename, text):\n    p = Path(__file__).resolve().parent / filename\n    with open(p, 'w', encoding='utf-8') as file:\n        file.write(text)\n\n\nif __name__ == '__main__':\n    main()\n"
  },
  {
    "path": "web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/Demo.html",
    "content": "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n<meta charset=\"utf-8\"/>\r\n<title>Menlo Regular Font - OnlineWebFonts.COM</title>\r\n<style type=\"text/css\">\r\n@font-face {font-family: \"Menlo Regular\";\r\n  src: url(\"9f94dc20bb2a09c15241d3a880b7ad01.eot\"); /* IE9*/\r\n  src: url(\"9f94dc20bb2a09c15241d3a880b7ad01.eot?#iefix\") format(\"embedded-opentype\"), /* IE6-IE8 */\r\n  url(\"9f94dc20bb2a09c15241d3a880b7ad01.woff2\") format(\"woff2\"), /* chrome、firefox */\r\n  url(\"9f94dc20bb2a09c15241d3a880b7ad01.woff\") format(\"woff\"), /* chrome、firefox */\r\n  url(\"9f94dc20bb2a09c15241d3a880b7ad01.ttf\") format(\"truetype\"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/\r\n  url(\"9f94dc20bb2a09c15241d3a880b7ad01.svg#Menlo Regular\") format(\"svg\"); /* iOS 4.1- */\r\n}\r\n*{margin:0;padding:0;list-style:none;}pre{border:solid 1px #e7e1cd;background-color:#fffdef;overflow:auto;font-size:12px;line-height:14px;margin-top:10px;margin-right:0;margin-bottom:10px;margin-left:0;padding-top:5px;padding-right:10px;padding-bottom:5px;padding-left:10px;}.demo pre{color:#000;line-height: 1.2em;font-family:\"Menlo Regular\"!important;font-size:22px;background-color:#FFF;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;}body{font-family:sans-serif;line-height:1.5;font-size:16px;padding:20px;color:#333;}:hover,:before,:after{-webkit-transition:all 0.1s ease-in;-moz-transition:all 0.1s ease-in;-ms-transition:all 0.1s ease-in;-o-transition:all 0.1s ease-in;transition:all 0.1s ease-in;}*{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;}a{color:#66A523;}h1.logo{font-size:40px;letter-spacing:-1px;margin-top:-16px;}h1.logo strong{font-size:16px;font-family:sans-serif;color:#333;}h1.logo a{color:#34302d;text-decoration:none;}h1.logo a span{color:#66A523;}h1.logo a small{color:#006699;}.info{float:left;font-size:14px;margin-top:15px;}.info ul{margin-left:0px;color:#111;margin-bottom:20px;}.info .exs{font-size:12px;color:#666;margin-left:35px;display:block;}.info ul li{margin-top:10px;list-style:none;}.info .numno{color:#fff;border-radius:20px;padding:1px;display:inline-block;width:22px;height:22px;text-align:center;margin-right:10px;background-color:#999999;}.info ul strong{font-weight:normal;color:#000;}.info .inst{font-size:22px;margin-bottom:10px;}.demo{float:left;width:100%;height:auto;border-top-width:1px;border-top-style:solid;border-top-color:#bbb;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#bbb;padding-bottom:10px;}.demo .demo_svg{float:left;height:auto;width:100px;margin-right:5px;margin-left:5px;margin-bottom:10px;}.demo .demo_svg i{float:left;height:80px;width:80px;text-align:center;font-size:40px;margin-left:10px;line-height:80px;color:#777;}.demo .demo_svg .code{float:left;height:20px;width:100%;overflow:hidden;text-align:center;line-height:20px;font-size:11px;color:#666;}.demo .demo_svg .txt{float:left;height:20px;width:100%;font-size:11px;text-align:center;white-space:nowrap;overflow:hidden;line-height:20px;}.demo .demo_svg:hover i{font-size:60px;color:#333;}.by{padding-top:15px;float:left;width:100%;margin-top:10px;margin-right:0;margin-bottom:10px;margin-left:0;}.by{margin-bottom:10px;font-size:20px;}.by .attr{font-size:14px;color:#333;padding-top:10px;padding-bottom:10px;}textarea{width:80%;height:auto;border:1px solid #CCC;resize:none;background:#EEE;padding:20px;float:left;margin-top:10px;line-height:30px;}#footer{float:left;width:100%;margin-top:10px;padding-bottom:20px;}h2{background-color:#000;padding-top:10px;padding-bottom:10px;padding-left:10px;color:#FFF;}\r\n</style>\r\n</head>\r\n<body>\r\n<h1 class=\"logo\"> <a href=\"http://www.onlinewebfonts.com/\"> <span>Online</span><small>Web</small>Fonts</a> <strong>Font Demo</strong></h1>\r\n<h2>\r\nMenlo Regular Font <a style=\"font-size:14px;\" href=\"http://www.onlinewebfonts.com/download/9f94dc20bb2a09c15241d3a880b7ad01\" target=\"_blank\">More Format Downloads</a></h2>\r\n<div class=\"info\">\r\n  <div class=\"inst\">Instructions:</div>\r\n  <ul>\r\n    <li>\r\n      <p> <span class=\"numno\">1</span>Use font-face declaration Fonts.<br />\r\n        <span class=\"exs\">\r\n        <pre>\r\n@font-face {font-family: \"Menlo Regular\";\r\n  src: url(\"9f94dc20bb2a09c15241d3a880b7ad01.eot\"); /* IE9*/\r\n  src: url(\"9f94dc20bb2a09c15241d3a880b7ad01.eot?#iefix\") format(\"embedded-opentype\"), /* IE6-IE8 */\r\n  url(\"9f94dc20bb2a09c15241d3a880b7ad01.woff2\") format(\"woff2\"), /* chrome、firefox */\r\n  url(\"9f94dc20bb2a09c15241d3a880b7ad01.woff\") format(\"woff\"), /* chrome、firefox */\r\n  url(\"9f94dc20bb2a09c15241d3a880b7ad01.ttf\") format(\"truetype\"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/\r\n  url(\"9f94dc20bb2a09c15241d3a880b7ad01.svg#Menlo Regular\") format(\"svg\"); /* iOS 4.1- */\r\n}\r\n</pre>\r\n      </span> \r\n    </li>\r\n    <li>\r\n      <p> <span class=\"numno\">2</span>Settings font css style <br />\r\n      <span class=\"exs\">\r\n<pre>\r\n.demo{\r\n    font-family:\"Menlo Regular\" !important;\r\n    font-size:16px;font-style:normal;\r\n    -webkit-font-smoothing: antialiased;\r\n    -webkit-text-stroke-width: 0.2px;\r\n    -moz-osx-font-smoothing: grayscale;}\r\n</pre>\r\n      </span> \r\n    </li>\r\n    <li>\r\n      <p> <span class=\"numno\">3</span>View DEMO <br />\r\n      <span class=\"exs\"><pre>\r\n&lt;div class=\"demo\"&gt; www.OnlineWebFonts.Com &lt;/div&gt;\r\n</pre></span> \r\n    </li>\r\n    <li>\r\n      <p> <span class=\"numno\">OR</span>Or add to the head section of page. <br />\r\n      <span class=\"exs\"><pre>\r\n&lt;link href=\"//db.onlinewebfonts.com/c/9f94dc20bb2a09c15241d3a880b7ad01?family=Menlo+Regular\" rel=\"stylesheet\" type=\"text/css\"/&gt;\r\n</pre></span> \r\n    </li>\r\n  </ul>\r\n</div>\r\n<div class=\"demo\">\r\n<pre>\r\n\r\nOnlineWebFonts.Com features an amazing collection of free fonts,\r\npremium fonts and free dingbats. With over 8,000,000 freeware fonts, \r\nyou've come to the best place to download fonts! \r\n\r\nOnlineWebFonts.Com Some fonts provided are trial versions of full versions and may not allow embedding \r\nunless a commercial license is purchased or may contain a limited character set. \r\nPlease review any files included with your download, \r\nwhich will usually include information on the usage and licenses of the fonts. \r\nIf no information is provided, \r\nplease use at your own discretion or contact the author directly. \r\n\r\n0123456789  /*-+~!@#$%^&*()-=_+{}[]:;\"'|\\<>.?\r\n\r\n</pre>\r\n</div>\r\n\r\n<div class=\"by\">\r\n<div class=\"by_title\">License and attribution:</div>\r\n<div class=\"attr\">You must credit the author Copy this link ( <a href=\"http://www.onlinewebfonts.com\" target=\"_blank\">oNlineWebFonts.Com</a> ) on your web </div><div class=\"usetitle\">Copy the Attribution License:</div>\r\n<textarea onclick=\"this.focus();this.select();\">&lt;div&gt;Icons made from &lt;a href=\"http://www.onlinewebfonts.com\"&gt;oNline Web Fonts&lt;/a&gt;is licensed by CC BY 3.0&lt;/div&gt;</textarea>\r\n</div>\r\n<div id=\"footer\">\r\n    <div>Generated by <a href=\"http://www.onlinewebfonts.com\" target=\"_blank\">oNlineWebFonts.Com</a></div>\r\n</div>\r\n</body>\r\n</html>"
  },
  {
    "path": "web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/License.txt",
    "content": "\r\n\r\nX------------------------------------------------------[\r\n                                                    \r\n     FREE FONT : http://www.OnlineWebFonts.Com      \r\n                                                    \r\n^------------------------------------------------------a\r\n\r\nYou must credit the author\r\nCopy this link on your web\r\n\r\n<div>Font made from <a href=\"http://www.onlinewebfonts.com\">oNline Web Fonts</a> is licensed by CC BY 3.0</div>\r\n\r\n    OR\r\n\r\n<a href=\"http://www.onlinewebfonts.com\">oNline Web Fonts</a>\r\n\r\n\r\n=======================================================================================================\r\n\r\nOnlineWebFonts.Com features an amazing collection of free fonts,\r\npremium fonts and free dingbats. With over 8,000,000 freeware fonts, \r\nyou've come to the best place to download fonts! \r\n\r\n\r\n=======================================================================================================\r\n\r\n\r\nOnlineWebFonts.Com Some fonts provided are trial versions of full versions and may not allow embedding \r\nunless a commercial license is purchased or may contain a limited character set. \r\nPlease review any files included with your download, \r\nwhich will usually include information on the usage and licenses of the fonts. \r\nIf no information is provided, \r\nplease use at your own discretion or contact the author directly. \r\n\r\n\r\n======================================================================================================="
  },
  {
    "path": "web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Online_Web_Fonts.url",
    "content": "[{000214A0-0000-0000-C000-000000000046}]\r\nProp3=19,2\r\n[InternetShortcut]\r\nURL=http://www.onlinewebfonts.com/\r\nIDList=\r\nIconFile=http://www.fontfree.org/favicon.ico\r\nIconIndex=1\r\nHotKey=0\r\n"
  },
  {
    "path": "web/OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88/License.txt",
    "content": "\r\n\r\nX------------------------------------------------------[\r\n                                                    \r\n     FREE FONT : http://www.OnlineWebFonts.Com      \r\n                                                    \r\n^------------------------------------------------------a\r\n\r\nYou must credit the author\r\nCopy this link on your web\r\n\r\n<div>Font made from <a href=\"http://www.onlinewebfonts.com\">oNline Web Fonts</a> is licensed by CC BY 3.0</div>\r\n\r\n    OR\r\n\r\n<a href=\"http://www.onlinewebfonts.com\">oNline Web Fonts</a>\r\n\r\n\r\n=======================================================================================================\r\n\r\nOnlineWebFonts.Com features an amazing collection of free fonts,\r\npremium fonts and free dingbats. With over 8,000,000 freeware fonts, \r\nyou've come to the best place to download fonts! \r\n\r\n\r\n=======================================================================================================\r\n\r\n\r\nOnlineWebFonts.Com Some fonts provided are trial versions of full versions and may not allow embedding \r\nunless a commercial license is purchased or may contain a limited character set. \r\nPlease review any files included with your download, \r\nwhich will usually include information on the usage and licenses of the fonts. \r\nIf no information is provided, \r\nplease use at your own discretion or contact the author directly. \r\n\r\n\r\n======================================================================================================="
  },
  {
    "path": "web/OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88/Menlo Bold/@font-face/Demo.html",
    "content": "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n<meta charset=\"utf-8\"/>\r\n<title>Menlo Bold Font - OnlineWebFonts.COM</title>\r\n<style type=\"text/css\">\r\n@font-face {font-family: \"Menlo Bold\";\r\n  src: url(\"a6ffc5d72a96b65159e710ea6d258ba4.eot\"); /* IE9*/\r\n  src: url(\"a6ffc5d72a96b65159e710ea6d258ba4.eot?#iefix\") format(\"embedded-opentype\"), /* IE6-IE8 */\r\n  url(\"a6ffc5d72a96b65159e710ea6d258ba4.woff2\") format(\"woff2\"), /* chrome、firefox */\r\n  url(\"a6ffc5d72a96b65159e710ea6d258ba4.woff\") format(\"woff\"), /* chrome、firefox */\r\n  url(\"a6ffc5d72a96b65159e710ea6d258ba4.ttf\") format(\"truetype\"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/\r\n  url(\"a6ffc5d72a96b65159e710ea6d258ba4.svg#Menlo Bold\") format(\"svg\"); /* iOS 4.1- */\r\n}\r\n*{margin:0;padding:0;list-style:none;}pre{border:solid 1px #e7e1cd;background-color:#fffdef;overflow:auto;font-size:12px;line-height:14px;margin-top:10px;margin-right:0;margin-bottom:10px;margin-left:0;padding-top:5px;padding-right:10px;padding-bottom:5px;padding-left:10px;}.demo pre{color:#000;line-height: 1.2em;font-family:\"Menlo Bold\"!important;font-size:22px;background-color:#FFF;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;}body{font-family:sans-serif;line-height:1.5;font-size:16px;padding:20px;color:#333;}:hover,:before,:after{-webkit-transition:all 0.1s ease-in;-moz-transition:all 0.1s ease-in;-ms-transition:all 0.1s ease-in;-o-transition:all 0.1s ease-in;transition:all 0.1s ease-in;}*{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;}a{color:#66A523;}h1.logo{font-size:40px;letter-spacing:-1px;margin-top:-16px;}h1.logo strong{font-size:16px;font-family:sans-serif;color:#333;}h1.logo a{color:#34302d;text-decoration:none;}h1.logo a span{color:#66A523;}h1.logo a small{color:#006699;}.info{float:left;font-size:14px;margin-top:15px;}.info ul{margin-left:0px;color:#111;margin-bottom:20px;}.info .exs{font-size:12px;color:#666;margin-left:35px;display:block;}.info ul li{margin-top:10px;list-style:none;}.info .numno{color:#fff;border-radius:20px;padding:1px;display:inline-block;width:22px;height:22px;text-align:center;margin-right:10px;background-color:#999999;}.info ul strong{font-weight:normal;color:#000;}.info .inst{font-size:22px;margin-bottom:10px;}.demo{float:left;width:100%;height:auto;border-top-width:1px;border-top-style:solid;border-top-color:#bbb;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#bbb;padding-bottom:10px;}.demo .demo_svg{float:left;height:auto;width:100px;margin-right:5px;margin-left:5px;margin-bottom:10px;}.demo .demo_svg i{float:left;height:80px;width:80px;text-align:center;font-size:40px;margin-left:10px;line-height:80px;color:#777;}.demo .demo_svg .code{float:left;height:20px;width:100%;overflow:hidden;text-align:center;line-height:20px;font-size:11px;color:#666;}.demo .demo_svg .txt{float:left;height:20px;width:100%;font-size:11px;text-align:center;white-space:nowrap;overflow:hidden;line-height:20px;}.demo .demo_svg:hover i{font-size:60px;color:#333;}.by{padding-top:15px;float:left;width:100%;margin-top:10px;margin-right:0;margin-bottom:10px;margin-left:0;}.by{margin-bottom:10px;font-size:20px;}.by .attr{font-size:14px;color:#333;padding-top:10px;padding-bottom:10px;}textarea{width:80%;height:auto;border:1px solid #CCC;resize:none;background:#EEE;padding:20px;float:left;margin-top:10px;line-height:30px;}#footer{float:left;width:100%;margin-top:10px;padding-bottom:20px;}h2{background-color:#000;padding-top:10px;padding-bottom:10px;padding-left:10px;color:#FFF;}\r\n</style>\r\n</head>\r\n<body>\r\n<h1 class=\"logo\"> <a href=\"http://www.onlinewebfonts.com/\"> <span>Online</span><small>Web</small>Fonts</a> <strong>Fonts Demo</strong></h1>\r\n<h2>\r\nMenlo Bold Fonts <a style=\"font-size:14px;\" href=\"http://www.onlinewebfonts.com/download/a6ffc5d72a96b65159e710ea6d258ba4\" target=\"_blank\">More Formats Downloads</a></h2>\r\n<div class=\"info\">\r\n  <div class=\"inst\">Instructions:</div>\r\n  <ul>\r\n    <li>\r\n      <p> <span class=\"numno\">1</span>Use font-face declaration Fonts.<br />\r\n        <span class=\"exs\">\r\n        <pre>\r\n@font-face {font-family: \"Menlo Bold\";\r\n  src: url(\"a6ffc5d72a96b65159e710ea6d258ba4.eot\"); /* IE9*/\r\n  src: url(\"a6ffc5d72a96b65159e710ea6d258ba4.eot?#iefix\") format(\"embedded-opentype\"), /* IE6-IE8 */\r\n  url(\"a6ffc5d72a96b65159e710ea6d258ba4.woff2\") format(\"woff2\"), /* chrome、firefox */\r\n  url(\"a6ffc5d72a96b65159e710ea6d258ba4.woff\") format(\"woff\"), /* chrome、firefox */\r\n  url(\"a6ffc5d72a96b65159e710ea6d258ba4.ttf\") format(\"truetype\"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/\r\n  url(\"a6ffc5d72a96b65159e710ea6d258ba4.svg#Menlo Bold\") format(\"svg\"); /* iOS 4.1- */\r\n}\r\n</pre>\r\n      </span> \r\n    </li>\r\n    <li>\r\n      <p> <span class=\"numno\">2</span>Settings font css style <br />\r\n      <span class=\"exs\">\r\n<pre>\r\n.demo{\r\n    font-family:\"Menlo Bold\" !important;\r\n    font-size:16px;font-style:normal;\r\n    -webkit-font-smoothing: antialiased;\r\n    -webkit-text-stroke-width: 0.2px;\r\n    -moz-osx-font-smoothing: grayscale;}\r\n</pre>\r\n      </span> \r\n    </li>\r\n    <li>\r\n      <p> <span class=\"numno\">3</span>View DEMO <br />\r\n      <span class=\"exs\"><pre>\r\n&lt;div class=\"demo\"&gt; www.OnlineWebFonts.Com &lt;/div&gt;\r\n</pre></span> \r\n    </li>\r\n    <li>\r\n      <p> <span class=\"numno\">OR</span>Or add to the head section of page. <br />\r\n      <span class=\"exs\"><pre>\r\n&lt;link href=\"//db.onlinewebfonts.com/c/a6ffc5d72a96b65159e710ea6d258ba4?family=Menlo+Bold\" rel=\"stylesheet\" type=\"text/css\"/&gt;\r\n</pre></span> \r\n    </li>\r\n  </ul>\r\n</div>\r\n<div class=\"demo\">\r\n<pre>\r\n\r\nOnlineWebFonts.Com features an amazing collection of free fonts,\r\npremium fonts and free dingbats. With over 8,000,000 freeware fonts, \r\nyou\\'ve come to the best place to download fonts! \r\n\r\nOnlineWebFonts.Com Some fonts provided are trial versions of full versions and may not allow embedding \r\nunless a commercial license is purchased or may contain a limited character set. \r\nPlease review any files included with your download, \r\nwhich will usually include information on the usage and licenses of the fonts. \r\nIf no information is provided, \r\nplease use at your own discretion or contact the author directly. \r\n\r\n0123456789  /*-+~!@#$%^&*()-=_+{}[]:;\"\\'|\\<>.?\r\n\r\n</pre>\r\n</div>\r\n\r\n<div class=\"by\">\r\n<div class=\"by_title\">License and attribution:</div>\r\n<div class=\"attr\">You must credit the author Copy this link ( <a href=\"http://www.onlinewebfonts.com\" target=\"_blank\">oNlineWebFonts.Com</a> ) on your web </div><div class=\"usetitle\">Copy the Attribution License:</div>\r\n<textarea onclick=\"this.focus();this.select();\">&lt;div&gt;Fonts made from &lt;a href=\"http://www.onlinewebfonts.com\"&gt;oNline Web Fonts&lt;/a&gt;is licensed by CC BY 3.0&lt;/div&gt;</textarea>\r\n</div>\r\n<div id=\"footer\">\r\n    <div>Generated by <a href=\"http://www.onlinewebfonts.com\" target=\"_blank\">oNlineWebFonts.Com</a></div>\r\n</div>\r\n</body>\r\n</html>"
  },
  {
    "path": "web/OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88/Online_Web_Fonts.url",
    "content": "[{000214A0-0000-0000-C000-000000000046}]\r\nProp3=19,2\r\n[InternetShortcut]\r\nURL=http://www.onlinewebfonts.com/\r\nIDList=\r\nIconFile=http://www.fontfree.org/favicon.ico\r\nIconIndex=1\r\nHotKey=0\r\n"
  },
  {
    "path": "web/continents.csv",
    "content": "Continent_Name,Continent_Code,Country_Name,Two_Letter_Country_Code,Three_Letter_Country_Code,Country_Number\nAsia,AS,\"Afghanistan, Islamic Republic of\",AF,AFG,4\nEurope,EU,\"Albania, Republic of\",AL,ALB,8\nAntarctica,AN,Antarctica (the territory South of 60 deg S),AQ,ATA,10\nAfrica,AF,\"Algeria, People's Democratic Republic of\",DZ,DZA,12\nOceania,OC,American Samoa,AS,ASM,16\nEurope,EU,\"Andorra, Principality of\",AD,AND,20\nAfrica,AF,\"Angola, Republic of\",AO,AGO,24\nNorth America,NA,Antigua and Barbuda,AG,ATG,28\nEurope,EU,\"Azerbaijan, Republic of\",AZ,AZE,31\nAsia,AS,\"Azerbaijan, Republic of\",AZ,AZE,31\nSouth America,SA,\"Argentina, Argentine Republic\",AR,ARG,32\nOceania,OC,\"Australia, Commonwealth of\",AU,AUS,36\nEurope,EU,\"Austria, Republic of\",AT,AUT,40\nNorth America,NA,\"Bahamas, Commonwealth of the\",BS,BHS,44\nAsia,AS,\"Bahrain, Kingdom of\",BH,BHR,48\nAsia,AS,\"Bangladesh, People's Republic of\",BD,BGD,50\nEurope,EU,\"Armenia, Republic of\",AM,ARM,51\nAsia,AS,\"Armenia, Republic of\",AM,ARM,51\nNorth America,NA,Barbados,BB,BRB,52\nEurope,EU,\"Belgium, Kingdom of\",BE,BEL,56\nNorth America,NA,Bermuda,BM,BMU,60\nAsia,AS,\"Bhutan, Kingdom of\",BT,BTN,64\nSouth America,SA,\"Bolivia, Republic of\",BO,BOL,68\nEurope,EU,Bosnia and Herzegovina,BA,BIH,70\nAfrica,AF,\"Botswana, Republic of\",BW,BWA,72\nAntarctica,AN,Bouvet Island (Bouvetoya),BV,BVT,74\nSouth America,SA,\"Brazil, Federative Republic of\",BR,BRA,76\nNorth America,NA,Belize,BZ,BLZ,84\nAsia,AS,British Indian Ocean Territory (Chagos Archipelago),IO,IOT,86\nOceania,OC,Solomon Islands,SB,SLB,90\nNorth America,NA,British Virgin Islands,VG,VGB,92\nAsia,AS,Brunei Darussalam,BN,BRN,96\nEurope,EU,\"Bulgaria, Republic of\",BG,BGR,100\nAsia,AS,\"Myanmar, Union of\",MM,MMR,104\nAfrica,AF,\"Burundi, Republic of\",BI,BDI,108\nEurope,EU,\"Belarus, Republic of\",BY,BLR,112\nAsia,AS,\"Cambodia, Kingdom of\",KH,KHM,116\nAfrica,AF,\"Cameroon, Republic of\",CM,CMR,120\nNorth America,NA,Canada,CA,CAN,124\nAfrica,AF,\"Cape Verde, Republic of\",CV,CPV,132\nNorth America,NA,Cayman Islands,KY,CYM,136\nAfrica,AF,Central African Republic,CF,CAF,140\nAsia,AS,\"Sri Lanka, Democratic Socialist Republic of\",LK,LKA,144\nAfrica,AF,\"Chad, Republic of\",TD,TCD,148\nSouth America,SA,\"Chile, Republic of\",CL,CHL,152\nAsia,AS,\"China, People's Republic of\",CN,CHN,156\nAsia,AS,Taiwan,TW,TWN,158\nAsia,AS,Christmas Island,CX,CXR,162\nAsia,AS,Cocos (Keeling) Islands,CC,CCK,166\nSouth America,SA,\"Colombia, Republic of\",CO,COL,170\nAfrica,AF,\"Comoros, Union of the\",KM,COM,174\nAfrica,AF,Mayotte,YT,MYT,175\nAfrica,AF,\"Congo, Republic of the\",CG,COG,178\nAfrica,AF,\"Congo, Democratic Republic of the\",CD,COD,180\nOceania,OC,Cook Islands,CK,COK,184\nNorth America,NA,\"Costa Rica, Republic of\",CR,CRI,188\nEurope,EU,\"Croatia, Republic of\",HR,HRV,191\nNorth America,NA,\"Cuba, Republic of\",CU,CUB,192\nEurope,EU,\"Cyprus, Republic of\",CY,CYP,196\nAsia,AS,\"Cyprus, Republic of\",CY,CYP,196\nEurope,EU,Czech Republic,CZ,CZE,203\nAfrica,AF,\"Benin, Republic of\",BJ,BEN,204\nEurope,EU,\"Denmark, Kingdom of\",DK,DNK,208\nNorth America,NA,\"Dominica, Commonwealth of\",DM,DMA,212\nNorth America,NA,Dominican Republic,DO,DOM,214\nSouth America,SA,\"Ecuador, Republic of\",EC,ECU,218\nNorth America,NA,\"El Salvador, Republic of\",SV,SLV,222\nAfrica,AF,\"Equatorial Guinea, Republic of\",GQ,GNQ,226\nAfrica,AF,\"Ethiopia, Federal Democratic Republic of\",ET,ETH,231\nAfrica,AF,\"Eritrea, State of\",ER,ERI,232\nEurope,EU,\"Estonia, Republic of\",EE,EST,233\nEurope,EU,Faroe Islands,FO,FRO,234\nSouth America,SA,Falkland Islands (Malvinas),FK,FLK,238\nAntarctica,AN,South Georgia and the South Sandwich Islands,GS,SGS,239\nOceania,OC,\"Fiji, Republic of the Fiji Islands\",FJ,FJI,242\nEurope,EU,\"Finland, Republic of\",FI,FIN,246\nEurope,EU,Åland Islands,AX,ALA,248\nEurope,EU,\"France, French Republic\",FR,FRA,250\nSouth America,SA,French Guiana,GF,GUF,254\nOceania,OC,French Polynesia,PF,PYF,258\nAntarctica,AN,French Southern Territories,TF,ATF,260\nAfrica,AF,\"Djibouti, Republic of\",DJ,DJI,262\nAfrica,AF,\"Gabon, Gabonese Republic\",GA,GAB,266\nEurope,EU,Georgia,GE,GEO,268\nAsia,AS,Georgia,GE,GEO,268\nAfrica,AF,\"Gambia, Republic of the\",GM,GMB,270\nAsia,AS,\"Palestinian Territory, Occupied\",PS,PSE,275\nEurope,EU,\"Germany, Federal Republic of\",DE,DEU,276\nAfrica,AF,\"Ghana, Republic of\",GH,GHA,288\nEurope,EU,Gibraltar,GI,GIB,292\nOceania,OC,\"Kiribati, Republic of\",KI,KIR,296\nEurope,EU,\"Greece, Hellenic Republic\",GR,GRC,300\nNorth America,NA,Greenland,GL,GRL,304\nNorth America,NA,Grenada,GD,GRD,308\nNorth America,NA,Guadeloupe,GP,GLP,312\nOceania,OC,Guam,GU,GUM,316\nNorth America,NA,\"Guatemala, Republic of\",GT,GTM,320\nAfrica,AF,\"Guinea, Republic of\",GN,GIN,324\nSouth America,SA,\"Guyana, Co-operative Republic of\",GY,GUY,328\nNorth America,NA,\"Haiti, Republic of\",HT,HTI,332\nAntarctica,AN,Heard Island and McDonald Islands,HM,HMD,334\nEurope,EU,Holy See (Vatican City State),VA,VAT,336\nNorth America,NA,\"Honduras, Republic of\",HN,HND,340\nAsia,AS,\"Hong Kong, Special Administrative Region of China\",HK,HKG,344\nEurope,EU,\"Hungary, Republic of\",HU,HUN,348\nEurope,EU,\"Iceland, Republic of\",IS,ISL,352\nAsia,AS,\"India, Republic of\",IN,IND,356\nAsia,AS,\"Indonesia, Republic of\",ID,IDN,360\nAsia,AS,\"Iran, Islamic Republic of\",IR,IRN,364\nAsia,AS,\"Iraq, Republic of\",IQ,IRQ,368\nEurope,EU,Ireland,IE,IRL,372\nAsia,AS,\"Israel, State of\",IL,ISR,376\nEurope,EU,\"Italy, Italian Republic\",IT,ITA,380\nAfrica,AF,\"Cote d'Ivoire, Republic of\",CI,CIV,384\nNorth America,NA,Jamaica,JM,JAM,388\nAsia,AS,Japan,JP,JPN,392\nEurope,EU,\"Kazakhstan, Republic of\",KZ,KAZ,398\nAsia,AS,\"Kazakhstan, Republic of\",KZ,KAZ,398\nAsia,AS,\"Jordan, Hashemite Kingdom of\",JO,JOR,400\nAfrica,AF,\"Kenya, Republic of\",KE,KEN,404\nAsia,AS,\"Korea, Democratic People's Republic of\",KP,PRK,408\nAsia,AS,\"Korea, Republic of\",KR,KOR,410\nAsia,AS,\"Kuwait, State of\",KW,KWT,414\nAsia,AS,Kyrgyz Republic,KG,KGZ,417\nAsia,AS,Lao People's Democratic Republic,LA,LAO,418\nAsia,AS,\"Lebanon, Lebanese Republic\",LB,LBN,422\nAfrica,AF,\"Lesotho, Kingdom of\",LS,LSO,426\nEurope,EU,\"Latvia, Republic of\",LV,LVA,428\nAfrica,AF,\"Liberia, Republic of\",LR,LBR,430\nAfrica,AF,Libyan Arab Jamahiriya,LY,LBY,434\nEurope,EU,\"Liechtenstein, Principality of\",LI,LIE,438\nEurope,EU,\"Lithuania, Republic of\",LT,LTU,440\nEurope,EU,\"Luxembourg, Grand Duchy of\",LU,LUX,442\nAsia,AS,\"Macao, Special Administrative Region of China\",MO,MAC,446\nAfrica,AF,\"Madagascar, Republic of\",MG,MDG,450\nAfrica,AF,\"Malawi, Republic of\",MW,MWI,454\nAsia,AS,Malaysia,MY,MYS,458\nAsia,AS,\"Maldives, Republic of\",MV,MDV,462\nAfrica,AF,\"Mali, Republic of\",ML,MLI,466\nEurope,EU,\"Malta, Republic of\",MT,MLT,470\nNorth America,NA,Martinique,MQ,MTQ,474\nAfrica,AF,\"Mauritania, Islamic Republic of\",MR,MRT,478\nAfrica,AF,\"Mauritius, Republic of\",MU,MUS,480\nNorth America,NA,\"Mexico, United Mexican States\",MX,MEX,484\nEurope,EU,\"Monaco, Principality of\",MC,MCO,492\nAsia,AS,Mongolia,MN,MNG,496\nEurope,EU,\"Moldova, Republic of\",MD,MDA,498\nEurope,EU,\"Montenegro, Republic of\",ME,MNE,499\nNorth America,NA,Montserrat,MS,MSR,500\nAfrica,AF,\"Morocco, Kingdom of\",MA,MAR,504\nAfrica,AF,\"Mozambique, Republic of\",MZ,MOZ,508\nAsia,AS,\"Oman, Sultanate of\",OM,OMN,512\nAfrica,AF,\"Namibia, Republic of\",NA,NAM,516\nOceania,OC,\"Nauru, Republic of\",NR,NRU,520\nAsia,AS,\"Nepal, State of\",NP,NPL,524\nEurope,EU,\"Netherlands, Kingdom of the\",NL,NLD,528\nNorth America,NA,Netherlands Antilles,AN,ANT,530\nNorth America,NA,Curaçao,CW,CUW,531\nNorth America,NA,Aruba,AW,ABW,533\nNorth America,NA,Sint Maarten (Netherlands),SX,SXM,534\nNorth America,NA,\"Bonaire, Sint Eustatius and Saba\",BQ,BES,535\nOceania,OC,New Caledonia,NC,NCL,540\nOceania,OC,\"Vanuatu, Republic of\",VU,VUT,548\nOceania,OC,New Zealand,NZ,NZL,554\nNorth America,NA,\"Nicaragua, Republic of\",NI,NIC,558\nAfrica,AF,\"Niger, Republic of\",NE,NER,562\nAfrica,AF,\"Nigeria, Federal Republic of\",NG,NGA,566\nOceania,OC,Niue,NU,NIU,570\nOceania,OC,Norfolk Island,NF,NFK,574\nEurope,EU,\"Norway, Kingdom of\",NO,NOR,578\nOceania,OC,\"Northern Mariana Islands, Commonwealth of the\",MP,MNP,580\nOceania,OC,United States Minor Outlying Islands,UM,UMI,581\nNorth America,NA,United States Minor Outlying Islands,UM,UMI,581\nOceania,OC,\"Micronesia, Federated States of\",FM,FSM,583\nOceania,OC,\"Marshall Islands, Republic of the\",MH,MHL,584\nOceania,OC,\"Palau, Republic of\",PW,PLW,585\nAsia,AS,\"Pakistan, Islamic Republic of\",PK,PAK,586\nNorth America,NA,\"Panama, Republic of\",PA,PAN,591\nOceania,OC,\"Papua New Guinea, Independent State of\",PG,PNG,598\nSouth America,SA,\"Paraguay, Republic of\",PY,PRY,600\nSouth America,SA,\"Peru, Republic of\",PE,PER,604\nAsia,AS,\"Philippines, Republic of the\",PH,PHL,608\nOceania,OC,Pitcairn Islands,PN,PCN,612\nEurope,EU,\"Poland, Republic of\",PL,POL,616\nEurope,EU,\"Portugal, Portuguese Republic\",PT,PRT,620\nAfrica,AF,\"Guinea-Bissau, Republic of\",GW,GNB,624\nAsia,AS,\"Timor-Leste, Democratic Republic of\",TL,TLS,626\nNorth America,NA,\"Puerto Rico, Commonwealth of\",PR,PRI,630\nAsia,AS,\"Qatar, State of\",QA,QAT,634\nAfrica,AF,Reunion,RE,REU,638\nEurope,EU,Romania,RO,ROU,642\nEurope,EU,Russian Federation,RU,RUS,643\nAsia,AS,Russian Federation,RU,RUS,643\nAfrica,AF,\"Rwanda, Republic of\",RW,RWA,646\nNorth America,NA,Saint Barthelemy,BL,BLM,652\nAfrica,AF,Saint Helena,SH,SHN,654\nNorth America,NA,\"Saint Kitts and Nevis, Federation of\",KN,KNA,659\nNorth America,NA,Anguilla,AI,AIA,660\nNorth America,NA,Saint Lucia,LC,LCA,662\nNorth America,NA,Saint Martin,MF,MAF,663\nNorth America,NA,Saint Pierre and Miquelon,PM,SPM,666\nNorth America,NA,Saint Vincent and the Grenadines,VC,VCT,670\nEurope,EU,\"San Marino, Republic of\",SM,SMR,674\nAfrica,AF,\"Sao Tome and Principe, Democratic Republic of\",ST,STP,678\nAsia,AS,\"Saudi Arabia, Kingdom of\",SA,SAU,682\nAfrica,AF,\"Senegal, Republic of\",SN,SEN,686\nEurope,EU,\"Serbia, Republic of\",RS,SRB,688\nAfrica,AF,\"Seychelles, Republic of\",SC,SYC,690\nAfrica,AF,\"Sierra Leone, Republic of\",SL,SLE,694\nAsia,AS,\"Singapore, Republic of\",SG,SGP,702\nEurope,EU,Slovakia (Slovak Republic),SK,SVK,703\nAsia,AS,\"Vietnam, Socialist Republic of\",VN,VNM,704\nEurope,EU,\"Slovenia, Republic of\",SI,SVN,705\nAfrica,AF,\"Somalia, Somali Republic\",SO,SOM,706\nAfrica,AF,\"South Africa, Republic of\",ZA,ZAF,710\nAfrica,AF,\"Zimbabwe, Republic of\",ZW,ZWE,716\nEurope,EU,\"Spain, Kingdom of\",ES,ESP,724\nAfrica,AF,South Sudan,SS,SSD,728\nAfrica,AF,Western Sahara,EH,ESH,732\nAfrica,AF,\"Sudan, Republic of\",SD,SDN,736\nSouth America,SA,\"Suriname, Republic of\",SR,SUR,740\nEurope,EU,Svalbard & Jan Mayen Islands,SJ,SJM,744\nAfrica,AF,\"Swaziland, Kingdom of\",SZ,SWZ,748\nEurope,EU,\"Sweden, Kingdom of\",SE,SWE,752\nEurope,EU,\"Switzerland, Swiss Confederation\",CH,CHE,756\nAsia,AS,Syrian Arab Republic,SY,SYR,760\nAsia,AS,\"Tajikistan, Republic of\",TJ,TJK,762\nAsia,AS,\"Thailand, Kingdom of\",TH,THA,764\nAfrica,AF,\"Togo, Togolese Republic\",TG,TGO,768\nOceania,OC,Tokelau,TK,TKL,772\nOceania,OC,\"Tonga, Kingdom of\",TO,TON,776\nNorth America,NA,\"Trinidad and Tobago, Republic of\",TT,TTO,780\nAsia,AS,United Arab Emirates,AE,ARE,784\nAfrica,AF,\"Tunisia, Tunisian Republic\",TN,TUN,788\nEurope,EU,\"Turkey, Republic of\",TR,TUR,792\nAsia,AS,\"Turkey, Republic of\",TR,TUR,792\nAsia,AS,Turkmenistan,TM,TKM,795\nNorth America,NA,Turks and Caicos Islands,TC,TCA,796\nOceania,OC,Tuvalu,TV,TUV,798\nAfrica,AF,\"Uganda, Republic of\",UG,UGA,800\nEurope,EU,Ukraine,UA,UKR,804\nEurope,EU,\"Macedonia, The Former Yugoslav Republic of\",MK,MKD,807\nAfrica,AF,\"Egypt, Arab Republic of\",EG,EGY,818\nEurope,EU,United Kingdom of Great Britain & Northern Ireland,GB,GBR,826\nEurope,EU,\"Guernsey, Bailiwick of\",GG,GGY,831\nEurope,EU,\"Jersey, Bailiwick of\",JE,JEY,832\nEurope,EU,Isle of Man,IM,IMN,833\nAfrica,AF,\"Tanzania, United Republic of\",TZ,TZA,834\nNorth America,NA,United States of America,US,USA,840\nNorth America,NA,United States Virgin Islands,VI,VIR,850\nAfrica,AF,Burkina Faso,BF,BFA,854\nSouth America,SA,\"Uruguay, Eastern Republic of\",UY,URY,858\nAsia,AS,\"Uzbekistan, Republic of\",UZ,UZB,860\nSouth America,SA,\"Venezuela, Bolivarian Republic of\",VE,VEN,862\nOceania,OC,Wallis and Futuna,WF,WLF,876\nOceania,OC,\"Samoa, Independent State of\",WS,WSM,882\nAsia,AS,Yemen,YE,YEM,887\nAfrica,AF,\"Zambia, Republic of\",ZM,ZMB,894\nOceania,OC,Disputed Territory,XX,,\nAsia,AS,Iraq-Saudi Arabia Neutral Zone,XE,,\nAsia,AS,United Nations Neutral Zone,XD,,\nAsia,AS,Spratly Islands,XS,,\n"
  },
  {
    "path": "web/convert_table.py",
    "content": "#!/usr/bin/env python3\n\ndef convert_table(lines):\n    def from_ascii():\n        out = []\n        first, header, third, *body, last = lines\n        first = first.translate(str.maketrans({'-': '━', '+': '┯'}))\n        out.append(f'┏{first[1:-1]}┓')\n        header = header.translate(str.maketrans({'|': '│'}))\n        out.append(f'┃{header[1:-1]}┃')\n        third = third.translate(str.maketrans({'-': '─', '+': '┼'}))\n        out.append(f'┠{third[1:-1]}┨')\n        for line in body:\n            line = line.translate(str.maketrans({'|': '│'}))\n            line = line.replace('yes', ' ✓ ')\n            out.append(f'┃{line[1:-1]}┃')\n        last = last.translate(str.maketrans({'-': '━', '+': '┷'}))\n        out.append(f'┗{last[1:-1]}┛')\n        return '\\n'.join(out)\n    def from_unicode():\n        out = []\n        for line in lines:\n            line = line.translate(str.maketrans('┏┓┗┛┠┼┨┯┷━─┃│', '+++++++++--||'))\n            line = line.replace(' ✓ ', 'yes')\n            out.append(line)\n        return '\\n'.join(out)\n    if lines[0][0] == '+':\n        return from_ascii()\n    return from_unicode()\n\nif __name__ == '__main__':\n    input_lines = []\n    try:\n        while True:\n            input_lines.append(input())\n    except EOFError:\n        pass\n    print(convert_table(input_lines))\n\n"
  },
  {
    "path": "web/covid_cases.js",
    "content": "\nwindow.PLOTLYENV=window.PLOTLYENV || {};\n    \nif (document.getElementById(\"e23ccacc-a456-478b-b467-7282a2165921\")) {\n    Plotly.newPlot(\n        'e23ccacc-a456-478b-b467-7282a2165921',\n        {\n          \"data\": [\n            {\n              \"line\": {\n                \"color\": \"#EF553B\"\n              },\n              \"name\": \"Total Cases\",\n              \"x\": [\n                \"2020-02-23\",\n                \"2020-02-24\",\n                \"2020-02-25\",\n                \"2020-02-26\",\n                \"2020-02-27\",\n                \"2020-02-28\",\n                \"2020-02-29\",\n                \"2020-03-01\",\n                \"2020-03-02\",\n                \"2020-03-03\",\n                \"2020-03-04\",\n                \"2020-03-05\",\n                \"2020-03-06\",\n                \"2020-03-07\",\n                \"2020-03-08\",\n                \"2020-03-09\",\n                \"2020-03-10\",\n                \"2020-03-11\",\n                \"2020-03-12\",\n                \"2020-03-13\",\n                \"2020-03-14\",\n                \"2020-03-15\",\n                \"2020-03-16\",\n                \"2020-03-17\",\n                \"2020-03-18\",\n                \"2020-03-19\",\n                \"2020-03-20\",\n                \"2020-03-21\",\n                \"2020-03-22\",\n                \"2020-03-23\",\n                \"2020-03-24\",\n                \"2020-03-25\",\n                \"2020-03-26\",\n                \"2020-03-27\",\n                \"2020-03-28\",\n                \"2020-03-29\",\n                \"2020-03-30\",\n                \"2020-03-31\",\n                \"2020-04-01\",\n                \"2020-04-02\",\n                \"2020-04-03\",\n                \"2020-04-04\",\n                \"2020-04-05\",\n                \"2020-04-06\",\n                \"2020-04-07\",\n                \"2020-04-08\",\n                \"2020-04-09\",\n                \"2020-04-10\",\n                \"2020-04-11\",\n                \"2020-04-12\",\n                \"2020-04-13\",\n                \"2020-04-14\",\n                \"2020-04-15\",\n                \"2020-04-16\",\n                \"2020-04-17\",\n                \"2020-04-18\",\n                \"2020-04-19\",\n                \"2020-04-20\",\n                \"2020-04-21\",\n                \"2020-04-22\",\n                \"2020-04-23\",\n                \"2020-04-24\",\n                \"2020-04-25\",\n                \"2020-04-26\",\n                \"2020-04-27\",\n                \"2020-04-28\",\n                \"2020-04-29\",\n                \"2020-04-30\",\n                \"2020-05-01\",\n                \"2020-05-02\",\n                \"2020-05-03\",\n                \"2020-05-04\",\n                \"2020-05-05\",\n                \"2020-05-06\",\n                \"2020-05-07\",\n                \"2020-05-08\",\n                \"2020-05-09\",\n                \"2020-05-10\",\n                \"2020-05-11\",\n                \"2020-05-12\",\n                \"2020-05-13\",\n                \"2020-05-14\",\n                \"2020-05-15\",\n                \"2020-05-16\",\n                \"2020-05-17\",\n                \"2020-05-18\",\n                \"2020-05-19\",\n                \"2020-05-20\",\n                \"2020-05-21\",\n                \"2020-05-22\",\n                \"2020-05-23\",\n                \"2020-05-24\",\n                \"2020-05-25\",\n                \"2020-05-26\",\n                \"2020-05-27\",\n                \"2020-05-28\",\n                \"2020-05-29\",\n                \"2020-05-30\",\n                \"2020-05-31\",\n                \"2020-06-01\",\n                \"2020-06-02\",\n                \"2020-06-03\",\n                \"2020-06-04\",\n                \"2020-06-05\",\n                \"2020-06-06\",\n                \"2020-06-07\",\n                \"2020-06-08\",\n                \"2020-06-09\",\n                \"2020-06-10\",\n                \"2020-06-11\",\n                \"2020-06-12\",\n                \"2020-06-13\",\n                \"2020-06-14\",\n                \"2020-06-15\",\n                \"2020-06-16\",\n                \"2020-06-17\",\n                \"2020-06-18\",\n                \"2020-06-19\",\n                \"2020-06-20\",\n                \"2020-06-21\",\n                \"2020-06-22\",\n                \"2020-06-23\",\n                \"2020-06-24\",\n                \"2020-06-25\",\n                \"2020-06-26\",\n                \"2020-06-27\",\n                \"2020-06-28\",\n                \"2020-06-29\",\n                \"2020-06-30\",\n                \"2020-07-01\",\n                \"2020-07-02\",\n                \"2020-07-03\",\n                \"2020-07-04\",\n                \"2020-07-05\",\n                \"2020-07-06\",\n                \"2020-07-07\",\n                \"2020-07-08\",\n                \"2020-07-09\",\n                \"2020-07-10\",\n                \"2020-07-11\",\n                \"2020-07-12\",\n                \"2020-07-13\",\n                \"2020-07-14\",\n                \"2020-07-15\",\n                \"2020-07-16\",\n                \"2020-07-17\",\n                \"2020-07-18\",\n                \"2020-07-19\",\n                \"2020-07-20\",\n                \"2020-07-21\",\n                \"2020-07-22\",\n                \"2020-07-23\",\n                \"2020-07-24\",\n                \"2020-07-25\",\n                \"2020-07-26\",\n                \"2020-07-27\",\n                \"2020-07-28\",\n                \"2020-07-29\",\n                \"2020-07-30\",\n                \"2020-07-31\",\n                \"2020-08-01\",\n                \"2020-08-02\",\n                \"2020-08-03\",\n                \"2020-08-04\",\n                \"2020-08-05\",\n                \"2020-08-06\",\n                \"2020-08-07\",\n                \"2020-08-08\",\n                \"2020-08-09\",\n                \"2020-08-10\",\n                \"2020-08-11\",\n                \"2020-08-12\",\n                \"2020-08-13\",\n                \"2020-08-14\",\n                \"2020-08-15\",\n                \"2020-08-16\",\n                \"2020-08-17\",\n                \"2020-08-18\",\n                \"2020-08-19\",\n                \"2020-08-20\",\n                \"2020-08-21\",\n                \"2020-08-22\",\n                \"2020-08-23\",\n                \"2020-08-24\",\n                \"2020-08-25\",\n                \"2020-08-26\",\n                \"2020-08-27\",\n                \"2020-08-28\",\n                \"2020-08-29\",\n                \"2020-08-30\",\n                \"2020-08-31\",\n                \"2020-09-01\",\n                \"2020-09-02\",\n                \"2020-09-03\",\n                \"2020-09-04\",\n                \"2020-09-05\",\n                \"2020-09-06\",\n                \"2020-09-07\",\n                \"2020-09-08\",\n                \"2020-09-09\",\n                \"2020-09-10\",\n                \"2020-09-11\",\n                \"2020-09-12\",\n                \"2020-09-13\",\n                \"2020-09-14\",\n                \"2020-09-15\",\n                \"2020-09-16\",\n                \"2020-09-17\",\n                \"2020-09-18\",\n                \"2020-09-19\",\n                \"2020-09-20\",\n                \"2020-09-21\",\n                \"2020-09-22\",\n                \"2020-09-23\",\n                \"2020-09-24\",\n                \"2020-09-25\",\n                \"2020-09-26\",\n                \"2020-09-27\",\n                \"2020-09-28\",\n                \"2020-09-29\",\n                \"2020-09-30\",\n                \"2020-10-01\",\n                \"2020-10-02\",\n                \"2020-10-03\",\n                \"2020-10-04\",\n                \"2020-10-05\",\n                \"2020-10-06\",\n                \"2020-10-07\",\n                \"2020-10-08\",\n                \"2020-10-09\",\n                \"2020-10-10\",\n                \"2020-10-11\",\n                \"2020-10-12\",\n                \"2020-10-13\",\n                \"2020-10-14\",\n                \"2020-10-15\",\n                \"2020-10-16\",\n                \"2020-10-17\",\n                \"2020-10-18\",\n                \"2020-10-19\",\n                \"2020-10-20\",\n                \"2020-10-21\",\n                \"2020-10-22\",\n                \"2020-10-23\",\n                \"2020-10-24\",\n                \"2020-10-25\",\n                \"2020-10-26\",\n                \"2020-10-27\",\n                \"2020-10-28\",\n                \"2020-10-29\",\n                \"2020-10-30\",\n                \"2020-10-31\",\n                \"2020-11-01\",\n                \"2020-11-02\",\n                \"2020-11-03\",\n                \"2020-11-04\",\n                \"2020-11-05\",\n                \"2020-11-06\",\n                \"2020-11-07\",\n                \"2020-11-08\",\n                \"2020-11-09\",\n                \"2020-11-10\",\n                \"2020-11-11\",\n                \"2020-11-12\",\n                \"2020-11-13\",\n                \"2020-11-14\",\n                \"2020-11-15\",\n                \"2020-11-16\",\n                \"2020-11-17\",\n                \"2020-11-18\",\n                \"2020-11-19\",\n                \"2020-11-20\",\n                \"2020-11-21\",\n                \"2020-11-22\",\n                \"2020-11-23\",\n                \"2020-11-24\",\n                \"2020-11-25\",\n                \"2020-11-26\",\n                \"2020-11-27\",\n                \"2020-11-28\",\n                \"2020-11-29\",\n                \"2020-11-30\",\n                \"2020-12-01\",\n                \"2020-12-02\",\n                \"2020-12-03\",\n                \"2020-12-04\",\n                \"2020-12-05\",\n                \"2020-12-06\",\n                \"2020-12-07\",\n                \"2020-12-08\",\n                \"2020-12-09\",\n                \"2020-12-10\",\n                \"2020-12-11\",\n                \"2020-12-12\",\n                \"2020-12-13\",\n                \"2020-12-14\",\n                \"2020-12-15\",\n                \"2020-12-16\",\n                \"2020-12-17\",\n                \"2020-12-18\",\n                \"2020-12-19\",\n                \"2020-12-20\",\n                \"2020-12-21\",\n                \"2020-12-22\",\n                \"2020-12-23\",\n                \"2020-12-24\",\n                \"2020-12-25\",\n                \"2020-12-26\",\n                \"2020-12-27\",\n                \"2020-12-28\",\n                \"2020-12-29\",\n                \"2020-12-30\",\n                \"2020-12-31\",\n                \"2021-01-01\",\n                \"2021-01-02\",\n                \"2021-01-03\",\n                \"2021-01-04\",\n                \"2021-01-05\",\n                \"2021-01-06\",\n                \"2021-01-07\",\n                \"2021-01-08\",\n                \"2021-01-09\",\n                \"2021-01-10\",\n                \"2021-01-11\",\n                \"2021-01-12\",\n                \"2021-01-13\",\n                \"2021-01-14\",\n                \"2021-01-15\",\n                \"2021-01-16\",\n                \"2021-01-17\",\n                \"2021-01-18\",\n                \"2021-01-19\",\n                \"2021-01-20\",\n                \"2021-01-21\",\n                \"2021-01-22\",\n                \"2021-01-23\",\n                \"2021-01-24\",\n                \"2021-01-25\",\n                \"2021-01-26\",\n                \"2021-01-27\",\n                \"2021-01-28\",\n                \"2021-01-29\",\n                \"2021-01-30\",\n                \"2021-01-31\",\n                \"2021-02-01\",\n                \"2021-02-02\",\n                \"2021-02-03\",\n                \"2021-02-04\",\n                \"2021-02-05\",\n                \"2021-02-06\",\n                \"2021-02-07\",\n                \"2021-02-08\",\n                \"2021-02-09\",\n                \"2021-02-10\",\n                \"2021-02-11\",\n                \"2021-02-12\",\n                \"2021-02-13\",\n                \"2021-02-14\",\n                \"2021-02-15\",\n                \"2021-02-16\",\n                \"2021-02-17\",\n                \"2021-02-18\",\n                \"2021-02-19\",\n                \"2021-02-20\",\n                \"2021-02-21\",\n                \"2021-02-22\",\n                \"2021-02-23\",\n                \"2021-02-24\",\n                \"2021-02-25\",\n                \"2021-02-26\",\n                \"2021-02-27\",\n                \"2021-02-28\",\n                \"2021-03-01\",\n                \"2021-03-02\",\n                \"2021-03-03\",\n                \"2021-03-04\",\n                \"2021-03-05\",\n                \"2021-03-06\",\n                \"2021-03-07\",\n                \"2021-03-08\",\n                \"2021-03-09\",\n                \"2021-03-10\",\n                \"2021-03-11\",\n                \"2021-03-12\",\n                \"2021-03-13\",\n                \"2021-03-14\",\n                \"2021-03-15\",\n                \"2021-03-16\",\n                \"2021-03-17\",\n                \"2021-03-18\",\n                \"2021-03-19\",\n                \"2021-03-20\",\n                \"2021-03-21\",\n                \"2021-03-22\",\n                \"2021-03-23\",\n                \"2021-03-24\",\n                \"2021-03-25\",\n                \"2021-03-26\",\n                \"2021-03-27\",\n                \"2021-03-28\",\n                \"2021-03-29\",\n                \"2021-03-30\",\n                \"2021-03-31\",\n                \"2021-04-01\",\n                \"2021-04-02\",\n                \"2021-04-03\",\n                \"2021-04-04\",\n                \"2021-04-05\",\n                \"2021-04-06\",\n                \"2021-04-07\",\n                \"2021-04-08\",\n                \"2021-04-09\",\n                \"2021-04-10\",\n                \"2021-04-11\",\n                \"2021-04-12\",\n                \"2021-04-13\",\n                \"2021-04-14\",\n                \"2021-04-15\",\n                \"2021-04-16\",\n                \"2021-04-17\",\n                \"2021-04-18\",\n                \"2021-04-19\",\n                \"2021-04-20\",\n                \"2021-04-21\",\n                \"2021-04-22\",\n                \"2021-04-23\",\n                \"2021-04-24\",\n                \"2021-04-25\",\n                \"2021-04-26\",\n                \"2021-04-27\",\n                \"2021-04-28\",\n                \"2021-04-29\",\n                \"2021-04-30\",\n                \"2021-05-01\",\n                \"2021-05-02\",\n                \"2021-05-03\",\n                \"2021-05-04\",\n                \"2021-05-05\",\n                \"2021-05-06\",\n                \"2021-05-07\",\n                \"2021-05-08\",\n                \"2021-05-09\",\n                \"2021-05-10\",\n                \"2021-05-11\",\n                \"2021-05-12\",\n                \"2021-05-13\",\n                \"2021-05-14\",\n                \"2021-05-15\",\n                \"2021-05-16\",\n                \"2021-05-17\",\n                \"2021-05-18\",\n                \"2021-05-19\",\n                \"2021-05-20\",\n                \"2021-05-21\",\n                \"2021-05-22\",\n                \"2021-05-23\",\n                \"2021-05-24\",\n                \"2021-05-25\",\n                \"2021-05-26\",\n                \"2021-05-27\",\n                \"2021-05-28\",\n                \"2021-05-29\",\n                \"2021-05-30\",\n                \"2021-05-31\",\n                \"2021-06-01\",\n                \"2021-06-02\",\n                \"2021-06-03\",\n                \"2021-06-04\",\n                \"2021-06-05\",\n                \"2021-06-06\",\n                \"2021-06-07\",\n                \"2021-06-08\",\n                \"2021-06-09\",\n                \"2021-06-10\",\n                \"2021-06-11\",\n                \"2021-06-12\",\n                \"2021-06-13\",\n                \"2021-06-14\",\n                \"2021-06-15\",\n                \"2021-06-16\",\n                \"2021-06-17\",\n                \"2021-06-18\",\n                \"2021-06-19\",\n                \"2021-06-20\",\n                \"2021-06-21\",\n                \"2021-06-22\",\n                \"2021-06-23\",\n                \"2021-06-24\",\n                \"2021-06-25\",\n                \"2021-06-26\",\n                \"2021-06-27\",\n                \"2021-06-28\",\n                \"2021-06-29\",\n                \"2021-06-30\",\n                \"2021-07-01\",\n                \"2021-07-02\",\n                \"2021-07-03\",\n                \"2021-07-04\",\n                \"2021-07-05\",\n                \"2021-07-06\",\n                \"2021-07-07\",\n                \"2021-07-08\",\n                \"2021-07-09\",\n                \"2021-07-10\",\n                \"2021-07-11\",\n                \"2021-07-12\",\n                \"2021-07-13\",\n                \"2021-07-14\",\n                \"2021-07-15\",\n                \"2021-07-16\",\n                \"2021-07-17\",\n                \"2021-07-18\",\n                \"2021-07-19\",\n                \"2021-07-20\",\n                \"2021-07-21\",\n                \"2021-07-22\",\n                \"2021-07-23\",\n                \"2021-07-24\",\n                \"2021-07-25\",\n                \"2021-07-26\",\n                \"2021-07-27\",\n                \"2021-07-28\",\n                \"2021-07-29\",\n                \"2021-07-30\",\n                \"2021-07-31\",\n                \"2021-08-01\",\n                \"2021-08-02\",\n                \"2021-08-03\",\n                \"2021-08-04\",\n                \"2021-08-05\",\n                \"2021-08-06\",\n                \"2021-08-07\",\n                \"2021-08-08\",\n                \"2021-08-09\",\n                \"2021-08-10\",\n                \"2021-08-11\",\n                \"2021-08-12\",\n                \"2021-08-13\",\n                \"2021-08-14\",\n                \"2021-08-15\",\n                \"2021-08-16\",\n                \"2021-08-17\",\n                \"2021-08-18\",\n                \"2021-08-19\",\n                \"2021-08-20\",\n                \"2021-08-21\",\n                \"2021-08-22\",\n                \"2021-08-23\",\n                \"2021-08-24\",\n                \"2021-08-25\",\n                \"2021-08-26\",\n                \"2021-08-27\",\n                \"2021-08-28\",\n                \"2021-08-29\",\n                \"2021-08-30\",\n                \"2021-08-31\",\n                \"2021-09-01\",\n                \"2021-09-02\",\n                \"2021-09-03\",\n                \"2021-09-04\",\n                \"2021-09-05\",\n                \"2021-09-06\",\n                \"2021-09-07\",\n                \"2021-09-08\",\n                \"2021-09-09\",\n                \"2021-09-10\",\n                \"2021-09-11\",\n                \"2021-09-12\",\n                \"2021-09-13\",\n                \"2021-09-14\",\n                \"2021-09-15\",\n                \"2021-09-16\",\n                \"2021-09-17\",\n                \"2021-09-18\",\n                \"2021-09-19\",\n                \"2021-09-20\",\n                \"2021-09-21\",\n                \"2021-09-22\",\n                \"2021-09-23\",\n                \"2021-09-24\",\n                \"2021-09-25\",\n                \"2021-09-26\",\n                \"2021-09-27\",\n                \"2021-09-28\",\n                \"2021-09-29\",\n                \"2021-09-30\",\n                \"2021-10-01\",\n                \"2021-10-02\",\n                \"2021-10-03\",\n                \"2021-10-04\",\n                \"2021-10-05\",\n                \"2021-10-06\",\n                \"2021-10-07\",\n                \"2021-10-08\",\n                \"2021-10-09\",\n                \"2021-10-10\",\n                \"2021-10-11\",\n                \"2021-10-12\",\n                \"2021-10-13\",\n                \"2021-10-14\",\n                \"2021-10-15\",\n                \"2021-10-16\",\n                \"2021-10-17\",\n                \"2021-10-18\",\n                \"2021-10-19\",\n                \"2021-10-20\",\n                \"2021-10-21\",\n                \"2021-10-22\",\n                \"2021-10-23\",\n                \"2021-10-24\",\n                \"2021-10-25\",\n                \"2021-10-26\",\n                \"2021-10-27\",\n                \"2021-10-28\",\n                \"2021-10-29\",\n                \"2021-10-30\",\n                \"2021-10-31\",\n                \"2021-11-01\",\n                \"2021-11-02\",\n                \"2021-11-03\",\n                \"2021-11-04\",\n                \"2021-11-05\",\n                \"2021-11-06\",\n                \"2021-11-07\",\n                \"2021-11-08\",\n                \"2021-11-09\",\n                \"2021-11-10\",\n                \"2021-11-11\",\n                \"2021-11-12\",\n                \"2021-11-13\",\n                \"2021-11-14\",\n                \"2021-11-15\",\n                \"2021-11-16\",\n                \"2021-11-17\",\n                \"2021-11-18\",\n                \"2021-11-19\",\n                \"2021-11-20\",\n                \"2021-11-21\",\n                \"2021-11-22\",\n                \"2021-11-23\",\n                \"2021-11-24\",\n                \"2021-11-25\",\n                \"2021-11-26\",\n                \"2021-11-27\",\n                \"2021-11-28\",\n                \"2021-11-29\",\n                \"2021-11-30\",\n                \"2021-12-01\",\n                \"2021-12-02\",\n                \"2021-12-03\",\n                \"2021-12-04\",\n                \"2021-12-05\",\n                \"2021-12-06\",\n                \"2021-12-07\",\n                \"2021-12-08\",\n                \"2021-12-09\",\n                \"2021-12-10\",\n                \"2021-12-11\",\n                \"2021-12-12\",\n                \"2021-12-13\",\n                \"2021-12-14\",\n                \"2021-12-15\",\n                \"2021-12-16\",\n                \"2021-12-17\",\n                \"2021-12-18\",\n                \"2021-12-19\",\n                \"2021-12-20\"\n              ],\n              \"y\": [\n                78982.0,\n                79550.0,\n                80404.0,\n                81381.0,\n                82740.0,\n                84128.0,\n                86022.0,\n                88400.0,\n                90379.0,\n                92980.0,\n                95282.0,\n                98100.0,\n                102016.0,\n                106113.0,\n                110051.0,\n                114232.0,\n                119055.0,\n                126714.0,\n                132513.0,\n                146864.0,\n                157962.0,\n                169241.0,\n                184034.0,\n                200039.0,\n                219585.0,\n                246683.0,\n                277564.0,\n                309679.0,\n                344821.0,\n                387488.0,\n                428574.0,\n                479663.0,\n                542525.0,\n                607435.0,\n                677100.0,\n                734000.0,\n                799279.0,\n                876098.0,\n                959012.0,\n                1041923.0,\n                1126238.0,\n                1185171.0,\n                1256277.0,\n                1330151.0,\n                1399552.0,\n                1482877.0,\n                1570233.0,\n                1655623.0,\n                1730100.0,\n                1849635.0,\n                1920621.0,\n                2004469.0,\n                2082629.0,\n                2178015.0,\n                2266210.0,\n                2343459.0,\n                2420285.0,\n                2495724.0,\n                2571680.0,\n                2653519.0,\n                2737032.0,\n                2820960.0,\n                2903927.0,\n                2975368.0,\n                3045572.0,\n                3121378.0,\n                3198365.0,\n                3281736.0,\n                3370333.0,\n                3449993.0,\n                3524895.0,\n                3602083.0,\n                3682186.0,\n                3772588.0,\n                3861478.0,\n                3952059.0,\n                4036214.0,\n                4111910.0,\n                4188263.0,\n                4272702.0,\n                4357656.0,\n                4453534.0,\n                4549685.0,\n                4643963.0,\n                4722390.0,\n                4811104.0,\n                4907901.0,\n                5010022.0,\n                5116701.0,\n                5223039.0,\n                5327488.0,\n                5422310.0,\n                5508898.0,\n                5601705.0,\n                5705241.0,\n                5823758.0,\n                5944873.0,\n                6081734.0,\n                6188465.0,\n                6284170.0,\n                6405878.0,\n                6520061.0,\n                6650903.0,\n                6781973.0,\n                6915861.0,\n                7028667.0,\n                7129889.0,\n                7254441.0,\n                7389761.0,\n                7527047.0,\n                7656260.0,\n                7791268.0,\n                7924004.0,\n                8042352.0,\n                8183997.0,\n                8328754.0,\n                8469435.0,\n                8649623.0,\n                8807276.0,\n                8936132.0,\n                9074333.0,\n                9241366.0,\n                9414277.0,\n                9592716.0,\n                9784448.0,\n                9963205.0,\n                10128231.0,\n                10281763.0,\n                10458102.0,\n                10675387.0,\n                10885111.0,\n                11087877.0,\n                11284866.0,\n                11468563.0,\n                11632147.0,\n                11841875.0,\n                12055676.0,\n                12280599.0,\n                12513292.0,\n                12731078.0,\n                12925590.0,\n                13115565.0,\n                13336359.0,\n                13567328.0,\n                13819200.0,\n                14061993.0,\n                14299274.0,\n                14513690.0,\n                14719050.0,\n                14953642.0,\n                15233479.0,\n                15516190.0,\n                15798092.0,\n                16054210.0,\n                16268583.0,\n                16494404.0,\n                16744398.0,\n                17032640.0,\n                17312908.0,\n                17603693.0,\n                17855082.0,\n                18086471.0,\n                18292702.0,\n                18546826.0,\n                18824845.0,\n                19107849.0,\n                19391842.0,\n                19651494.0,\n                19878530.0,\n                20102018.0,\n                20364286.0,\n                20637694.0,\n                20927109.0,\n                21230510.0,\n                21481009.0,\n                21696390.0,\n                21902985.0,\n                22159127.0,\n                22435555.0,\n                22708757.0,\n                22969939.0,\n                23235515.0,\n                23442080.0,\n                23665636.0,\n                23910255.0,\n                24192561.0,\n                24477400.0,\n                24760761.0,\n                25026075.0,\n                25247621.0,\n                25507708.0,\n                25773751.0,\n                26056880.0,\n                26338480.0,\n                26652804.0,\n                26923244.0,\n                27153603.0,\n                27371786.0,\n                27612309.0,\n                27897617.0,\n                28197446.0,\n                28519172.0,\n                28806425.0,\n                29049361.0,\n                29311882.0,\n                29597281.0,\n                29901759.0,\n                30216605.0,\n                30542646.0,\n                30835407.0,\n                31088072.0,\n                31362678.0,\n                31647530.0,\n                31923532.0,\n                32277162.0,\n                32608418.0,\n                32897340.0,\n                33149335.0,\n                33403487.0,\n                33686356.0,\n                34012407.0,\n                34331133.0,\n                34629300.0,\n                34963530.0,\n                35223828.0,\n                35523271.0,\n                35849375.0,\n                36200620.0,\n                36562261.0,\n                36923518.0,\n                37281246.0,\n                37569264.0,\n                37860857.0,\n                38179108.0,\n                38560887.0,\n                38968266.0,\n                39380081.0,\n                39754819.0,\n                40071574.0,\n                40457800.0,\n                40846760.0,\n                41291515.0,\n                41763957.0,\n                42261626.0,\n                42719395.0,\n                43080668.0,\n                43565773.0,\n                44036488.0,\n                44548606.0,\n                45099299.0,\n                45671436.0,\n                46149712.0,\n                46613903.0,\n                47175195.0,\n                47731171.0,\n                48242555.0,\n                48839880.0,\n                49484835.0,\n                50086710.0,\n                50571432.0,\n                51070532.0,\n                51630860.0,\n                52282541.0,\n                52928985.0,\n                53582066.0,\n                54181625.0,\n                54657132.0,\n                55187672.0,\n                55799421.0,\n                56426867.0,\n                57081330.0,\n                57754077.0,\n                58345034.0,\n                58833226.0,\n                59355769.0,\n                59948912.0,\n                60587932.0,\n                61177148.0,\n                61859969.0,\n                62450021.0,\n                62939637.0,\n                63443499.0,\n                64063456.0,\n                64718440.0,\n                65415055.0,\n                66102868.0,\n                66752177.0,\n                67289500.0,\n                67804925.0,\n                68457269.0,\n                69129268.0,\n                70632838.0,\n                71341418.0,\n                71983206.0,\n                72513354.0,\n                73045112.0,\n                73697625.0,\n                74429582.0,\n                75171100.0,\n                75892701.0,\n                76517707.0,\n                77049860.0,\n                77590173.0,\n                78251816.0,\n                78948087.0,\n                79630256.0,\n                80110656.0,\n                80618354.0,\n                81051486.0,\n                81539629.0,\n                82212045.0,\n                82952755.0,\n                83730242.0,\n                84296867.0,\n                84902505.0,\n                85425466.0,\n                85975763.0,\n                86719562.0,\n                87510891.0,\n                88403612.0,\n                89220573.0,\n                89983425.0,\n                90574092.0,\n                91190679.0,\n                91891746.0,\n                92642919.0,\n                93403037.0,\n                94176533.0,\n                94824497.0,\n                95353518.0,\n                95867571.0,\n                96467235.0,\n                97164971.0,\n                97822462.0,\n                98483137.0,\n                99058210.0,\n                99516952.0,\n                100008166.0,\n                100564566.0,\n                101166796.0,\n                101781298.0,\n                102373122.0,\n                102894461.0,\n                103284132.0,\n                103728056.0,\n                104188170.0,\n                104715384.0,\n                105184805.0,\n                105720559.0,\n                106102332.0,\n                106508124.0,\n                106821888.0,\n                107252708.0,\n                107692052.0,\n                108136985.0,\n                108568533.0,\n                108946749.0,\n                109246808.0,\n                109533219.0,\n                109883548.0,\n                110281439.0,\n                110689338.0,\n                111103552.0,\n                111479381.0,\n                111800108.0,\n                112089864.0,\n                112481920.0,\n                112930072.0,\n                113381115.0,\n                113828089.0,\n                114222134.0,\n                114531134.0,\n                114835928.0,\n                115149390.0,\n                115593029.0,\n                116049356.0,\n                116499237.0,\n                116914405.0,\n                117287042.0,\n                117587330.0,\n                118002811.0,\n                118472219.0,\n                118951407.0,\n                119443197.0,\n                119900239.0,\n                120264658.0,\n                120613636.0,\n                121081197.0,\n                121632799.0,\n                122176702.0,\n                122741070.0,\n                123242578.0,\n                123679492.0,\n                124095806.0,\n                124611671.0,\n                125247138.0,\n                125900529.0,\n                126543456.0,\n                127129279.0,\n                127604710.0,\n                128062333.0,\n                128632321.0,\n                129317020.0,\n                130030677.0,\n                130667220.0,\n                131198894.0,\n                131754989.0,\n                132240747.0,\n                132846225.0,\n                133532336.0,\n                134373383.0,\n                135124143.0,\n                135792465.0,\n                136484798.0,\n                137098661.0,\n                137880192.0,\n                138696667.0,\n                139513781.0,\n                140371957.0,\n                141159967.0,\n                141846978.0,\n                142540040.0,\n                143394294.0,\n                144285880.0,\n                145185608.0,\n                146089862.0,\n                146912391.0,\n                147637518.0,\n                148319203.0,\n                149164564.0,\n                150072853.0,\n                150969915.0,\n                151850425.0,\n                152649158.0,\n                153324777.0,\n                154004283.0,\n                154812510.0,\n                155655358.0,\n                156525825.0,\n                157359303.0,\n                158146533.0,\n                158789066.0,\n                159408136.0,\n                160147581.0,\n                160908215.0,\n                161634056.0,\n                162352104.0,\n                162981424.0,\n                163530981.0,\n                164069867.0,\n                164692914.0,\n                165365336.0,\n                165645140.0,\n                166271771.0,\n                166851175.0,\n                167328452.0,\n                167780943.0,\n                168313798.0,\n                168883478.0,\n                169437807.0,\n                169938407.0,\n                170420732.0,\n                170812584.0,\n                171191420.0,\n                171654455.0,\n                172140687.0,\n                172630119.0,\n                173049855.0,\n                173449127.0,\n                173772425.0,\n                174093017.0,\n                174460244.0,\n                174880185.0,\n                175329896.0,\n                175750893.0,\n                176123749.0,\n                176427425.0,\n                176734807.0,\n                177106163.0,\n                177504878.0,\n                177897425.0,\n                178304313.0,\n                178653814.0,\n                178956210.0,\n                179249893.0,\n                179621721.0,\n                180059523.0,\n                180464448.0,\n                180886396.0,\n                181252433.0,\n                181563922.0,\n                181892266.0,\n                182271926.0,\n                182668927.0,\n                183109913.0,\n                183551185.0,\n                183927886.0,\n                184256405.0,\n                184625974.0,\n                185079412.0,\n                185542867.0,\n                186023223.0,\n                186530747.0,\n                186957804.0,\n                187328331.0,\n                187765023.0,\n                188285012.0,\n                188826481.0,\n                189398611.0,\n                189996899.0,\n                190470888.0,\n                190901907.0,\n                191398436.0,\n                191928383.0,\n                192487199.0,\n                193051598.0,\n                193780704.0,\n                194213638.0,\n                194658931.0,\n                195199303.0,\n                195809545.0,\n                196453856.0,\n                197106728.0,\n                197837028.0,\n                198347196.0,\n                198828497.0,\n                199406570.0,\n                200043981.0,\n                200719384.0,\n                201408323.0,\n                202230140.0,\n                202781068.0,\n                203222660.0,\n                203876492.0,\n                204525143.0,\n                205253670.0,\n                205964459.0,\n                206770170.0,\n                207304114.0,\n                207768135.0,\n                208446764.0,\n                209129842.0,\n                209858086.0,\n                210573753.0,\n                211363890.0,\n                211904096.0,\n                212350600.0,\n                213055084.0,\n                213742017.0,\n                214472351.0,\n                215208044.0,\n                215953778.0,\n                216501179.0,\n                216947753.0,\n                217634296.0,\n                218253486.0,\n                218980831.0,\n                219657848.0,\n                220375966.0,\n                220860684.0,\n                221300758.0,\n                221741269.0,\n                222466792.0,\n                223098493.0,\n                223736117.0,\n                224370105.0,\n                224826673.0,\n                225194926.0,\n                225796212.0,\n                226347579.0,\n                226915540.0,\n                227492096.0,\n                228085640.0,\n                228622696.0,\n                228983541.0,\n                229517614.0,\n                229986792.0,\n                230524963.0,\n                231036682.0,\n                231584263.0,\n                231951420.0,\n                232299752.0,\n                232772401.0,\n                233221863.0,\n                233724662.0,\n                234209428.0,\n                234748844.0,\n                235095500.0,\n                235401898.0,\n                235846427.0,\n                236266601.0,\n                236779559.0,\n                237212399.0,\n                237686871.0,\n                238019126.0,\n                238334055.0,\n                238716044.0,\n                239149353.0,\n                239612689.0,\n                240057253.0,\n                240514330.0,\n                240851606.0,\n                241164896.0,\n                241579658.0,\n                242021811.0,\n                242493015.0,\n                242949994.0,\n                243435643.0,\n                243795938.0,\n                244112020.0,\n                244543034.0,\n                244985800.0,\n                245498281.0,\n                245957361.0,\n                246462172.0,\n                246844135.0,\n                247164991.0,\n                247588056.0,\n                248017573.0,\n                248538786.0,\n                249066568.0,\n                249581899.0,\n                249996336.0,\n                250343524.0,\n                250822035.0,\n                251305151.0,\n                251879578.0,\n                252395690.0,\n                252990380.0,\n                253419091.0,\n                253770860.0,\n                254315828.0,\n                254837932.0,\n                255463123.0,\n                256078002.0,\n                256693733.0,\n                257170715.0,\n                257567185.0,\n                258192192.0,\n                258800096.0,\n                259472161.0,\n                260068316.0,\n                260663487.0,\n                261114328.0,\n                261520513.0,\n                262187526.0,\n                262812593.0,\n                263519456.0,\n                264220810.0,\n                264934820.0,\n                265441904.0,\n                265878644.0,\n                266472295.0,\n                267163771.0,\n                267835264.0,\n                268562192.0,\n                269250749.0,\n                269739491.0,\n                270171572.0,\n                270798369.0,\n                271472489.0,\n                272209108.0,\n                272943228.0,\n                273667294.0,\n                274233961.0,\n                274702744.0,\n                275466533.0\n              ],\n              \"yaxis\": \"y\",\n              \"type\": \"scatter\"\n            },\n            {\n              \"line\": {\n                \"color\": \"#636efa\"\n              },\n              \"name\": \"Bitcoin\",\n              \"x\": [\n                \"2020-02-23\",\n                \"2020-02-24\",\n                \"2020-02-25\",\n                \"2020-02-26\",\n                \"2020-02-27\",\n                \"2020-02-28\",\n                \"2020-02-29\",\n                \"2020-03-01\",\n                \"2020-03-02\",\n                \"2020-03-03\",\n                \"2020-03-04\",\n                \"2020-03-05\",\n                \"2020-03-06\",\n                \"2020-03-07\",\n                \"2020-03-08\",\n                \"2020-03-09\",\n                \"2020-03-10\",\n                \"2020-03-11\",\n                \"2020-03-12\",\n                \"2020-03-13\",\n                \"2020-03-14\",\n                \"2020-03-15\",\n                \"2020-03-16\",\n                \"2020-03-17\",\n                \"2020-03-18\",\n                \"2020-03-19\",\n                \"2020-03-20\",\n                \"2020-03-21\",\n                \"2020-03-22\",\n                \"2020-03-23\",\n                \"2020-03-24\",\n                \"2020-03-25\",\n                \"2020-03-26\",\n                \"2020-03-27\",\n                \"2020-03-28\",\n                \"2020-03-29\",\n                \"2020-03-30\",\n                \"2020-03-31\",\n                \"2020-04-01\",\n                \"2020-04-02\",\n                \"2020-04-03\",\n                \"2020-04-04\",\n                \"2020-04-05\",\n                \"2020-04-06\",\n                \"2020-04-07\",\n                \"2020-04-08\",\n                \"2020-04-09\",\n                \"2020-04-10\",\n                \"2020-04-11\",\n                \"2020-04-12\",\n                \"2020-04-13\",\n                \"2020-04-14\",\n                \"2020-04-15\",\n                \"2020-04-16\",\n                \"2020-04-17\",\n                \"2020-04-18\",\n                \"2020-04-19\",\n                \"2020-04-20\",\n                \"2020-04-21\",\n                \"2020-04-22\",\n                \"2020-04-23\",\n                \"2020-04-24\",\n                \"2020-04-25\",\n                \"2020-04-26\",\n                \"2020-04-27\",\n                \"2020-04-28\",\n                \"2020-04-29\",\n                \"2020-04-30\",\n                \"2020-05-01\",\n                \"2020-05-02\",\n                \"2020-05-03\",\n                \"2020-05-04\",\n                \"2020-05-05\",\n                \"2020-05-06\",\n                \"2020-05-07\",\n                \"2020-05-08\",\n                \"2020-05-09\",\n                \"2020-05-10\",\n                \"2020-05-11\",\n                \"2020-05-12\",\n                \"2020-05-13\",\n                \"2020-05-14\",\n                \"2020-05-15\",\n                \"2020-05-16\",\n                \"2020-05-17\",\n                \"2020-05-18\",\n                \"2020-05-19\",\n                \"2020-05-20\",\n                \"2020-05-21\",\n                \"2020-05-22\",\n                \"2020-05-23\",\n                \"2020-05-24\",\n                \"2020-05-25\",\n                \"2020-05-26\",\n                \"2020-05-27\",\n                \"2020-05-28\",\n                \"2020-05-29\",\n                \"2020-05-30\",\n                \"2020-05-31\",\n                \"2020-06-01\",\n                \"2020-06-02\",\n                \"2020-06-03\",\n                \"2020-06-04\",\n                \"2020-06-05\",\n                \"2020-06-06\",\n                \"2020-06-07\",\n                \"2020-06-08\",\n                \"2020-06-09\",\n                \"2020-06-10\",\n                \"2020-06-11\",\n                \"2020-06-12\",\n                \"2020-06-13\",\n                \"2020-06-14\",\n                \"2020-06-15\",\n                \"2020-06-16\",\n                \"2020-06-17\",\n                \"2020-06-18\",\n                \"2020-06-19\",\n                \"2020-06-20\",\n                \"2020-06-21\",\n                \"2020-06-22\",\n                \"2020-06-23\",\n                \"2020-06-24\",\n                \"2020-06-25\",\n                \"2020-06-26\",\n                \"2020-06-27\",\n                \"2020-06-28\",\n                \"2020-06-29\",\n                \"2020-06-30\",\n                \"2020-07-01\",\n                \"2020-07-02\",\n                \"2020-07-03\",\n                \"2020-07-04\",\n                \"2020-07-05\",\n                \"2020-07-06\",\n                \"2020-07-07\",\n                \"2020-07-08\",\n                \"2020-07-09\",\n                \"2020-07-10\",\n                \"2020-07-11\",\n                \"2020-07-12\",\n                \"2020-07-13\",\n                \"2020-07-14\",\n                \"2020-07-15\",\n                \"2020-07-16\",\n                \"2020-07-17\",\n                \"2020-07-18\",\n                \"2020-07-19\",\n                \"2020-07-20\",\n                \"2020-07-21\",\n                \"2020-07-22\",\n                \"2020-07-23\",\n                \"2020-07-24\",\n                \"2020-07-25\",\n                \"2020-07-26\",\n                \"2020-07-27\",\n                \"2020-07-28\",\n                \"2020-07-29\",\n                \"2020-07-30\",\n                \"2020-07-31\",\n                \"2020-08-01\",\n                \"2020-08-02\",\n                \"2020-08-03\",\n                \"2020-08-04\",\n                \"2020-08-05\",\n                \"2020-08-06\",\n                \"2020-08-07\",\n                \"2020-08-08\",\n                \"2020-08-09\",\n                \"2020-08-10\",\n                \"2020-08-11\",\n                \"2020-08-12\",\n                \"2020-08-13\",\n                \"2020-08-14\",\n                \"2020-08-15\",\n                \"2020-08-16\",\n                \"2020-08-17\",\n                \"2020-08-18\",\n                \"2020-08-19\",\n                \"2020-08-20\",\n                \"2020-08-21\",\n                \"2020-08-22\",\n                \"2020-08-23\",\n                \"2020-08-24\",\n                \"2020-08-25\",\n                \"2020-08-26\",\n                \"2020-08-27\",\n                \"2020-08-28\",\n                \"2020-08-29\",\n                \"2020-08-30\",\n                \"2020-08-31\",\n                \"2020-09-01\",\n                \"2020-09-02\",\n                \"2020-09-03\",\n                \"2020-09-04\",\n                \"2020-09-05\",\n                \"2020-09-06\",\n                \"2020-09-07\",\n                \"2020-09-08\",\n                \"2020-09-09\",\n                \"2020-09-10\",\n                \"2020-09-11\",\n                \"2020-09-12\",\n                \"2020-09-13\",\n                \"2020-09-14\",\n                \"2020-09-15\",\n                \"2020-09-16\",\n                \"2020-09-17\",\n                \"2020-09-18\",\n                \"2020-09-19\",\n                \"2020-09-20\",\n                \"2020-09-21\",\n                \"2020-09-22\",\n                \"2020-09-23\",\n                \"2020-09-24\",\n                \"2020-09-25\",\n                \"2020-09-26\",\n                \"2020-09-27\",\n                \"2020-09-28\",\n                \"2020-09-29\",\n                \"2020-09-30\",\n                \"2020-10-01\",\n                \"2020-10-02\",\n                \"2020-10-03\",\n                \"2020-10-04\",\n                \"2020-10-05\",\n                \"2020-10-06\",\n                \"2020-10-07\",\n                \"2020-10-08\",\n                \"2020-10-09\",\n                \"2020-10-10\",\n                \"2020-10-11\",\n                \"2020-10-12\",\n                \"2020-10-13\",\n                \"2020-10-14\",\n                \"2020-10-15\",\n                \"2020-10-16\",\n                \"2020-10-17\",\n                \"2020-10-18\",\n                \"2020-10-19\",\n                \"2020-10-20\",\n                \"2020-10-21\",\n                \"2020-10-22\",\n                \"2020-10-23\",\n                \"2020-10-24\",\n                \"2020-10-25\",\n                \"2020-10-26\",\n                \"2020-10-27\",\n                \"2020-10-28\",\n                \"2020-10-29\",\n                \"2020-10-30\",\n                \"2020-10-31\",\n                \"2020-11-01\",\n                \"2020-11-02\",\n                \"2020-11-03\",\n                \"2020-11-04\",\n                \"2020-11-05\",\n                \"2020-11-06\",\n                \"2020-11-07\",\n                \"2020-11-08\",\n                \"2020-11-09\",\n                \"2020-11-10\",\n                \"2020-11-11\",\n                \"2020-11-12\",\n                \"2020-11-13\",\n                \"2020-11-14\",\n                \"2020-11-15\",\n                \"2020-11-16\",\n                \"2020-11-17\",\n                \"2020-11-18\",\n                \"2020-11-19\",\n                \"2020-11-20\",\n                \"2020-11-21\",\n                \"2020-11-22\",\n                \"2020-11-23\",\n                \"2020-11-24\",\n                \"2020-11-25\",\n                \"2020-11-26\",\n                \"2020-11-27\",\n                \"2020-11-28\",\n                \"2020-11-29\",\n                \"2020-11-30\",\n                \"2020-12-01\",\n                \"2020-12-02\",\n                \"2020-12-03\",\n                \"2020-12-04\",\n                \"2020-12-05\",\n                \"2020-12-06\",\n                \"2020-12-07\",\n                \"2020-12-08\",\n                \"2020-12-09\",\n                \"2020-12-10\",\n                \"2020-12-11\",\n                \"2020-12-12\",\n                \"2020-12-13\",\n                \"2020-12-14\",\n                \"2020-12-15\",\n                \"2020-12-16\",\n                \"2020-12-17\",\n                \"2020-12-18\",\n                \"2020-12-19\",\n                \"2020-12-20\",\n                \"2020-12-21\",\n                \"2020-12-22\",\n                \"2020-12-23\",\n                \"2020-12-24\",\n                \"2020-12-25\",\n                \"2020-12-26\",\n                \"2020-12-27\",\n                \"2020-12-28\",\n                \"2020-12-29\",\n                \"2020-12-30\",\n                \"2020-12-31\",\n                \"2021-01-01\",\n                \"2021-01-02\",\n                \"2021-01-03\",\n                \"2021-01-04\",\n                \"2021-01-05\",\n                \"2021-01-06\",\n                \"2021-01-07\",\n                \"2021-01-08\",\n                \"2021-01-09\",\n                \"2021-01-10\",\n                \"2021-01-11\",\n                \"2021-01-12\",\n                \"2021-01-13\",\n                \"2021-01-14\",\n                \"2021-01-15\",\n                \"2021-01-16\",\n                \"2021-01-17\",\n                \"2021-01-18\",\n                \"2021-01-19\",\n                \"2021-01-20\",\n                \"2021-01-21\",\n                \"2021-01-22\",\n                \"2021-01-23\",\n                \"2021-01-24\",\n                \"2021-01-25\",\n                \"2021-01-26\",\n                \"2021-01-27\",\n                \"2021-01-28\",\n                \"2021-01-29\",\n                \"2021-01-30\",\n                \"2021-01-31\",\n                \"2021-02-01\",\n                \"2021-02-02\",\n                \"2021-02-03\",\n                \"2021-02-04\",\n                \"2021-02-05\",\n                \"2021-02-06\",\n                \"2021-02-07\",\n                \"2021-02-08\",\n                \"2021-02-09\",\n                \"2021-02-10\",\n                \"2021-02-11\",\n                \"2021-02-12\",\n                \"2021-02-13\",\n                \"2021-02-14\",\n                \"2021-02-15\",\n                \"2021-02-16\",\n                \"2021-02-17\",\n                \"2021-02-18\",\n                \"2021-02-19\",\n                \"2021-02-20\",\n                \"2021-02-21\",\n                \"2021-02-22\",\n                \"2021-02-23\",\n                \"2021-02-24\",\n                \"2021-02-25\",\n                \"2021-02-26\",\n                \"2021-02-27\",\n                \"2021-02-28\",\n                \"2021-03-01\",\n                \"2021-03-02\",\n                \"2021-03-03\",\n                \"2021-03-04\",\n                \"2021-03-05\",\n                \"2021-03-06\",\n                \"2021-03-07\",\n                \"2021-03-08\",\n                \"2021-03-09\",\n                \"2021-03-10\",\n                \"2021-03-11\",\n                \"2021-03-12\",\n                \"2021-03-13\",\n                \"2021-03-14\",\n                \"2021-03-15\",\n                \"2021-03-16\",\n                \"2021-03-17\",\n                \"2021-03-18\",\n                \"2021-03-19\",\n                \"2021-03-20\",\n                \"2021-03-21\",\n                \"2021-03-22\",\n                \"2021-03-23\",\n                \"2021-03-24\",\n                \"2021-03-25\",\n                \"2021-03-26\",\n                \"2021-03-27\",\n                \"2021-03-28\",\n                \"2021-03-29\",\n                \"2021-03-30\",\n                \"2021-03-31\",\n                \"2021-04-01\",\n                \"2021-04-02\",\n                \"2021-04-03\",\n                \"2021-04-04\",\n                \"2021-04-05\",\n                \"2021-04-06\",\n                \"2021-04-07\",\n                \"2021-04-08\",\n                \"2021-04-09\",\n                \"2021-04-10\",\n                \"2021-04-11\",\n                \"2021-04-12\",\n                \"2021-04-13\",\n                \"2021-04-14\",\n                \"2021-04-15\",\n                \"2021-04-16\",\n                \"2021-04-17\",\n                \"2021-04-18\",\n                \"2021-04-19\",\n                \"2021-04-20\",\n                \"2021-04-21\",\n                \"2021-04-22\",\n                \"2021-04-23\",\n                \"2021-04-24\",\n                \"2021-04-25\",\n                \"2021-04-26\",\n                \"2021-04-27\",\n                \"2021-04-28\",\n                \"2021-04-29\",\n                \"2021-04-30\",\n                \"2021-05-01\",\n                \"2021-05-02\",\n                \"2021-05-03\",\n                \"2021-05-04\",\n                \"2021-05-05\",\n                \"2021-05-06\",\n                \"2021-05-07\",\n                \"2021-05-08\",\n                \"2021-05-09\",\n                \"2021-05-10\",\n                \"2021-05-11\",\n                \"2021-05-12\",\n                \"2021-05-13\",\n                \"2021-05-14\",\n                \"2021-05-15\",\n                \"2021-05-16\",\n                \"2021-05-17\",\n                \"2021-05-18\",\n                \"2021-05-19\",\n                \"2021-05-20\",\n                \"2021-05-21\",\n                \"2021-05-22\",\n                \"2021-05-23\",\n                \"2021-05-24\",\n                \"2021-05-25\",\n                \"2021-05-26\",\n                \"2021-05-27\",\n                \"2021-05-28\",\n                \"2021-05-29\",\n                \"2021-05-30\",\n                \"2021-05-31\",\n                \"2021-06-01\",\n                \"2021-06-02\",\n                \"2021-06-03\",\n                \"2021-06-04\",\n                \"2021-06-05\",\n                \"2021-06-06\",\n                \"2021-06-07\",\n                \"2021-06-08\",\n                \"2021-06-09\",\n                \"2021-06-10\",\n                \"2021-06-11\",\n                \"2021-06-12\",\n                \"2021-06-13\",\n                \"2021-06-14\",\n                \"2021-06-15\",\n                \"2021-06-16\",\n                \"2021-06-17\",\n                \"2021-06-18\",\n                \"2021-06-19\",\n                \"2021-06-20\",\n                \"2021-06-21\",\n                \"2021-06-22\",\n                \"2021-06-23\",\n                \"2021-06-24\",\n                \"2021-06-25\",\n                \"2021-06-26\",\n                \"2021-06-27\",\n                \"2021-06-28\",\n                \"2021-06-29\",\n                \"2021-06-30\",\n                \"2021-07-01\",\n                \"2021-07-02\",\n                \"2021-07-03\",\n                \"2021-07-04\",\n                \"2021-07-05\",\n                \"2021-07-06\",\n                \"2021-07-07\",\n                \"2021-07-08\",\n                \"2021-07-09\",\n                \"2021-07-10\",\n                \"2021-07-11\",\n                \"2021-07-12\",\n                \"2021-07-13\",\n                \"2021-07-14\",\n                \"2021-07-15\",\n                \"2021-07-16\",\n                \"2021-07-17\",\n                \"2021-07-18\",\n                \"2021-07-19\",\n                \"2021-07-20\",\n                \"2021-07-21\",\n                \"2021-07-22\",\n                \"2021-07-23\",\n                \"2021-07-24\",\n                \"2021-07-25\",\n                \"2021-07-26\",\n                \"2021-07-27\",\n                \"2021-07-28\",\n                \"2021-07-29\",\n                \"2021-07-30\",\n                \"2021-07-31\",\n                \"2021-08-01\",\n                \"2021-08-02\",\n                \"2021-08-03\",\n                \"2021-08-04\",\n                \"2021-08-05\",\n                \"2021-08-06\",\n                \"2021-08-07\",\n                \"2021-08-08\",\n                \"2021-08-09\",\n                \"2021-08-10\",\n                \"2021-08-11\",\n                \"2021-08-12\",\n                \"2021-08-13\",\n                \"2021-08-14\",\n                \"2021-08-15\",\n                \"2021-08-16\",\n                \"2021-08-17\",\n                \"2021-08-18\",\n                \"2021-08-19\",\n                \"2021-08-20\",\n                \"2021-08-21\",\n                \"2021-08-22\",\n                \"2021-08-23\",\n                \"2021-08-24\",\n                \"2021-08-25\",\n                \"2021-08-26\",\n                \"2021-08-27\",\n                \"2021-08-28\",\n                \"2021-08-29\",\n                \"2021-08-30\",\n                \"2021-08-31\",\n                \"2021-09-01\",\n                \"2021-09-02\",\n                \"2021-09-03\",\n                \"2021-09-04\",\n                \"2021-09-05\",\n                \"2021-09-06\",\n                \"2021-09-07\",\n                \"2021-09-08\",\n                \"2021-09-09\",\n                \"2021-09-10\",\n                \"2021-09-11\",\n                \"2021-09-12\",\n                \"2021-09-13\",\n                \"2021-09-14\",\n                \"2021-09-15\",\n                \"2021-09-16\",\n                \"2021-09-17\",\n                \"2021-09-18\",\n                \"2021-09-19\",\n                \"2021-09-20\",\n                \"2021-09-21\",\n                \"2021-09-22\",\n                \"2021-09-23\",\n                \"2021-09-24\",\n                \"2021-09-25\",\n                \"2021-09-26\",\n                \"2021-09-27\",\n                \"2021-09-28\",\n                \"2021-09-29\",\n                \"2021-09-30\",\n                \"2021-10-01\",\n                \"2021-10-02\",\n                \"2021-10-03\",\n                \"2021-10-04\",\n                \"2021-10-05\",\n                \"2021-10-06\",\n                \"2021-10-07\",\n                \"2021-10-08\",\n                \"2021-10-09\",\n                \"2021-10-10\",\n                \"2021-10-11\",\n                \"2021-10-12\",\n                \"2021-10-13\",\n                \"2021-10-14\",\n                \"2021-10-15\",\n                \"2021-10-16\",\n                \"2021-10-17\",\n                \"2021-10-18\",\n                \"2021-10-19\",\n                \"2021-10-20\",\n                \"2021-10-21\",\n                \"2021-10-22\",\n                \"2021-10-23\",\n                \"2021-10-24\",\n                \"2021-10-25\",\n                \"2021-10-26\",\n                \"2021-10-27\",\n                \"2021-10-28\",\n                \"2021-10-29\",\n                \"2021-10-30\",\n                \"2021-10-31\",\n                \"2021-11-01\",\n                \"2021-11-02\",\n                \"2021-11-03\",\n                \"2021-11-04\",\n                \"2021-11-05\",\n                \"2021-11-06\",\n                \"2021-11-07\",\n                \"2021-11-08\",\n                \"2021-11-09\",\n                \"2021-11-10\",\n                \"2021-11-11\",\n                \"2021-11-12\",\n                \"2021-11-13\",\n                \"2021-11-14\",\n                \"2021-11-15\",\n                \"2021-11-16\",\n                \"2021-11-17\",\n                \"2021-11-18\",\n                \"2021-11-19\",\n                \"2021-11-20\",\n                \"2021-11-21\",\n                \"2021-11-22\",\n                \"2021-11-23\",\n                \"2021-11-24\",\n                \"2021-11-25\",\n                \"2021-11-26\",\n                \"2021-11-27\",\n                \"2021-11-28\",\n                \"2021-11-29\",\n                \"2021-11-30\",\n                \"2021-12-01\",\n                \"2021-12-02\",\n                \"2021-12-03\",\n                \"2021-12-04\",\n                \"2021-12-05\",\n                \"2021-12-06\",\n                \"2021-12-07\",\n                \"2021-12-08\",\n                \"2021-12-09\",\n                \"2021-12-10\",\n                \"2021-12-11\",\n                \"2021-12-12\",\n                \"2021-12-13\",\n                \"2021-12-14\",\n                \"2021-12-15\",\n                \"2021-12-16\",\n                \"2021-12-17\",\n                \"2021-12-18\",\n                \"2021-12-19\",\n                \"2021-12-20\"\n              ],\n              \"y\": [\n                100.0,\n                97.24,\n                94.13,\n                88.88,\n                88.51,\n                87.38,\n                86.65,\n                86.28,\n                89.37,\n                88.55,\n                88.22,\n                91.48,\n                91.92,\n                89.78,\n                81.7,\n                79.84,\n                79.7,\n                79.72,\n                50.09,\n                56.06,\n                52.4,\n                54.33,\n                50.53,\n                52.65,\n                52.78,\n                62.38,\n                62.46,\n                62.32,\n                58.75,\n                64.65,\n                67.86,\n                67.32,\n                67.68,\n                65.19,\n                62.9,\n                59.67,\n                64.79,\n                64.88,\n                66.57,\n                68.45,\n                67.85,\n                69.2,\n                68.43,\n                73.27,\n                72.31,\n                73.9,\n                73.58,\n                69.18,\n                69.11,\n                70.24,\n                68.97,\n                68.94,\n                66.93,\n                71.71,\n                71.5,\n                73.13,\n                72.44,\n                69.34,\n                69.33,\n                71.71,\n                74.86,\n                76.08,\n                76.28,\n                77.38,\n                78.55,\n                78.66,\n                88.68,\n                87.24,\n                89.32,\n                90.57,\n                89.65,\n                89.8,\n                90.72,\n                93.39,\n                100.27,\n                99.18,\n                96.67,\n                88.23,\n                86.67,\n                88.71,\n                93.4,\n                98.08,\n                93.99,\n                94.48,\n                97.44,\n                98.01,\n                98.03,\n                95.95,\n                91.51,\n                92.52,\n                92.79,\n                88.57,\n                89.75,\n                89.02,\n                92.51,\n                95.98,\n                95.11,\n                97.74,\n                95.33,\n                102.45,\n                96.02,\n                97.3,\n                98.75,\n                97.39,\n                97.27,\n                98.33,\n                98.46,\n                98.7,\n                99.45,\n                93.93,\n                95.53,\n                95.47,\n                94.58,\n                95.23,\n                96.11,\n                95.52,\n                94.83,\n                93.59,\n                94.03,\n                93.74,\n                97.22,\n                97.03,\n                93.84,\n                93.35,\n                92.33,\n                91.14,\n                92.13,\n                92.61,\n                92.07,\n                92.99,\n                91.93,\n                91.56,\n                92.02,\n                91.43,\n                94.47,\n                93.23,\n                95.0,\n                93.49,\n                93.49,\n                93.11,\n                93.47,\n                93.14,\n                93.14,\n                92.63,\n                92.02,\n                92.21,\n                92.29,\n                92.56,\n                92.34,\n                94.46,\n                95.98,\n                96.54,\n                96.09,\n                97.51,\n                99.81,\n                110.74,\n                109.96,\n                111.85,\n                111.96,\n                114.1,\n                118.49,\n                111.38,\n                113.32,\n                112.91,\n                118.36,\n                118.69,\n                116.9,\n                118.43,\n                117.65,\n                119.68,\n                114.97,\n                116.73,\n                118.74,\n                118.58,\n                119.56,\n                119.83,\n                123.48,\n                120.82,\n                118.48,\n                119.69,\n                116.81,\n                117.71,\n                117.54,\n                118.64,\n                114.53,\n                115.76,\n                114.1,\n                116.3,\n                115.94,\n                118.01,\n                117.7,\n                120.62,\n                115.01,\n                103.23,\n                105.92,\n                102.47,\n                103.59,\n                104.48,\n                102.09,\n                103.2,\n                104.42,\n                104.8,\n                105.22,\n                104.02,\n                107.62,\n                108.79,\n                110.58,\n                110.32,\n                110.28,\n                111.79,\n                110.21,\n                105.42,\n                106.19,\n                103.24,\n                108.42,\n                107.74,\n                108.32,\n                108.57,\n                107.91,\n                109.27,\n                108.67,\n                107.0,\n                106.56,\n                106.3,\n                107.51,\n                108.75,\n                106.85,\n                107.5,\n                109.99,\n                111.49,\n                113.82,\n                114.71,\n                116.43,\n                115.13,\n                115.16,\n                115.83,\n                114.08,\n                114.44,\n                115.71,\n                118.31,\n                120.07,\n                129.21,\n                130.65,\n                130.3,\n                132.08,\n                131.3,\n                131.75,\n                137.58,\n                133.72,\n                135.4,\n                136.5,\n                138.86,\n                138.42,\n                136.54,\n                140.56,\n                142.41,\n                156.98,\n                156.84,\n                149.47,\n                155.97,\n                154.49,\n                154.07,\n                158.21,\n                164.0,\n                164.42,\n                161.9,\n                160.77,\n                168.43,\n                177.8,\n                179.39,\n                179.53,\n                187.63,\n                187.84,\n                185.1,\n                185.04,\n                192.53,\n                188.75,\n                172.81,\n                172.39,\n                178.52,\n                183.16,\n                197.75,\n                189.46,\n                193.47,\n                195.93,\n                188.42,\n                193.0,\n                194.92,\n                193.38,\n                184.6,\n                186.95,\n                184.04,\n                181.96,\n                189.47,\n                192.88,\n                193.93,\n                195.65,\n                214.73,\n                229.79,\n                233.14,\n                240.51,\n                236.56,\n                229.77,\n                239.64,\n                234.18,\n                239.16,\n                248.52,\n                266.38,\n                264.72,\n                272.91,\n                275.71,\n                290.6,\n                292.22,\n                295.98,\n                323.72,\n                330.31,\n                322.15,\n                342.51,\n                371.04,\n                396.7,\n                411.08,\n                405.61,\n                386.48,\n                358.37,\n                341.81,\n                376.0,\n                394.85,\n                371.05,\n                364.53,\n                360.64,\n                369.09,\n                363.44,\n                358.18,\n                310.6,\n                332.57,\n                323.12,\n                325.35,\n                326.13,\n                328.18,\n                306.64,\n                337.21,\n                345.77,\n                345.3,\n                333.66,\n                337.92,\n                357.8,\n                377.57,\n                372.07,\n                384.34,\n                395.65,\n                391.99,\n                465.48,\n                468.35,\n                452.6,\n                482.74,\n                478.66,\n                474.64,\n                490.88,\n                483.1,\n                495.74,\n                525.46,\n                520.73,\n                563.13,\n                565.26,\n                579.78,\n                546.2,\n                491.96,\n                500.83,\n                474.52,\n                466.92,\n                465.4,\n                454.81,\n                500.09,\n                487.47,\n                509.23,\n                489.31,\n                492.99,\n                492.84,\n                515.96,\n                526.44,\n                552.41,\n                564.35,\n                582.45,\n                577.68,\n                617.09,\n                597.53,\n                563.32,\n                572.37,\n                593.19,\n                582.99,\n                587.9,\n                587.57,\n                579.61,\n                549.44,\n                551.55,\n                531.76,\n                520.97,\n                555.57,\n                563.99,\n                563.76,\n                581.89,\n                593.66,\n                593.67,\n                595.45,\n                598.36,\n                580.42,\n                592.05,\n                595.07,\n                586.35,\n                564.75,\n                587.68,\n                586.88,\n                602.48,\n                606.63,\n                603.49,\n                639.86,\n                635.9,\n                637.96,\n                620.41,\n                611.45,\n                566.44,\n                561.48,\n                569.03,\n                543.16,\n                521.56,\n                514.82,\n                504.32,\n                493.77,\n                544.33,\n                554.52,\n                552.42,\n                539.62,\n                581.89,\n                582.68,\n                570.62,\n                576.35,\n                537.39,\n                578.61,\n                568.25,\n                577.93,\n                592.51,\n                586.75,\n                562.85,\n                571.36,\n                495.24,\n                500.94,\n                502.6,\n                471.16,\n                468.09,\n                438.69,\n                432.36,\n                372.84,\n                410.93,\n                375.88,\n                378.22,\n                350.35,\n                390.0,\n                386.94,\n                395.93,\n                387.29,\n                359.69,\n                348.79,\n                359.49,\n                376.17,\n                369.64,\n                378.61,\n                395.07,\n                371.75,\n                358.22,\n                361.35,\n                338.16,\n                337.27,\n                376.29,\n                369.82,\n                376.18,\n                358.23,\n                393.95,\n                405.24,\n                407.14,\n                386.39,\n                383.43,\n                360.59,\n                358.87,\n                359.7,\n                319.18,\n                327.53,\n                339.8,\n                349.26,\n                318.78,\n                324.31,\n                349.13,\n                346.96,\n                361.41,\n                353.07,\n                338.27,\n                341.55,\n                349.32,\n                355.56,\n                340.03,\n                344.96,\n                341.13,\n                331.27,\n                340.55,\n                337.75,\n                345.01,\n                334.08,\n                329.51,\n                330.72,\n                320.22,\n                316.61,\n                317.73,\n                320.39,\n                310.52,\n                300.34,\n                323.55,\n                325.59,\n                338.37,\n                345.53,\n                356.19,\n                376.22,\n                397.07,\n                403.0,\n                403.13,\n                425.57,\n                419.43,\n                402.79,\n                395.0,\n                384.43,\n                400.5,\n                411.8,\n                431.42,\n                448.95,\n                441.31,\n                467.18,\n                459.32,\n                459.4,\n                447.66,\n                481.57,\n                474.55,\n                474.05,\n                463.54,\n                450.35,\n                451.42,\n                470.73,\n                497.14,\n                492.77,\n                496.97,\n                499.23,\n                480.69,\n                493.33,\n                472.99,\n                494.32,\n                492.74,\n                492.01,\n                474.13,\n                475.25,\n                492.19,\n                497.03,\n                504.06,\n                503.24,\n                521.47,\n                530.34,\n                471.67,\n                464.42,\n                467.44,\n                452.25,\n                455.45,\n                464.14,\n                453.05,\n                474.51,\n                485.43,\n                481.47,\n                476.27,\n                486.46,\n                476.2,\n                431.7,\n                410.03,\n                439.06,\n                452.37,\n                431.66,\n                430.41,\n                435.37,\n                425.57,\n                413.47,\n                418.8,\n                441.24,\n                484.83,\n                480.74,\n                485.67,\n                494.86,\n                519.07,\n                557.83,\n                542.15,\n                543.78,\n                553.86,\n                551.88,\n                579.22,\n                564.67,\n                578.38,\n                577.58,\n                620.62,\n                613.55,\n                620.22,\n                624.98,\n                647.51,\n                664.95,\n                626.83,\n                611.54,\n                618.61,\n                613.94,\n                635.19,\n                608.23,\n                589.27,\n                610.83,\n                627.01,\n                623.6,\n                617.85,\n                614.68,\n                637.07,\n                634.49,\n                619.2,\n                615.91,\n                619.95,\n                638.09,\n                680.81,\n                674.81,\n                654.9,\n                654.44,\n                646.44,\n                649.6,\n                659.65,\n                640.41,\n                606.19,\n                608.27,\n                573.75,\n                585.62,\n                601.51,\n                591.77,\n                567.17,\n                580.07,\n                567.08,\n                577.1,\n                539.77,\n                552.32,\n                576.84,\n                582.46,\n                574.39,\n                576.65,\n                569.07,\n                540.06,\n                495.75,\n                497.44,\n                509.67,\n                510.86,\n                508.89,\n                480.35,\n                476.03,\n                497.38,\n                504.79,\n                470.93,\n                469.67,\n                492.69,\n                480.28,\n                465.54,\n                472.05,\n                470.62,\n                472.37\n              ],\n              \"yaxis\": \"y2\",\n              \"type\": \"scatter\"\n            },\n            {\n              \"line\": {\n                \"color\": \"#00cc96\"\n              },\n              \"name\": \"Dow Jones\",\n              \"x\": [\n                \"2020-02-23\",\n                \"2020-02-24\",\n                \"2020-02-25\",\n                \"2020-02-26\",\n                \"2020-02-27\",\n                \"2020-02-28\",\n                \"2020-02-29\",\n                \"2020-03-01\",\n                \"2020-03-02\",\n                \"2020-03-03\",\n                \"2020-03-04\",\n                \"2020-03-05\",\n                \"2020-03-06\",\n                \"2020-03-07\",\n                \"2020-03-08\",\n                \"2020-03-09\",\n                \"2020-03-10\",\n                \"2020-03-11\",\n                \"2020-03-12\",\n                \"2020-03-13\",\n                \"2020-03-14\",\n                \"2020-03-15\",\n                \"2020-03-16\",\n                \"2020-03-17\",\n                \"2020-03-18\",\n                \"2020-03-19\",\n                \"2020-03-20\",\n                \"2020-03-21\",\n                \"2020-03-22\",\n                \"2020-03-23\",\n                \"2020-03-24\",\n                \"2020-03-25\",\n                \"2020-03-26\",\n                \"2020-03-27\",\n                \"2020-03-28\",\n                \"2020-03-29\",\n                \"2020-03-30\",\n                \"2020-03-31\",\n                \"2020-04-01\",\n                \"2020-04-02\",\n                \"2020-04-03\",\n                \"2020-04-04\",\n                \"2020-04-05\",\n                \"2020-04-06\",\n                \"2020-04-07\",\n                \"2020-04-08\",\n                \"2020-04-09\",\n                \"2020-04-10\",\n                \"2020-04-11\",\n                \"2020-04-12\",\n                \"2020-04-13\",\n                \"2020-04-14\",\n                \"2020-04-15\",\n                \"2020-04-16\",\n                \"2020-04-17\",\n                \"2020-04-18\",\n                \"2020-04-19\",\n                \"2020-04-20\",\n                \"2020-04-21\",\n                \"2020-04-22\",\n                \"2020-04-23\",\n                \"2020-04-24\",\n                \"2020-04-25\",\n                \"2020-04-26\",\n                \"2020-04-27\",\n                \"2020-04-28\",\n                \"2020-04-29\",\n                \"2020-04-30\",\n                \"2020-05-01\",\n                \"2020-05-02\",\n                \"2020-05-03\",\n                \"2020-05-04\",\n                \"2020-05-05\",\n                \"2020-05-06\",\n                \"2020-05-07\",\n                \"2020-05-08\",\n                \"2020-05-09\",\n                \"2020-05-10\",\n                \"2020-05-11\",\n                \"2020-05-12\",\n                \"2020-05-13\",\n                \"2020-05-14\",\n                \"2020-05-15\",\n                \"2020-05-16\",\n                \"2020-05-17\",\n                \"2020-05-18\",\n                \"2020-05-19\",\n                \"2020-05-20\",\n                \"2020-05-21\",\n                \"2020-05-22\",\n                \"2020-05-23\",\n                \"2020-05-24\",\n                \"2020-05-25\",\n                \"2020-05-26\",\n                \"2020-05-27\",\n                \"2020-05-28\",\n                \"2020-05-29\",\n                \"2020-05-30\",\n                \"2020-05-31\",\n                \"2020-06-01\",\n                \"2020-06-02\",\n                \"2020-06-03\",\n                \"2020-06-04\",\n                \"2020-06-05\",\n                \"2020-06-06\",\n                \"2020-06-07\",\n                \"2020-06-08\",\n                \"2020-06-09\",\n                \"2020-06-10\",\n                \"2020-06-11\",\n                \"2020-06-12\",\n                \"2020-06-13\",\n                \"2020-06-14\",\n                \"2020-06-15\",\n                \"2020-06-16\",\n                \"2020-06-17\",\n                \"2020-06-18\",\n                \"2020-06-19\",\n                \"2020-06-20\",\n                \"2020-06-21\",\n                \"2020-06-22\",\n                \"2020-06-23\",\n                \"2020-06-24\",\n                \"2020-06-25\",\n                \"2020-06-26\",\n                \"2020-06-27\",\n                \"2020-06-28\",\n                \"2020-06-29\",\n                \"2020-06-30\",\n                \"2020-07-01\",\n                \"2020-07-02\",\n                \"2020-07-03\",\n                \"2020-07-04\",\n                \"2020-07-05\",\n                \"2020-07-06\",\n                \"2020-07-07\",\n                \"2020-07-08\",\n                \"2020-07-09\",\n                \"2020-07-10\",\n                \"2020-07-11\",\n                \"2020-07-12\",\n                \"2020-07-13\",\n                \"2020-07-14\",\n                \"2020-07-15\",\n                \"2020-07-16\",\n                \"2020-07-17\",\n                \"2020-07-18\",\n                \"2020-07-19\",\n                \"2020-07-20\",\n                \"2020-07-21\",\n                \"2020-07-22\",\n                \"2020-07-23\",\n                \"2020-07-24\",\n                \"2020-07-25\",\n                \"2020-07-26\",\n                \"2020-07-27\",\n                \"2020-07-28\",\n                \"2020-07-29\",\n                \"2020-07-30\",\n                \"2020-07-31\",\n                \"2020-08-01\",\n                \"2020-08-02\",\n                \"2020-08-03\",\n                \"2020-08-04\",\n                \"2020-08-05\",\n                \"2020-08-06\",\n                \"2020-08-07\",\n                \"2020-08-08\",\n                \"2020-08-09\",\n                \"2020-08-10\",\n                \"2020-08-11\",\n                \"2020-08-12\",\n                \"2020-08-13\",\n                \"2020-08-14\",\n                \"2020-08-15\",\n                \"2020-08-16\",\n                \"2020-08-17\",\n                \"2020-08-18\",\n                \"2020-08-19\",\n                \"2020-08-20\",\n                \"2020-08-21\",\n                \"2020-08-22\",\n                \"2020-08-23\",\n                \"2020-08-24\",\n                \"2020-08-25\",\n                \"2020-08-26\",\n                \"2020-08-27\",\n                \"2020-08-28\",\n                \"2020-08-29\",\n                \"2020-08-30\",\n                \"2020-08-31\",\n                \"2020-09-01\",\n                \"2020-09-02\",\n                \"2020-09-03\",\n                \"2020-09-04\",\n                \"2020-09-05\",\n                \"2020-09-06\",\n                \"2020-09-07\",\n                \"2020-09-08\",\n                \"2020-09-09\",\n                \"2020-09-10\",\n                \"2020-09-11\",\n                \"2020-09-12\",\n                \"2020-09-13\",\n                \"2020-09-14\",\n                \"2020-09-15\",\n                \"2020-09-16\",\n                \"2020-09-17\",\n                \"2020-09-18\",\n                \"2020-09-19\",\n                \"2020-09-20\",\n                \"2020-09-21\",\n                \"2020-09-22\",\n                \"2020-09-23\",\n                \"2020-09-24\",\n                \"2020-09-25\",\n                \"2020-09-26\",\n                \"2020-09-27\",\n                \"2020-09-28\",\n                \"2020-09-29\",\n                \"2020-09-30\",\n                \"2020-10-01\",\n                \"2020-10-02\",\n                \"2020-10-03\",\n                \"2020-10-04\",\n                \"2020-10-05\",\n                \"2020-10-06\",\n                \"2020-10-07\",\n                \"2020-10-08\",\n                \"2020-10-09\",\n                \"2020-10-10\",\n                \"2020-10-11\",\n                \"2020-10-12\",\n                \"2020-10-13\",\n                \"2020-10-14\",\n                \"2020-10-15\",\n                \"2020-10-16\",\n                \"2020-10-17\",\n                \"2020-10-18\",\n                \"2020-10-19\",\n                \"2020-10-20\",\n                \"2020-10-21\",\n                \"2020-10-22\",\n                \"2020-10-23\",\n                \"2020-10-24\",\n                \"2020-10-25\",\n                \"2020-10-26\",\n                \"2020-10-27\",\n                \"2020-10-28\",\n                \"2020-10-29\",\n                \"2020-10-30\",\n                \"2020-10-31\",\n                \"2020-11-01\",\n                \"2020-11-02\",\n                \"2020-11-03\",\n                \"2020-11-04\",\n                \"2020-11-05\",\n                \"2020-11-06\",\n                \"2020-11-07\",\n                \"2020-11-08\",\n                \"2020-11-09\",\n                \"2020-11-10\",\n                \"2020-11-11\",\n                \"2020-11-12\",\n                \"2020-11-13\",\n                \"2020-11-14\",\n                \"2020-11-15\",\n                \"2020-11-16\",\n                \"2020-11-17\",\n                \"2020-11-18\",\n                \"2020-11-19\",\n                \"2020-11-20\",\n                \"2020-11-21\",\n                \"2020-11-22\",\n                \"2020-11-23\",\n                \"2020-11-24\",\n                \"2020-11-25\",\n                \"2020-11-26\",\n                \"2020-11-27\",\n                \"2020-11-28\",\n                \"2020-11-29\",\n                \"2020-11-30\",\n                \"2020-12-01\",\n                \"2020-12-02\",\n                \"2020-12-03\",\n                \"2020-12-04\",\n                \"2020-12-05\",\n                \"2020-12-06\",\n                \"2020-12-07\",\n                \"2020-12-08\",\n                \"2020-12-09\",\n                \"2020-12-10\",\n                \"2020-12-11\",\n                \"2020-12-12\",\n                \"2020-12-13\",\n                \"2020-12-14\",\n                \"2020-12-15\",\n                \"2020-12-16\",\n                \"2020-12-17\",\n                \"2020-12-18\",\n                \"2020-12-19\",\n                \"2020-12-20\",\n                \"2020-12-21\",\n                \"2020-12-22\",\n                \"2020-12-23\",\n                \"2020-12-24\",\n                \"2020-12-25\",\n                \"2020-12-26\",\n                \"2020-12-27\",\n                \"2020-12-28\",\n                \"2020-12-29\",\n                \"2020-12-30\",\n                \"2020-12-31\",\n                \"2021-01-01\",\n                \"2021-01-02\",\n                \"2021-01-03\",\n                \"2021-01-04\",\n                \"2021-01-05\",\n                \"2021-01-06\",\n                \"2021-01-07\",\n                \"2021-01-08\",\n                \"2021-01-09\",\n                \"2021-01-10\",\n                \"2021-01-11\",\n                \"2021-01-12\",\n                \"2021-01-13\",\n                \"2021-01-14\",\n                \"2021-01-15\",\n                \"2021-01-16\",\n                \"2021-01-17\",\n                \"2021-01-18\",\n                \"2021-01-19\",\n                \"2021-01-20\",\n                \"2021-01-21\",\n                \"2021-01-22\",\n                \"2021-01-23\",\n                \"2021-01-24\",\n                \"2021-01-25\",\n                \"2021-01-26\",\n                \"2021-01-27\",\n                \"2021-01-28\",\n                \"2021-01-29\",\n                \"2021-01-30\",\n                \"2021-01-31\",\n                \"2021-02-01\",\n                \"2021-02-02\",\n                \"2021-02-03\",\n                \"2021-02-04\",\n                \"2021-02-05\",\n                \"2021-02-06\",\n                \"2021-02-07\",\n                \"2021-02-08\",\n                \"2021-02-09\",\n                \"2021-02-10\",\n                \"2021-02-11\",\n                \"2021-02-12\",\n                \"2021-02-13\",\n                \"2021-02-14\",\n                \"2021-02-15\",\n                \"2021-02-16\",\n                \"2021-02-17\",\n                \"2021-02-18\",\n                \"2021-02-19\",\n                \"2021-02-20\",\n                \"2021-02-21\",\n                \"2021-02-22\",\n                \"2021-02-23\",\n                \"2021-02-24\",\n                \"2021-02-25\",\n                \"2021-02-26\",\n                \"2021-02-27\",\n                \"2021-02-28\",\n                \"2021-03-01\",\n                \"2021-03-02\",\n                \"2021-03-03\",\n                \"2021-03-04\",\n                \"2021-03-05\",\n                \"2021-03-06\",\n                \"2021-03-07\",\n                \"2021-03-08\",\n                \"2021-03-09\",\n                \"2021-03-10\",\n                \"2021-03-11\",\n                \"2021-03-12\",\n                \"2021-03-13\",\n                \"2021-03-14\",\n                \"2021-03-15\",\n                \"2021-03-16\",\n                \"2021-03-17\",\n                \"2021-03-18\",\n                \"2021-03-19\",\n                \"2021-03-20\",\n                \"2021-03-21\",\n                \"2021-03-22\",\n                \"2021-03-23\",\n                \"2021-03-24\",\n                \"2021-03-25\",\n                \"2021-03-26\",\n                \"2021-03-27\",\n                \"2021-03-28\",\n                \"2021-03-29\",\n                \"2021-03-30\",\n                \"2021-03-31\",\n                \"2021-04-01\",\n                \"2021-04-02\",\n                \"2021-04-03\",\n                \"2021-04-04\",\n                \"2021-04-05\",\n                \"2021-04-06\",\n                \"2021-04-07\",\n                \"2021-04-08\",\n                \"2021-04-09\",\n                \"2021-04-10\",\n                \"2021-04-11\",\n                \"2021-04-12\",\n                \"2021-04-13\",\n                \"2021-04-14\",\n                \"2021-04-15\",\n                \"2021-04-16\",\n                \"2021-04-17\",\n                \"2021-04-18\",\n                \"2021-04-19\",\n                \"2021-04-20\",\n                \"2021-04-21\",\n                \"2021-04-22\",\n                \"2021-04-23\",\n                \"2021-04-24\",\n                \"2021-04-25\",\n                \"2021-04-26\",\n                \"2021-04-27\",\n                \"2021-04-28\",\n                \"2021-04-29\",\n                \"2021-04-30\",\n                \"2021-05-01\",\n                \"2021-05-02\",\n                \"2021-05-03\",\n                \"2021-05-04\",\n                \"2021-05-05\",\n                \"2021-05-06\",\n                \"2021-05-07\",\n                \"2021-05-08\",\n                \"2021-05-09\",\n                \"2021-05-10\",\n                \"2021-05-11\",\n                \"2021-05-12\",\n                \"2021-05-13\",\n                \"2021-05-14\",\n                \"2021-05-15\",\n                \"2021-05-16\",\n                \"2021-05-17\",\n                \"2021-05-18\",\n                \"2021-05-19\",\n                \"2021-05-20\",\n                \"2021-05-21\",\n                \"2021-05-22\",\n                \"2021-05-23\",\n                \"2021-05-24\",\n                \"2021-05-25\",\n                \"2021-05-26\",\n                \"2021-05-27\",\n                \"2021-05-28\",\n                \"2021-05-29\",\n                \"2021-05-30\",\n                \"2021-05-31\",\n                \"2021-06-01\",\n                \"2021-06-02\",\n                \"2021-06-03\",\n                \"2021-06-04\",\n                \"2021-06-05\",\n                \"2021-06-06\",\n                \"2021-06-07\",\n                \"2021-06-08\",\n                \"2021-06-09\",\n                \"2021-06-10\",\n                \"2021-06-11\",\n                \"2021-06-12\",\n                \"2021-06-13\",\n                \"2021-06-14\",\n                \"2021-06-15\",\n                \"2021-06-16\",\n                \"2021-06-17\",\n                \"2021-06-18\",\n                \"2021-06-19\",\n                \"2021-06-20\",\n                \"2021-06-21\",\n                \"2021-06-22\",\n                \"2021-06-23\",\n                \"2021-06-24\",\n                \"2021-06-25\",\n                \"2021-06-26\",\n                \"2021-06-27\",\n                \"2021-06-28\",\n                \"2021-06-29\",\n                \"2021-06-30\",\n                \"2021-07-01\",\n                \"2021-07-02\",\n                \"2021-07-03\",\n                \"2021-07-04\",\n                \"2021-07-05\",\n                \"2021-07-06\",\n                \"2021-07-07\",\n                \"2021-07-08\",\n                \"2021-07-09\",\n                \"2021-07-10\",\n                \"2021-07-11\",\n                \"2021-07-12\",\n                \"2021-07-13\",\n                \"2021-07-14\",\n                \"2021-07-15\",\n                \"2021-07-16\",\n                \"2021-07-17\",\n                \"2021-07-18\",\n                \"2021-07-19\",\n                \"2021-07-20\",\n                \"2021-07-21\",\n                \"2021-07-22\",\n                \"2021-07-23\",\n                \"2021-07-24\",\n                \"2021-07-25\",\n                \"2021-07-26\",\n                \"2021-07-27\",\n                \"2021-07-28\",\n                \"2021-07-29\",\n                \"2021-07-30\",\n                \"2021-07-31\",\n                \"2021-08-01\",\n                \"2021-08-02\",\n                \"2021-08-03\",\n                \"2021-08-04\",\n                \"2021-08-05\",\n                \"2021-08-06\",\n                \"2021-08-07\",\n                \"2021-08-08\",\n                \"2021-08-09\",\n                \"2021-08-10\",\n                \"2021-08-11\",\n                \"2021-08-12\",\n                \"2021-08-13\",\n                \"2021-08-14\",\n                \"2021-08-15\",\n                \"2021-08-16\",\n                \"2021-08-17\",\n                \"2021-08-18\",\n                \"2021-08-19\",\n                \"2021-08-20\",\n                \"2021-08-21\",\n                \"2021-08-22\",\n                \"2021-08-23\",\n                \"2021-08-24\",\n                \"2021-08-25\",\n                \"2021-08-26\",\n                \"2021-08-27\",\n                \"2021-08-28\",\n                \"2021-08-29\",\n                \"2021-08-30\",\n                \"2021-08-31\",\n                \"2021-09-01\",\n                \"2021-09-02\",\n                \"2021-09-03\",\n                \"2021-09-04\",\n                \"2021-09-05\",\n                \"2021-09-06\",\n                \"2021-09-07\",\n                \"2021-09-08\",\n                \"2021-09-09\",\n                \"2021-09-10\",\n                \"2021-09-11\",\n                \"2021-09-12\",\n                \"2021-09-13\",\n                \"2021-09-14\",\n                \"2021-09-15\",\n                \"2021-09-16\",\n                \"2021-09-17\",\n                \"2021-09-18\",\n                \"2021-09-19\",\n                \"2021-09-20\",\n                \"2021-09-21\",\n                \"2021-09-22\",\n                \"2021-09-23\",\n                \"2021-09-24\",\n                \"2021-09-25\",\n                \"2021-09-26\",\n                \"2021-09-27\",\n                \"2021-09-28\",\n                \"2021-09-29\",\n                \"2021-09-30\",\n                \"2021-10-01\",\n                \"2021-10-02\",\n                \"2021-10-03\",\n                \"2021-10-04\",\n                \"2021-10-05\",\n                \"2021-10-06\",\n                \"2021-10-07\",\n                \"2021-10-08\",\n                \"2021-10-09\",\n                \"2021-10-10\",\n                \"2021-10-11\",\n                \"2021-10-12\",\n                \"2021-10-13\",\n                \"2021-10-14\",\n                \"2021-10-15\",\n                \"2021-10-16\",\n                \"2021-10-17\",\n                \"2021-10-18\",\n                \"2021-10-19\",\n                \"2021-10-20\",\n                \"2021-10-21\",\n                \"2021-10-22\",\n                \"2021-10-23\",\n                \"2021-10-24\",\n                \"2021-10-25\",\n                \"2021-10-26\",\n                \"2021-10-27\",\n                \"2021-10-28\",\n                \"2021-10-29\",\n                \"2021-10-30\",\n                \"2021-10-31\",\n                \"2021-11-01\",\n                \"2021-11-02\",\n                \"2021-11-03\",\n                \"2021-11-04\",\n                \"2021-11-05\",\n                \"2021-11-06\",\n                \"2021-11-07\",\n                \"2021-11-08\",\n                \"2021-11-09\",\n                \"2021-11-10\",\n                \"2021-11-11\",\n                \"2021-11-12\",\n                \"2021-11-13\",\n                \"2021-11-14\",\n                \"2021-11-15\",\n                \"2021-11-16\",\n                \"2021-11-17\",\n                \"2021-11-18\",\n                \"2021-11-19\",\n                \"2021-11-20\",\n                \"2021-11-21\",\n                \"2021-11-22\",\n                \"2021-11-23\",\n                \"2021-11-24\",\n                \"2021-11-25\",\n                \"2021-11-26\",\n                \"2021-11-27\",\n                \"2021-11-28\",\n                \"2021-11-29\",\n                \"2021-11-30\",\n                \"2021-12-01\",\n                \"2021-12-02\",\n                \"2021-12-03\",\n                \"2021-12-04\",\n                \"2021-12-05\",\n                \"2021-12-06\",\n                \"2021-12-07\",\n                \"2021-12-08\",\n                \"2021-12-09\",\n                \"2021-12-10\",\n                \"2021-12-11\",\n                \"2021-12-12\",\n                \"2021-12-13\",\n                \"2021-12-14\",\n                \"2021-12-15\",\n                \"2021-12-16\",\n                \"2021-12-17\",\n                \"2021-12-18\",\n                \"2021-12-19\",\n                \"2021-12-20\"\n              ],\n              \"y\": [\n                100.0,\n                98.79,\n                95.68,\n                95.24,\n                91.03,\n                89.77,\n                91.29,\n                92.82,\n                94.34,\n                91.57,\n                95.71,\n                92.29,\n                91.38,\n                89.01,\n                86.64,\n                84.27,\n                88.39,\n                83.21,\n                74.9,\n                81.91,\n                78.38,\n                74.86,\n                71.33,\n                75.03,\n                70.3,\n                70.97,\n                67.74,\n                67.06,\n                66.37,\n                65.69,\n                73.15,\n                74.9,\n                79.68,\n                76.44,\n                77.26,\n                78.07,\n                78.88,\n                77.43,\n                73.99,\n                75.65,\n                74.38,\n                76.29,\n                78.21,\n                80.13,\n                80.04,\n                82.79,\n                83.8,\n                83.51,\n                83.22,\n                82.93,\n                82.64,\n                84.61,\n                83.04,\n                83.16,\n                85.65,\n                84.95,\n                84.25,\n                83.56,\n                81.33,\n                82.94,\n                83.08,\n                84.0,\n                84.42,\n                84.84,\n                85.26,\n                85.15,\n                87.03,\n                86.01,\n                83.82,\n                83.85,\n                83.88,\n                83.91,\n                84.38,\n                83.61,\n                84.35,\n                85.96,\n                85.83,\n                85.7,\n                85.58,\n                83.96,\n                82.13,\n                83.47,\n                83.68,\n                84.75,\n                85.83,\n                86.9,\n                85.52,\n                86.83,\n                86.47,\n                86.44,\n                86.9,\n                87.37,\n                87.84,\n                88.31,\n                90.26,\n                89.74,\n                89.68,\n                89.79,\n                89.89,\n                90.0,\n                90.95,\n                92.81,\n                92.85,\n                95.78,\n                96.33,\n                96.87,\n                97.41,\n                96.35,\n                95.36,\n                88.78,\n                90.46,\n                90.65,\n                90.84,\n                91.02,\n                92.88,\n                92.28,\n                92.14,\n                91.4,\n                91.58,\n                91.77,\n                91.95,\n                92.41,\n                89.9,\n                90.96,\n                88.38,\n                89.06,\n                89.75,\n                90.43,\n                91.2,\n                90.92,\n                91.25,\n                91.65,\n                92.06,\n                92.47,\n                92.87,\n                91.47,\n                92.1,\n                90.82,\n                92.12,\n                92.14,\n                92.15,\n                92.16,\n                94.13,\n                94.93,\n                94.45,\n                94.23,\n                94.24,\n                94.25,\n                94.26,\n                94.83,\n                95.41,\n                94.16,\n                93.52,\n                93.65,\n                93.79,\n                93.92,\n                93.2,\n                93.76,\n                92.97,\n                93.37,\n                93.65,\n                93.93,\n                94.2,\n                94.78,\n                96.1,\n                96.76,\n                96.92,\n                97.34,\n                97.77,\n                98.19,\n                97.82,\n                98.84,\n                98.56,\n                98.68,\n                98.58,\n                98.48,\n                98.38,\n                98.14,\n                97.84,\n                98.0,\n                98.68,\n                99.12,\n                99.57,\n                100.01,\n                99.8,\n                100.1,\n                100.66,\n                101.23,\n                100.97,\n                100.71,\n                100.44,\n                101.2,\n                102.81,\n                99.96,\n                99.39,\n                98.84,\n                98.28,\n                97.72,\n                97.16,\n                98.71,\n                97.28,\n                97.74,\n                98.13,\n                98.51,\n                98.9,\n                98.91,\n                99.04,\n                98.58,\n                97.71,\n                97.11,\n                96.51,\n                95.91,\n                96.41,\n                94.55,\n                94.74,\n                96.01,\n                96.49,\n                96.97,\n                97.45,\n                96.99,\n                98.15,\n                98.28,\n                97.8,\n                98.35,\n                98.9,\n                99.45,\n                98.12,\n                100.0,\n                100.43,\n                101.0,\n                101.29,\n                101.59,\n                101.88,\n                101.33,\n                100.74,\n                100.67,\n                101.07,\n                100.58,\n                100.1,\n                99.61,\n                100.01,\n                99.67,\n                100.21,\n                100.11,\n                99.34,\n                98.58,\n                97.81,\n                97.03,\n                93.69,\n                94.19,\n                93.63,\n                94.13,\n                94.63,\n                95.13,\n                97.09,\n                98.39,\n                100.3,\n                100.07,\n                101.05,\n                102.03,\n                103.01,\n                103.94,\n                103.86,\n                102.74,\n                104.15,\n                104.71,\n                105.26,\n                105.81,\n                105.22,\n                104.01,\n                104.16,\n                103.39,\n                103.77,\n                104.16,\n                104.55,\n                106.15,\n                105.54,\n                105.61,\n                105.67,\n                105.35,\n                105.03,\n                104.71,\n                105.37,\n                105.58,\n                105.88,\n                106.76,\n                106.59,\n                106.41,\n                106.24,\n                106.6,\n                106.23,\n                105.99,\n                106.15,\n                105.94,\n                105.72,\n                105.5,\n                106.69,\n                106.54,\n                107.06,\n                106.62,\n                106.67,\n                106.71,\n                106.75,\n                106.04,\n                106.45,\n                106.7,\n                106.88,\n                107.06,\n                107.24,\n                107.42,\n                107.18,\n                107.44,\n                108.13,\n                107.79,\n                107.46,\n                107.12,\n                106.78,\n                107.37,\n                108.92,\n                109.67,\n                109.87,\n                109.76,\n                109.66,\n                109.55,\n                109.77,\n                109.74,\n                109.49,\n                108.87,\n                108.97,\n                109.07,\n                109.17,\n                109.28,\n                110.19,\n                110.14,\n                109.51,\n                109.47,\n                109.42,\n                109.38,\n                109.3,\n                107.06,\n                108.12,\n                105.93,\n                106.2,\n                106.47,\n                106.74,\n                108.42,\n                108.55,\n                109.72,\n                110.05,\n                110.33,\n                110.61,\n                110.89,\n                110.85,\n                111.07,\n                111.04,\n                111.14,\n                111.2,\n                111.26,\n                111.31,\n                111.37,\n                111.69,\n                111.27,\n                111.27,\n                111.3,\n                111.33,\n                111.37,\n                111.42,\n                112.92,\n                110.94,\n                109.28,\n                109.99,\n                110.7,\n                111.41,\n                110.91,\n                110.48,\n                109.25,\n                111.28,\n                111.64,\n                112.0,\n                112.36,\n                112.46,\n                114.1,\n                114.77,\n                115.81,\n                116.01,\n                116.22,\n                116.42,\n                115.97,\n                116.64,\n                116.1,\n                115.27,\n                115.4,\n                115.52,\n                115.64,\n                114.55,\n                114.54,\n                115.24,\n                116.85,\n                116.96,\n                117.08,\n                117.19,\n                116.83,\n                116.52,\n                117.13,\n                117.46,\n                117.79,\n                118.12,\n                118.45,\n                118.11,\n                118.17,\n                118.37,\n                119.42,\n                119.35,\n                119.29,\n                119.22,\n                118.98,\n                119.17,\n                120.25,\n                120.83,\n                120.69,\n                120.54,\n                120.4,\n                119.49,\n                120.61,\n                119.47,\n                120.28,\n                120.2,\n                120.13,\n                120.06,\n                120.07,\n                119.49,\n                120.33,\n                119.68,\n                119.96,\n                120.24,\n                120.52,\n                120.59,\n                120.94,\n                122.06,\n                122.87,\n                122.83,\n                122.79,\n                122.75,\n                121.07,\n                118.66,\n                120.2,\n                121.47,\n                121.41,\n                121.34,\n                121.28,\n                120.34,\n                119.75,\n                120.42,\n                120.86,\n                121.08,\n                121.29,\n                121.51,\n                121.23,\n                121.26,\n                121.76,\n                121.99,\n                122.03,\n                122.07,\n                122.11,\n                122.15,\n                122.24,\n                122.16,\n                122.79,\n                122.65,\n                122.5,\n                122.35,\n                122.24,\n                121.7,\n                121.77,\n                121.82,\n                121.71,\n                121.61,\n                121.51,\n                121.18,\n                120.24,\n                119.5,\n                117.61,\n                118.3,\n                119.0,\n                119.69,\n                119.93,\n                119.68,\n                120.82,\n                121.65,\n                121.48,\n                121.3,\n                121.12,\n                121.15,\n                121.9,\n                122.36,\n                122.9,\n                122.72,\n                122.53,\n                122.35,\n                122.16,\n                122.53,\n                121.61,\n                123.2,\n                123.34,\n                123.49,\n                123.64,\n                123.26,\n                123.42,\n                123.61,\n                122.55,\n                121.7,\n                120.84,\n                119.99,\n                121.93,\n                122.94,\n                123.03,\n                123.87,\n                123.97,\n                124.07,\n                124.16,\n                123.86,\n                123.41,\n                123.95,\n                123.43,\n                123.31,\n                123.2,\n                123.08,\n                124.07,\n                122.92,\n                123.88,\n                124.39,\n                124.27,\n                124.14,\n                124.01,\n                124.59,\n                125.37,\n                125.42,\n                125.48,\n                125.6,\n                125.73,\n                125.86,\n                124.87,\n                123.52,\n                123.28,\n                124.08,\n                124.33,\n                124.59,\n                124.84,\n                124.95,\n                125.09,\n                124.41,\n                125.26,\n                125.2,\n                125.13,\n                125.07,\n                124.93,\n                124.76,\n                125.22,\n                124.96,\n                124.72,\n                124.48,\n                124.25,\n                124.01,\n                123.76,\n                123.23,\n                122.27,\n                122.58,\n                122.89,\n                123.19,\n                122.16,\n                123.0,\n                122.78,\n                122.19,\n                121.46,\n                120.74,\n                120.02,\n                119.84,\n                121.03,\n                122.82,\n                122.94,\n                123.02,\n                123.11,\n                123.19,\n                121.18,\n                121.5,\n                119.57,\n                121.27,\n                120.89,\n                120.51,\n                120.13,\n                121.23,\n                121.59,\n                122.79,\n                122.76,\n                122.46,\n                122.17,\n                121.87,\n                121.46,\n                121.46,\n                123.35,\n                124.7,\n                124.65,\n                124.61,\n                124.57,\n                125.27,\n                125.81,\n                125.79,\n                126.05,\n                126.12,\n                126.2,\n                126.27,\n                126.33,\n                125.39,\n                126.24,\n                126.55,\n                126.66,\n                126.77,\n                126.88,\n                127.37,\n                127.74,\n                127.63,\n                128.35,\n                128.47,\n                128.59,\n                128.71,\n                128.32,\n                127.47,\n                126.91,\n                127.54,\n                127.53,\n                127.51,\n                127.5,\n                127.69,\n                126.94,\n                126.73,\n                125.78,\n                125.8,\n                125.82,\n                125.84,\n                126.53,\n                126.5,\n                124.9,\n                123.3,\n                123.58,\n                123.86,\n                124.13,\n                121.83,\n                120.2,\n                122.38,\n                122.17,\n                122.93,\n                123.69,\n                124.46,\n                126.2,\n                126.32,\n                126.32,\n                127.08,\n                126.71,\n                126.33,\n                125.95,\n                125.58,\n                126.93,\n                126.83,\n                124.95,\n                124.44,\n                123.93,\n                123.41\n              ],\n              \"yaxis\": \"y2\",\n              \"type\": \"scatter\"\n            },\n            {\n              \"line\": {\n                \"color\": \"#FFA15A\"\n              },\n              \"name\": \"Gold\",\n              \"x\": [\n                \"2020-02-23\",\n                \"2020-02-24\",\n                \"2020-02-25\",\n                \"2020-02-26\",\n                \"2020-02-27\",\n                \"2020-02-28\",\n                \"2020-02-29\",\n                \"2020-03-01\",\n                \"2020-03-02\",\n                \"2020-03-03\",\n                \"2020-03-04\",\n                \"2020-03-05\",\n                \"2020-03-06\",\n                \"2020-03-07\",\n                \"2020-03-08\",\n                \"2020-03-09\",\n                \"2020-03-10\",\n                \"2020-03-11\",\n                \"2020-03-12\",\n                \"2020-03-13\",\n                \"2020-03-14\",\n                \"2020-03-15\",\n                \"2020-03-16\",\n                \"2020-03-17\",\n                \"2020-03-18\",\n                \"2020-03-19\",\n                \"2020-03-20\",\n                \"2020-03-21\",\n                \"2020-03-22\",\n                \"2020-03-23\",\n                \"2020-03-24\",\n                \"2020-03-25\",\n                \"2020-03-26\",\n                \"2020-03-27\",\n                \"2020-03-28\",\n                \"2020-03-29\",\n                \"2020-03-30\",\n                \"2020-03-31\",\n                \"2020-04-01\",\n                \"2020-04-02\",\n                \"2020-04-03\",\n                \"2020-04-04\",\n                \"2020-04-05\",\n                \"2020-04-06\",\n                \"2020-04-07\",\n                \"2020-04-08\",\n                \"2020-04-09\",\n                \"2020-04-10\",\n                \"2020-04-11\",\n                \"2020-04-12\",\n                \"2020-04-13\",\n                \"2020-04-14\",\n                \"2020-04-15\",\n                \"2020-04-16\",\n                \"2020-04-17\",\n                \"2020-04-18\",\n                \"2020-04-19\",\n                \"2020-04-20\",\n                \"2020-04-21\",\n                \"2020-04-22\",\n                \"2020-04-23\",\n                \"2020-04-24\",\n                \"2020-04-25\",\n                \"2020-04-26\",\n                \"2020-04-27\",\n                \"2020-04-28\",\n                \"2020-04-29\",\n                \"2020-04-30\",\n                \"2020-05-01\",\n                \"2020-05-02\",\n                \"2020-05-03\",\n                \"2020-05-04\",\n                \"2020-05-05\",\n                \"2020-05-06\",\n                \"2020-05-07\",\n                \"2020-05-08\",\n                \"2020-05-09\",\n                \"2020-05-10\",\n                \"2020-05-11\",\n                \"2020-05-12\",\n                \"2020-05-13\",\n                \"2020-05-14\",\n                \"2020-05-15\",\n                \"2020-05-16\",\n                \"2020-05-17\",\n                \"2020-05-18\",\n                \"2020-05-19\",\n                \"2020-05-20\",\n                \"2020-05-21\",\n                \"2020-05-22\",\n                \"2020-05-23\",\n                \"2020-05-24\",\n                \"2020-05-25\",\n                \"2020-05-26\",\n                \"2020-05-27\",\n                \"2020-05-28\",\n                \"2020-05-29\",\n                \"2020-05-30\",\n                \"2020-05-31\",\n                \"2020-06-01\",\n                \"2020-06-02\",\n                \"2020-06-03\",\n                \"2020-06-04\",\n                \"2020-06-05\",\n                \"2020-06-06\",\n                \"2020-06-07\",\n                \"2020-06-08\",\n                \"2020-06-09\",\n                \"2020-06-10\",\n                \"2020-06-11\",\n                \"2020-06-12\",\n                \"2020-06-13\",\n                \"2020-06-14\",\n                \"2020-06-15\",\n                \"2020-06-16\",\n                \"2020-06-17\",\n                \"2020-06-18\",\n                \"2020-06-19\",\n                \"2020-06-20\",\n                \"2020-06-21\",\n                \"2020-06-22\",\n                \"2020-06-23\",\n                \"2020-06-24\",\n                \"2020-06-25\",\n                \"2020-06-26\",\n                \"2020-06-27\",\n                \"2020-06-28\",\n                \"2020-06-29\",\n                \"2020-06-30\",\n                \"2020-07-01\",\n                \"2020-07-02\",\n                \"2020-07-03\",\n                \"2020-07-04\",\n                \"2020-07-05\",\n                \"2020-07-06\",\n                \"2020-07-07\",\n                \"2020-07-08\",\n                \"2020-07-09\",\n                \"2020-07-10\",\n                \"2020-07-11\",\n                \"2020-07-12\",\n                \"2020-07-13\",\n                \"2020-07-14\",\n                \"2020-07-15\",\n                \"2020-07-16\",\n                \"2020-07-17\",\n                \"2020-07-18\",\n                \"2020-07-19\",\n                \"2020-07-20\",\n                \"2020-07-21\",\n                \"2020-07-22\",\n                \"2020-07-23\",\n                \"2020-07-24\",\n                \"2020-07-25\",\n                \"2020-07-26\",\n                \"2020-07-27\",\n                \"2020-07-28\",\n                \"2020-07-29\",\n                \"2020-07-30\",\n                \"2020-07-31\",\n                \"2020-08-01\",\n                \"2020-08-02\",\n                \"2020-08-03\",\n                \"2020-08-04\",\n                \"2020-08-05\",\n                \"2020-08-06\",\n                \"2020-08-07\",\n                \"2020-08-08\",\n                \"2020-08-09\",\n                \"2020-08-10\",\n                \"2020-08-11\",\n                \"2020-08-12\",\n                \"2020-08-13\",\n                \"2020-08-14\",\n                \"2020-08-15\",\n                \"2020-08-16\",\n                \"2020-08-17\",\n                \"2020-08-18\",\n                \"2020-08-19\",\n                \"2020-08-20\",\n                \"2020-08-21\",\n                \"2020-08-22\",\n                \"2020-08-23\",\n                \"2020-08-24\",\n                \"2020-08-25\",\n                \"2020-08-26\",\n                \"2020-08-27\",\n                \"2020-08-28\",\n                \"2020-08-29\",\n                \"2020-08-30\",\n                \"2020-08-31\",\n                \"2020-09-01\",\n                \"2020-09-02\",\n                \"2020-09-03\",\n                \"2020-09-04\",\n                \"2020-09-05\",\n                \"2020-09-06\",\n                \"2020-09-07\",\n                \"2020-09-08\",\n                \"2020-09-09\",\n                \"2020-09-10\",\n                \"2020-09-11\",\n                \"2020-09-12\",\n                \"2020-09-13\",\n                \"2020-09-14\",\n                \"2020-09-15\",\n                \"2020-09-16\",\n                \"2020-09-17\",\n                \"2020-09-18\",\n                \"2020-09-19\",\n                \"2020-09-20\",\n                \"2020-09-21\",\n                \"2020-09-22\",\n                \"2020-09-23\",\n                \"2020-09-24\",\n                \"2020-09-25\",\n                \"2020-09-26\",\n                \"2020-09-27\",\n                \"2020-09-28\",\n                \"2020-09-29\",\n                \"2020-09-30\",\n                \"2020-10-01\",\n                \"2020-10-02\",\n                \"2020-10-03\",\n                \"2020-10-04\",\n                \"2020-10-05\",\n                \"2020-10-06\",\n                \"2020-10-07\",\n                \"2020-10-08\",\n                \"2020-10-09\",\n                \"2020-10-10\",\n                \"2020-10-11\",\n                \"2020-10-12\",\n                \"2020-10-13\",\n                \"2020-10-14\",\n                \"2020-10-15\",\n                \"2020-10-16\",\n                \"2020-10-17\",\n                \"2020-10-18\",\n                \"2020-10-19\",\n                \"2020-10-20\",\n                \"2020-10-21\",\n                \"2020-10-22\",\n                \"2020-10-23\",\n                \"2020-10-24\",\n                \"2020-10-25\",\n                \"2020-10-26\",\n                \"2020-10-27\",\n                \"2020-10-28\",\n                \"2020-10-29\",\n                \"2020-10-30\",\n                \"2020-10-31\",\n                \"2020-11-01\",\n                \"2020-11-02\",\n                \"2020-11-03\",\n                \"2020-11-04\",\n                \"2020-11-05\",\n                \"2020-11-06\",\n                \"2020-11-07\",\n                \"2020-11-08\",\n                \"2020-11-09\",\n                \"2020-11-10\",\n                \"2020-11-11\",\n                \"2020-11-12\",\n                \"2020-11-13\",\n                \"2020-11-14\",\n                \"2020-11-15\",\n                \"2020-11-16\",\n                \"2020-11-17\",\n                \"2020-11-18\",\n                \"2020-11-19\",\n                \"2020-11-20\",\n                \"2020-11-21\",\n                \"2020-11-22\",\n                \"2020-11-23\",\n                \"2020-11-24\",\n                \"2020-11-25\",\n                \"2020-11-26\",\n                \"2020-11-27\",\n                \"2020-11-28\",\n                \"2020-11-29\",\n                \"2020-11-30\",\n                \"2020-12-01\",\n                \"2020-12-02\",\n                \"2020-12-03\",\n                \"2020-12-04\",\n                \"2020-12-05\",\n                \"2020-12-06\",\n                \"2020-12-07\",\n                \"2020-12-08\",\n                \"2020-12-09\",\n                \"2020-12-10\",\n                \"2020-12-11\",\n                \"2020-12-12\",\n                \"2020-12-13\",\n                \"2020-12-14\",\n                \"2020-12-15\",\n                \"2020-12-16\",\n                \"2020-12-17\",\n                \"2020-12-18\",\n                \"2020-12-19\",\n                \"2020-12-20\",\n                \"2020-12-21\",\n                \"2020-12-22\",\n                \"2020-12-23\",\n                \"2020-12-24\",\n                \"2020-12-25\",\n                \"2020-12-26\",\n                \"2020-12-27\",\n                \"2020-12-28\",\n                \"2020-12-29\",\n                \"2020-12-30\",\n                \"2020-12-31\",\n                \"2021-01-01\",\n                \"2021-01-02\",\n                \"2021-01-03\",\n                \"2021-01-04\",\n                \"2021-01-05\",\n                \"2021-01-06\",\n                \"2021-01-07\",\n                \"2021-01-08\",\n                \"2021-01-09\",\n                \"2021-01-10\",\n                \"2021-01-11\",\n                \"2021-01-12\",\n                \"2021-01-13\",\n                \"2021-01-14\",\n                \"2021-01-15\",\n                \"2021-01-16\",\n                \"2021-01-17\",\n                \"2021-01-18\",\n                \"2021-01-19\",\n                \"2021-01-20\",\n                \"2021-01-21\",\n                \"2021-01-22\",\n                \"2021-01-23\",\n                \"2021-01-24\",\n                \"2021-01-25\",\n                \"2021-01-26\",\n                \"2021-01-27\",\n                \"2021-01-28\",\n                \"2021-01-29\",\n                \"2021-01-30\",\n                \"2021-01-31\",\n                \"2021-02-01\",\n                \"2021-02-02\",\n                \"2021-02-03\",\n                \"2021-02-04\",\n                \"2021-02-05\",\n                \"2021-02-06\",\n                \"2021-02-07\",\n                \"2021-02-08\",\n                \"2021-02-09\",\n                \"2021-02-10\",\n                \"2021-02-11\",\n                \"2021-02-12\",\n                \"2021-02-13\",\n                \"2021-02-14\",\n                \"2021-02-15\",\n                \"2021-02-16\",\n                \"2021-02-17\",\n                \"2021-02-18\",\n                \"2021-02-19\",\n                \"2021-02-20\",\n                \"2021-02-21\",\n                \"2021-02-22\",\n                \"2021-02-23\",\n                \"2021-02-24\",\n                \"2021-02-25\",\n                \"2021-02-26\",\n                \"2021-02-27\",\n                \"2021-02-28\",\n                \"2021-03-01\",\n                \"2021-03-02\",\n                \"2021-03-03\",\n                \"2021-03-04\",\n                \"2021-03-05\",\n                \"2021-03-06\",\n                \"2021-03-07\",\n                \"2021-03-08\",\n                \"2021-03-09\",\n                \"2021-03-10\",\n                \"2021-03-11\",\n                \"2021-03-12\",\n                \"2021-03-13\",\n                \"2021-03-14\",\n                \"2021-03-15\",\n                \"2021-03-16\",\n                \"2021-03-17\",\n                \"2021-03-18\",\n                \"2021-03-19\",\n                \"2021-03-20\",\n                \"2021-03-21\",\n                \"2021-03-22\",\n                \"2021-03-23\",\n                \"2021-03-24\",\n                \"2021-03-25\",\n                \"2021-03-26\",\n                \"2021-03-27\",\n                \"2021-03-28\",\n                \"2021-03-29\",\n                \"2021-03-30\",\n                \"2021-03-31\",\n                \"2021-04-01\",\n                \"2021-04-02\",\n                \"2021-04-03\",\n                \"2021-04-04\",\n                \"2021-04-05\",\n                \"2021-04-06\",\n                \"2021-04-07\",\n                \"2021-04-08\",\n                \"2021-04-09\",\n                \"2021-04-10\",\n                \"2021-04-11\",\n                \"2021-04-12\",\n                \"2021-04-13\",\n                \"2021-04-14\",\n                \"2021-04-15\",\n                \"2021-04-16\",\n                \"2021-04-17\",\n                \"2021-04-18\",\n                \"2021-04-19\",\n                \"2021-04-20\",\n                \"2021-04-21\",\n                \"2021-04-22\",\n                \"2021-04-23\",\n                \"2021-04-24\",\n                \"2021-04-25\",\n                \"2021-04-26\",\n                \"2021-04-27\",\n                \"2021-04-28\",\n                \"2021-04-29\",\n                \"2021-04-30\",\n                \"2021-05-01\",\n                \"2021-05-02\",\n                \"2021-05-03\",\n                \"2021-05-04\",\n                \"2021-05-05\",\n                \"2021-05-06\",\n                \"2021-05-07\",\n                \"2021-05-08\",\n                \"2021-05-09\",\n                \"2021-05-10\",\n                \"2021-05-11\",\n                \"2021-05-12\",\n                \"2021-05-13\",\n                \"2021-05-14\",\n                \"2021-05-15\",\n                \"2021-05-16\",\n                \"2021-05-17\",\n                \"2021-05-18\",\n                \"2021-05-19\",\n                \"2021-05-20\",\n                \"2021-05-21\",\n                \"2021-05-22\",\n                \"2021-05-23\",\n                \"2021-05-24\",\n                \"2021-05-25\",\n                \"2021-05-26\",\n                \"2021-05-27\",\n                \"2021-05-28\",\n                \"2021-05-29\",\n                \"2021-05-30\",\n                \"2021-05-31\",\n                \"2021-06-01\",\n                \"2021-06-02\",\n                \"2021-06-03\",\n                \"2021-06-04\",\n                \"2021-06-05\",\n                \"2021-06-06\",\n                \"2021-06-07\",\n                \"2021-06-08\",\n                \"2021-06-09\",\n                \"2021-06-10\",\n                \"2021-06-11\",\n                \"2021-06-12\",\n                \"2021-06-13\",\n                \"2021-06-14\",\n                \"2021-06-15\",\n                \"2021-06-16\",\n                \"2021-06-17\",\n                \"2021-06-18\",\n                \"2021-06-19\",\n                \"2021-06-20\",\n                \"2021-06-21\",\n                \"2021-06-22\",\n                \"2021-06-23\",\n                \"2021-06-24\",\n                \"2021-06-25\",\n                \"2021-06-26\",\n                \"2021-06-27\",\n                \"2021-06-28\",\n                \"2021-06-29\",\n                \"2021-06-30\",\n                \"2021-07-01\",\n                \"2021-07-02\",\n                \"2021-07-03\",\n                \"2021-07-04\",\n                \"2021-07-05\",\n                \"2021-07-06\",\n                \"2021-07-07\",\n                \"2021-07-08\",\n                \"2021-07-09\",\n                \"2021-07-10\",\n                \"2021-07-11\",\n                \"2021-07-12\",\n                \"2021-07-13\",\n                \"2021-07-14\",\n                \"2021-07-15\",\n                \"2021-07-16\",\n                \"2021-07-17\",\n                \"2021-07-18\",\n                \"2021-07-19\",\n                \"2021-07-20\",\n                \"2021-07-21\",\n                \"2021-07-22\",\n                \"2021-07-23\",\n                \"2021-07-24\",\n                \"2021-07-25\",\n                \"2021-07-26\",\n                \"2021-07-27\",\n                \"2021-07-28\",\n                \"2021-07-29\",\n                \"2021-07-30\",\n                \"2021-07-31\",\n                \"2021-08-01\",\n                \"2021-08-02\",\n                \"2021-08-03\",\n                \"2021-08-04\",\n                \"2021-08-05\",\n                \"2021-08-06\",\n                \"2021-08-07\",\n                \"2021-08-08\",\n                \"2021-08-09\",\n                \"2021-08-10\",\n                \"2021-08-11\",\n                \"2021-08-12\",\n                \"2021-08-13\",\n                \"2021-08-14\",\n                \"2021-08-15\",\n                \"2021-08-16\",\n                \"2021-08-17\",\n                \"2021-08-18\",\n                \"2021-08-19\",\n                \"2021-08-20\",\n                \"2021-08-21\",\n                \"2021-08-22\",\n                \"2021-08-23\",\n                \"2021-08-24\",\n                \"2021-08-25\",\n                \"2021-08-26\",\n                \"2021-08-27\",\n                \"2021-08-28\",\n                \"2021-08-29\",\n                \"2021-08-30\",\n                \"2021-08-31\",\n                \"2021-09-01\",\n                \"2021-09-02\",\n                \"2021-09-03\",\n                \"2021-09-04\",\n                \"2021-09-05\",\n                \"2021-09-06\",\n                \"2021-09-07\",\n                \"2021-09-08\",\n                \"2021-09-09\",\n                \"2021-09-10\",\n                \"2021-09-11\",\n                \"2021-09-12\",\n                \"2021-09-13\",\n                \"2021-09-14\",\n                \"2021-09-15\",\n                \"2021-09-16\",\n                \"2021-09-17\",\n                \"2021-09-18\",\n                \"2021-09-19\",\n                \"2021-09-20\",\n                \"2021-09-21\",\n                \"2021-09-22\",\n                \"2021-09-23\",\n                \"2021-09-24\",\n                \"2021-09-25\",\n                \"2021-09-26\",\n                \"2021-09-27\",\n                \"2021-09-28\",\n                \"2021-09-29\",\n                \"2021-09-30\",\n                \"2021-10-01\",\n                \"2021-10-02\",\n                \"2021-10-03\",\n                \"2021-10-04\",\n                \"2021-10-05\",\n                \"2021-10-06\",\n                \"2021-10-07\",\n                \"2021-10-08\",\n                \"2021-10-09\",\n                \"2021-10-10\",\n                \"2021-10-11\",\n                \"2021-10-12\",\n                \"2021-10-13\",\n                \"2021-10-14\",\n                \"2021-10-15\",\n                \"2021-10-16\",\n                \"2021-10-17\",\n                \"2021-10-18\",\n                \"2021-10-19\",\n                \"2021-10-20\",\n                \"2021-10-21\",\n                \"2021-10-22\",\n                \"2021-10-23\",\n                \"2021-10-24\",\n                \"2021-10-25\",\n                \"2021-10-26\",\n                \"2021-10-27\",\n                \"2021-10-28\",\n                \"2021-10-29\",\n                \"2021-10-30\",\n                \"2021-10-31\",\n                \"2021-11-01\",\n                \"2021-11-02\",\n                \"2021-11-03\",\n                \"2021-11-04\",\n                \"2021-11-05\",\n                \"2021-11-06\",\n                \"2021-11-07\",\n                \"2021-11-08\",\n                \"2021-11-09\",\n                \"2021-11-10\",\n                \"2021-11-11\",\n                \"2021-11-12\",\n                \"2021-11-13\",\n                \"2021-11-14\",\n                \"2021-11-15\",\n                \"2021-11-16\",\n                \"2021-11-17\",\n                \"2021-11-18\",\n                \"2021-11-19\",\n                \"2021-11-20\",\n                \"2021-11-21\",\n                \"2021-11-22\",\n                \"2021-11-23\",\n                \"2021-11-24\",\n                \"2021-11-25\",\n                \"2021-11-26\",\n                \"2021-11-27\",\n                \"2021-11-28\",\n                \"2021-11-29\",\n                \"2021-11-30\",\n                \"2021-12-01\",\n                \"2021-12-02\",\n                \"2021-12-03\",\n                \"2021-12-04\",\n                \"2021-12-05\",\n                \"2021-12-06\",\n                \"2021-12-07\",\n                \"2021-12-08\",\n                \"2021-12-09\",\n                \"2021-12-10\",\n                \"2021-12-11\",\n                \"2021-12-12\",\n                \"2021-12-13\",\n                \"2021-12-14\",\n                \"2021-12-15\",\n                \"2021-12-16\",\n                \"2021-12-17\",\n                \"2021-12-18\",\n                \"2021-12-19\",\n                \"2021-12-20\"\n              ],\n              \"y\": [\n                100.0,\n                100.56,\n                99.02,\n                98.61,\n                98.61,\n                94.05,\n                94.61,\n                95.18,\n                95.74,\n                98.74,\n                98.68,\n                100.2,\n                100.46,\n                100.54,\n                100.61,\n                100.68,\n                99.76,\n                98.69,\n                95.56,\n                91.14,\n                90.54,\n                89.94,\n                89.34,\n                91.69,\n                88.83,\n                88.9,\n                89.23,\n                90.89,\n                92.56,\n                94.22,\n                99.82,\n                98.15,\n                99.22,\n                97.64,\n                97.6,\n                97.56,\n                97.53,\n                95.21,\n                94.89,\n                97.75,\n                98.23,\n                99.1,\n                99.97,\n                100.83,\n                100.1,\n                100.14,\n                104.39,\n                104.52,\n                104.65,\n                104.78,\n                104.91,\n                105.63,\n                103.85,\n                103.44,\n                101.57,\n                101.82,\n                102.06,\n                102.31,\n                100.91,\n                103.94,\n                104.22,\n                103.63,\n                103.4,\n                103.16,\n                102.93,\n                102.85,\n                102.42,\n                101.27,\n                101.89,\n                102.13,\n                102.38,\n                102.63,\n                102.48,\n                101.27,\n                103.53,\n                102.81,\n                102.52,\n                102.23,\n                101.93,\n                102.48,\n                103.05,\n                104.51,\n                105.43,\n                104.99,\n                104.56,\n                104.13,\n                104.87,\n                105.26,\n                103.45,\n                104.3,\n                103.85,\n                103.4,\n                102.95,\n                102.51,\n                102.84,\n                103.02,\n                104.44,\n                104.45,\n                104.47,\n                104.49,\n                103.73,\n                102.08,\n                103.35,\n                100.79,\n                101.23,\n                101.67,\n                102.11,\n                103.1,\n                103.02,\n                104.14,\n                103.98,\n                103.8,\n                103.62,\n                103.44,\n                104.0,\n                103.97,\n                103.71,\n                104.98,\n                105.19,\n                105.41,\n                105.63,\n                106.55,\n                106.17,\n                105.95,\n                106.58,\n                106.62,\n                106.67,\n                106.71,\n                107.81,\n                106.62,\n                107.27,\n                107.34,\n                107.4,\n                107.47,\n                107.54,\n                108.48,\n                109.16,\n                108.18,\n                108.12,\n                108.38,\n                108.63,\n                108.89,\n                108.87,\n                108.91,\n                108.15,\n                108.73,\n                108.88,\n                109.03,\n                109.19,\n                110.78,\n                112.08,\n                113.59,\n                114.08,\n                114.76,\n                115.43,\n                116.11,\n                116.93,\n                117.46,\n                116.79,\n                118.02,\n                118.08,\n                118.15,\n                118.21,\n                120.33,\n                122.12,\n                123.35,\n                120.86,\n                121.15,\n                121.44,\n                121.72,\n                116.2,\n                116.34,\n                117.65,\n                116.47,\n                117.43,\n                118.39,\n                119.35,\n                120.22,\n                117.77,\n                116.27,\n                116.32,\n                116.18,\n                116.05,\n                115.91,\n                114.95,\n                116.69,\n                115.54,\n                118.13,\n                118.19,\n                118.25,\n                118.31,\n                118.34,\n                116.31,\n                115.9,\n                115.68,\n                115.82,\n                115.95,\n                116.09,\n                116.23,\n                116.93,\n                117.5,\n                116.52,\n                116.82,\n                117.13,\n                117.43,\n                117.63,\n                117.86,\n                116.65,\n                117.37,\n                116.35,\n                115.33,\n                114.31,\n                114.16,\n                111.83,\n                112.34,\n                111.7,\n                112.0,\n                112.3,\n                112.61,\n                113.9,\n                113.49,\n                114.75,\n                114.25,\n                114.5,\n                114.75,\n                114.99,\n                114.31,\n                113.26,\n                113.56,\n                115.41,\n                115.47,\n                115.53,\n                115.6,\n                113.55,\n                114.32,\n                114.43,\n                114.29,\n                114.4,\n                114.51,\n                114.63,\n                114.87,\n                115.72,\n                114.31,\n                114.36,\n                114.38,\n                114.39,\n                114.4,\n                114.77,\n                112.81,\n                112.17,\n                112.88,\n                113.14,\n                113.4,\n                113.66,\n                114.75,\n                113.92,\n                116.97,\n                117.27,\n                115.32,\n                113.37,\n                111.43,\n                112.76,\n                111.88,\n                112.59,\n                113.38,\n                113.41,\n                113.45,\n                113.48,\n                113.31,\n                112.65,\n                111.9,\n                112.59,\n                111.9,\n                111.2,\n                110.5,\n                108.52,\n                108.57,\n                107.86,\n                107.14,\n                107.02,\n                106.89,\n                106.77,\n                109.08,\n                109.77,\n                110.44,\n                110.39,\n                110.91,\n                111.43,\n                111.95,\n                112.49,\n                110.31,\n                110.25,\n                110.62,\n                110.4,\n                110.18,\n                109.96,\n                111.37,\n                111.6,\n                113.47,\n                113.38,\n                113.25,\n                113.12,\n                112.99,\n                112.23,\n                112.72,\n                113.03,\n                112.99,\n                112.95,\n                112.91,\n                112.87,\n                113.02,\n                113.7,\n                113.83,\n                114.6,\n                115.38,\n                116.15,\n                116.93,\n                117.41,\n                114.66,\n                114.98,\n                110.28,\n                110.59,\n                110.9,\n                111.21,\n                110.81,\n                111.45,\n                111.25,\n                109.99,\n                110.14,\n                110.3,\n                110.45,\n                110.6,\n                112.19,\n                112.16,\n                111.58,\n                111.56,\n                111.55,\n                111.53,\n                111.28,\n                110.93,\n                110.51,\n                111.07,\n                111.34,\n                111.61,\n                111.89,\n                110.06,\n                110.17,\n                107.56,\n                108.88,\n                109.31,\n                109.73,\n                110.15,\n                110.35,\n                110.67,\n                109.73,\n                109.53,\n                109.16,\n                108.79,\n                108.43,\n                108.06,\n                106.49,\n                106.63,\n                106.77,\n                107.39,\n                108.01,\n                108.63,\n                108.49,\n                108.01,\n                106.69,\n                103.91,\n                103.79,\n                103.68,\n                103.57,\n                104.21,\n                103.14,\n                102.23,\n                102.1,\n                101.69,\n                101.28,\n                100.88,\n                103.21,\n                103.51,\n                103.56,\n                103.39,\n                103.58,\n                103.77,\n                103.95,\n                104.06,\n                103.83,\n                104.15,\n                104.71,\n                104.63,\n                104.56,\n                104.49,\n                103.7,\n                104.19,\n                103.71,\n                104.15,\n                103.75,\n                103.35,\n                102.94,\n                101.25,\n                103.05,\n                103.81,\n                103.82,\n                103.83,\n                103.83,\n                103.84,\n                104.71,\n                104.63,\n                105.63,\n                104.82,\n                104.58,\n                104.34,\n                104.09,\n                104.99,\n                104.32,\n                106.15,\n                106.97,\n                106.77,\n                106.58,\n                106.39,\n                106.86,\n                107.77,\n                107.1,\n                106.85,\n                106.89,\n                106.93,\n                106.98,\n                106.91,\n                106.62,\n                106.31,\n                106.26,\n                106.75,\n                107.23,\n                107.71,\n                106.77,\n                107.27,\n                109.16,\n                110.1,\n                110.23,\n                110.36,\n                110.48,\n                110.39,\n                109.59,\n                109.66,\n                110.51,\n                111.1,\n                111.69,\n                112.29,\n                112.31,\n                113.12,\n                113.15,\n                112.84,\n                113.0,\n                113.16,\n                113.32,\n                114.13,\n                114.32,\n                113.98,\n                114.39,\n                114.4,\n                114.4,\n                114.41,\n                114.42,\n                114.69,\n                112.51,\n                113.63,\n                113.77,\n                113.91,\n                114.05,\n                113.77,\n                113.83,\n                113.89,\n                112.88,\n                112.61,\n                112.35,\n                112.08,\n                111.51,\n                111.81,\n                106.65,\n                106.3,\n                106.58,\n                106.86,\n                107.14,\n                106.8,\n                107.17,\n                106.76,\n                106.82,\n                106.88,\n                106.94,\n                107.0,\n                105.99,\n                106.47,\n                106.78,\n                107.18,\n                107.35,\n                107.51,\n                107.67,\n                107.84,\n                108.32,\n                108.21,\n                108.83,\n                108.74,\n                108.65,\n                108.56,\n                108.79,\n                109.69,\n                109.94,\n                109.1,\n                108.99,\n                108.87,\n                108.75,\n                108.88,\n                108.4,\n                108.53,\n                108.31,\n                108.26,\n                108.21,\n                108.15,\n                108.2,\n                108.2,\n                110.11,\n                108.99,\n                109.1,\n                109.21,\n                109.32,\n                108.84,\n                108.86,\n                108.54,\n                105.82,\n                105.09,\n                104.36,\n                103.62,\n                103.95,\n                105.25,\n                105.16,\n                106.74,\n                106.97,\n                107.21,\n                107.44,\n                107.33,\n                107.12,\n                107.04,\n                107.09,\n                107.53,\n                107.98,\n                108.42,\n                108.57,\n                107.52,\n                107.76,\n                109.23,\n                109.08,\n                108.92,\n                108.77,\n                109.13,\n                109.02,\n                108.75,\n                110.09,\n                109.56,\n                109.04,\n                108.51,\n                107.98,\n                107.67,\n                108.07,\n                107.6,\n                107.65,\n                107.7,\n                107.75,\n                108.51,\n                107.77,\n                105.5,\n                105.19,\n                105.44,\n                105.68,\n                105.93,\n                106.79,\n                106.83,\n                105.08,\n                105.21,\n                105.21,\n                105.22,\n                105.22,\n                104.37,\n                103.51,\n                105.54,\n                105.64,\n                105.83,\n                106.01,\n                106.2,\n                105.8,\n                105.85,\n                105.7,\n                105.6,\n                105.57,\n                105.53,\n                105.5,\n                105.72,\n                107.85,\n                108.03,\n                106.26,\n                106.21,\n                106.16,\n                106.11,\n                106.41,\n                107.27,\n                107.1,\n                107.96,\n                108.17,\n                108.38,\n                108.59,\n                107.79,\n                108.1,\n                108.33,\n                107.21,\n                107.45,\n                107.69,\n                107.93,\n                107.55,\n                106.04,\n                107.81,\n                109.22,\n                109.44,\n                109.66,\n                109.88,\n                110.05,\n                111.09,\n                112.03,\n                112.31,\n                112.28,\n                112.24,\n                112.2,\n                111.45,\n                112.42,\n                111.9,\n                111.31,\n                110.4,\n                109.5,\n                108.59,\n                107.24,\n                107.27,\n                107.71,\n                107.35,\n                107.29,\n                107.23,\n                107.17,\n                106.64,\n                107.12,\n                105.87,\n                107.15,\n                107.06,\n                106.97,\n                106.88,\n                107.18,\n                107.23,\n                106.7,\n                107.2,\n                107.27,\n                107.34,\n                107.41,\n                106.45,\n                105.98,\n                108.03,\n                108.46,\n                108.26,\n                108.05,\n                107.85\n              ],\n              \"yaxis\": \"y2\",\n              \"type\": \"scatter\"\n            }\n          ],\n          \"layout\": {\n            \"template\": {\n              \"data\": {\n                \"bar\": [\n                  {\n                    \"error_x\": {\n                      \"color\": \"#2a3f5f\"\n                    },\n                    \"error_y\": {\n                      \"color\": \"#2a3f5f\"\n                    },\n                    \"marker\": {\n                      \"line\": {\n                        \"color\": \"#E5ECF6\",\n                        \"width\": 0.5\n                      },\n                      \"pattern\": {\n                        \"fillmode\": \"overlay\",\n                        \"size\": 10,\n                        \"solidity\": 0.2\n                      }\n                    },\n                    \"type\": \"bar\"\n                  }\n                ],\n                \"barpolar\": [\n                  {\n                    \"marker\": {\n                      \"line\": {\n                        \"color\": \"#E5ECF6\",\n                        \"width\": 0.5\n                      },\n                      \"pattern\": {\n                        \"fillmode\": \"overlay\",\n                        \"size\": 10,\n                        \"solidity\": 0.2\n                      }\n                    },\n                    \"type\": \"barpolar\"\n                  }\n                ],\n                \"carpet\": [\n                  {\n                    \"aaxis\": {\n                      \"endlinecolor\": \"#2a3f5f\",\n                      \"gridcolor\": \"white\",\n                      \"linecolor\": \"white\",\n                      \"minorgridcolor\": \"white\",\n                      \"startlinecolor\": \"#2a3f5f\"\n                    },\n                    \"baxis\": {\n                      \"endlinecolor\": \"#2a3f5f\",\n                      \"gridcolor\": \"white\",\n                      \"linecolor\": \"white\",\n                      \"minorgridcolor\": \"white\",\n                      \"startlinecolor\": \"#2a3f5f\"\n                    },\n                    \"type\": \"carpet\"\n                  }\n                ],\n                \"choropleth\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"type\": \"choropleth\"\n                  }\n                ],\n                \"contour\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"contour\"\n                  }\n                ],\n                \"contourcarpet\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"type\": \"contourcarpet\"\n                  }\n                ],\n                \"heatmap\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"heatmap\"\n                  }\n                ],\n                \"heatmapgl\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"heatmapgl\"\n                  }\n                ],\n                \"histogram\": [\n                  {\n                    \"marker\": {\n                      \"pattern\": {\n                        \"fillmode\": \"overlay\",\n                        \"size\": 10,\n                        \"solidity\": 0.2\n                      }\n                    },\n                    \"type\": \"histogram\"\n                  }\n                ],\n                \"histogram2d\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"histogram2d\"\n                  }\n                ],\n                \"histogram2dcontour\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"histogram2dcontour\"\n                  }\n                ],\n                \"mesh3d\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"type\": \"mesh3d\"\n                  }\n                ],\n                \"parcoords\": [\n                  {\n                    \"line\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"parcoords\"\n                  }\n                ],\n                \"pie\": [\n                  {\n                    \"automargin\": true,\n                    \"type\": \"pie\"\n                  }\n                ],\n                \"scatter\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scatter\"\n                  }\n                ],\n                \"scatter3d\": [\n                  {\n                    \"line\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scatter3d\"\n                  }\n                ],\n                \"scattercarpet\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scattercarpet\"\n                  }\n                ],\n                \"scattergeo\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scattergeo\"\n                  }\n                ],\n                \"scattergl\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scattergl\"\n                  }\n                ],\n                \"scattermapbox\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scattermapbox\"\n                  }\n                ],\n                \"scatterpolar\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scatterpolar\"\n                  }\n                ],\n                \"scatterpolargl\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scatterpolargl\"\n                  }\n                ],\n                \"scatterternary\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scatterternary\"\n                  }\n                ],\n                \"surface\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"surface\"\n                  }\n                ],\n                \"table\": [\n                  {\n                    \"cells\": {\n                      \"fill\": {\n                        \"color\": \"#EBF0F8\"\n                      },\n                      \"line\": {\n                        \"color\": \"white\"\n                      }\n                    },\n                    \"header\": {\n                      \"fill\": {\n                        \"color\": \"#C8D4E3\"\n                      },\n                      \"line\": {\n                        \"color\": \"white\"\n                      }\n                    },\n                    \"type\": \"table\"\n                  }\n                ]\n              },\n              \"layout\": {\n                \"annotationdefaults\": {\n                  \"arrowcolor\": \"#2a3f5f\",\n                  \"arrowhead\": 0,\n                  \"arrowwidth\": 1\n                },\n                \"autotypenumbers\": \"strict\",\n                \"coloraxis\": {\n                  \"colorbar\": {\n                    \"outlinewidth\": 0,\n                    \"ticks\": \"\"\n                  }\n                },\n                \"colorscale\": {\n                  \"diverging\": [\n                    [\n                      0,\n                      \"#8e0152\"\n                    ],\n                    [\n                      0.1,\n                      \"#c51b7d\"\n                    ],\n                    [\n                      0.2,\n                      \"#de77ae\"\n                    ],\n                    [\n                      0.3,\n                      \"#f1b6da\"\n                    ],\n                    [\n                      0.4,\n                      \"#fde0ef\"\n                    ],\n                    [\n                      0.5,\n                      \"#f7f7f7\"\n                    ],\n                    [\n                      0.6,\n                      \"#e6f5d0\"\n                    ],\n                    [\n                      0.7,\n                      \"#b8e186\"\n                    ],\n                    [\n                      0.8,\n                      \"#7fbc41\"\n                    ],\n                    [\n                      0.9,\n                      \"#4d9221\"\n                    ],\n                    [\n                      1,\n                      \"#276419\"\n                    ]\n                  ],\n                  \"sequential\": [\n                    [\n                      0.0,\n                      \"#0d0887\"\n                    ],\n                    [\n                      0.1111111111111111,\n                      \"#46039f\"\n                    ],\n                    [\n                      0.2222222222222222,\n                      \"#7201a8\"\n                    ],\n                    [\n                      0.3333333333333333,\n                      \"#9c179e\"\n                    ],\n                    [\n                      0.4444444444444444,\n                      \"#bd3786\"\n                    ],\n                    [\n                      0.5555555555555556,\n                      \"#d8576b\"\n                    ],\n                    [\n                      0.6666666666666666,\n                      \"#ed7953\"\n                    ],\n                    [\n                      0.7777777777777778,\n                      \"#fb9f3a\"\n                    ],\n                    [\n                      0.8888888888888888,\n                      \"#fdca26\"\n                    ],\n                    [\n                      1.0,\n                      \"#f0f921\"\n                    ]\n                  ],\n                  \"sequentialminus\": [\n                    [\n                      0.0,\n                      \"#0d0887\"\n                    ],\n                    [\n                      0.1111111111111111,\n                      \"#46039f\"\n                    ],\n                    [\n                      0.2222222222222222,\n                      \"#7201a8\"\n                    ],\n                    [\n                      0.3333333333333333,\n                      \"#9c179e\"\n                    ],\n                    [\n                      0.4444444444444444,\n                      \"#bd3786\"\n                    ],\n                    [\n                      0.5555555555555556,\n                      \"#d8576b\"\n                    ],\n                    [\n                      0.6666666666666666,\n                      \"#ed7953\"\n                    ],\n                    [\n                      0.7777777777777778,\n                      \"#fb9f3a\"\n                    ],\n                    [\n                      0.8888888888888888,\n                      \"#fdca26\"\n                    ],\n                    [\n                      1.0,\n                      \"#f0f921\"\n                    ]\n                  ]\n                },\n                \"colorway\": [\n                  \"#636efa\",\n                  \"#EF553B\",\n                  \"#00cc96\",\n                  \"#ab63fa\",\n                  \"#FFA15A\",\n                  \"#19d3f3\",\n                  \"#FF6692\",\n                  \"#B6E880\",\n                  \"#FF97FF\",\n                  \"#FECB52\"\n                ],\n                \"font\": {\n                  \"color\": \"#2a3f5f\"\n                },\n                \"geo\": {\n                  \"bgcolor\": \"white\",\n                  \"lakecolor\": \"white\",\n                  \"landcolor\": \"#E5ECF6\",\n                  \"showlakes\": true,\n                  \"showland\": true,\n                  \"subunitcolor\": \"white\"\n                },\n                \"hoverlabel\": {\n                  \"align\": \"left\"\n                },\n                \"hovermode\": \"closest\",\n                \"mapbox\": {\n                  \"style\": \"light\"\n                },\n                \"paper_bgcolor\": \"white\",\n                \"plot_bgcolor\": \"#E5ECF6\",\n                \"polar\": {\n                  \"angularaxis\": {\n                    \"gridcolor\": \"white\",\n                    \"linecolor\": \"white\",\n                    \"ticks\": \"\"\n                  },\n                  \"bgcolor\": \"#E5ECF6\",\n                  \"radialaxis\": {\n                    \"gridcolor\": \"white\",\n                    \"linecolor\": \"white\",\n                    \"ticks\": \"\"\n                  }\n                },\n                \"scene\": {\n                  \"xaxis\": {\n                    \"backgroundcolor\": \"#E5ECF6\",\n                    \"gridcolor\": \"white\",\n                    \"gridwidth\": 2,\n                    \"linecolor\": \"white\",\n                    \"showbackground\": true,\n                    \"ticks\": \"\",\n                    \"zerolinecolor\": \"white\"\n                  },\n                  \"yaxis\": {\n                    \"backgroundcolor\": \"#E5ECF6\",\n                    \"gridcolor\": \"white\",\n                    \"gridwidth\": 2,\n                    \"linecolor\": \"white\",\n                    \"showbackground\": true,\n                    \"ticks\": \"\",\n                    \"zerolinecolor\": \"white\"\n                  },\n                  \"zaxis\": {\n                    \"backgroundcolor\": \"#E5ECF6\",\n                    \"gridcolor\": \"white\",\n                    \"gridwidth\": 2,\n                    \"linecolor\": \"white\",\n                    \"showbackground\": true,\n                    \"ticks\": \"\",\n                    \"zerolinecolor\": \"white\"\n                  }\n                },\n                \"shapedefaults\": {\n                  \"line\": {\n                    \"color\": \"#2a3f5f\"\n                  }\n                },\n                \"ternary\": {\n                  \"aaxis\": {\n                    \"gridcolor\": \"white\",\n                    \"linecolor\": \"white\",\n                    \"ticks\": \"\"\n                  },\n                  \"baxis\": {\n                    \"gridcolor\": \"white\",\n                    \"linecolor\": \"white\",\n                    \"ticks\": \"\"\n                  },\n                  \"bgcolor\": \"#E5ECF6\",\n                  \"caxis\": {\n                    \"gridcolor\": \"white\",\n                    \"linecolor\": \"white\",\n                    \"ticks\": \"\"\n                  }\n                },\n                \"title\": {\n                  \"x\": 0.05\n                },\n                \"xaxis\": {\n                  \"automargin\": true,\n                  \"gridcolor\": \"white\",\n                  \"linecolor\": \"white\",\n                  \"ticks\": \"\",\n                  \"title\": {\n                    \"standoff\": 15\n                  },\n                  \"zerolinecolor\": \"white\",\n                  \"zerolinewidth\": 2\n                },\n                \"yaxis\": {\n                  \"automargin\": true,\n                  \"gridcolor\": \"white\",\n                  \"linecolor\": \"white\",\n                  \"ticks\": \"\",\n                  \"title\": {\n                    \"standoff\": 15\n                  },\n                  \"zerolinecolor\": \"white\",\n                  \"zerolinewidth\": 2\n                }\n              }\n            },\n            \"yaxis\": {\n              \"title\": {\n                \"text\": \"Total Cases\"\n              },\n              \"rangemode\": \"tozero\"\n            },\n            \"yaxis2\": {\n              \"title\": {\n                \"text\": \"%\"\n              },\n              \"rangemode\": \"tozero\",\n              \"overlaying\": \"y\",\n              \"side\": \"right\"\n            },\n            \"legend\": {\n              \"x\": 1.08\n            },\n            \"margin\": {\n              \"t\": 24,\n              \"b\": 0\n            },\n            \"paper_bgcolor\": \"rgba(0, 0, 0, 0)\"\n          }\n        }\n    )\n};\n"
  },
  {
    "path": "web/covid_deaths.js",
    "content": "\nwindow.PLOTLYENV=window.PLOTLYENV || {};\n    \nif (document.getElementById(\"2a950764-39fc-416d-97fe-0a6226a3095f\")) {\n    Plotly.newPlot(\n        '2a950764-39fc-416d-97fe-0a6226a3095f',\n        {\n          \"data\": [\n            {\n              \"hovertemplate\": \"Continent=South America<br>Date=%{x}<br>Total Deaths per Million=%{y}<extra></extra>\",\n              \"legendgroup\": \"South America\",\n              \"line\": {\n                \"color\": \"#636efa\",\n                \"dash\": \"solid\"\n              },\n              \"marker\": {\n                \"symbol\": \"circle\"\n              },\n              \"mode\": \"lines\",\n              \"name\": \"South America\",\n              \"showlegend\": true,\n              \"x\": [\n                \"2020-02-23\",\n                \"2020-02-24\",\n                \"2020-02-25\",\n                \"2020-02-26\",\n                \"2020-02-27\",\n                \"2020-02-28\",\n                \"2020-02-29\",\n                \"2020-03-01\",\n                \"2020-03-02\",\n                \"2020-03-03\",\n                \"2020-03-04\",\n                \"2020-03-05\",\n                \"2020-03-06\",\n                \"2020-03-07\",\n                \"2020-03-08\",\n                \"2020-03-09\",\n                \"2020-03-10\",\n                \"2020-03-11\",\n                \"2020-03-12\",\n                \"2020-03-13\",\n                \"2020-03-14\",\n                \"2020-03-15\",\n                \"2020-03-16\",\n                \"2020-03-17\",\n                \"2020-03-18\",\n                \"2020-03-19\",\n                \"2020-03-20\",\n                \"2020-03-21\",\n                \"2020-03-22\",\n                \"2020-03-23\",\n                \"2020-03-24\",\n                \"2020-03-25\",\n                \"2020-03-26\",\n                \"2020-03-27\",\n                \"2020-03-28\",\n                \"2020-03-29\",\n                \"2020-03-30\",\n                \"2020-03-31\",\n                \"2020-04-01\",\n                \"2020-04-02\",\n                \"2020-04-03\",\n                \"2020-04-04\",\n                \"2020-04-05\",\n                \"2020-04-06\",\n                \"2020-04-07\",\n                \"2020-04-08\",\n                \"2020-04-09\",\n                \"2020-04-10\",\n                \"2020-04-11\",\n                \"2020-04-12\",\n                \"2020-04-13\",\n                \"2020-04-14\",\n                \"2020-04-15\",\n                \"2020-04-16\",\n                \"2020-04-17\",\n                \"2020-04-18\",\n                \"2020-04-19\",\n                \"2020-04-20\",\n                \"2020-04-21\",\n                \"2020-04-22\",\n                \"2020-04-23\",\n                \"2020-04-24\",\n                \"2020-04-25\",\n                \"2020-04-26\",\n                \"2020-04-27\",\n                \"2020-04-28\",\n                \"2020-04-29\",\n                \"2020-04-30\",\n                \"2020-05-01\",\n                \"2020-05-02\",\n                \"2020-05-03\",\n                \"2020-05-04\",\n                \"2020-05-05\",\n                \"2020-05-06\",\n                \"2020-05-07\",\n                \"2020-05-08\",\n                \"2020-05-09\",\n                \"2020-05-10\",\n                \"2020-05-11\",\n                \"2020-05-12\",\n                \"2020-05-13\",\n                \"2020-05-14\",\n                \"2020-05-15\",\n                \"2020-05-16\",\n                \"2020-05-17\",\n                \"2020-05-18\",\n                \"2020-05-19\",\n                \"2020-05-20\",\n                \"2020-05-21\",\n                \"2020-05-22\",\n                \"2020-05-23\",\n                \"2020-05-24\",\n                \"2020-05-25\",\n                \"2020-05-26\",\n                \"2020-05-27\",\n                \"2020-05-28\",\n                \"2020-05-29\",\n                \"2020-05-30\",\n                \"2020-05-31\",\n                \"2020-06-01\",\n                \"2020-06-02\",\n                \"2020-06-03\",\n                \"2020-06-04\",\n                \"2020-06-05\",\n                \"2020-06-06\",\n                \"2020-06-07\",\n                \"2020-06-08\",\n                \"2020-06-09\",\n                \"2020-06-10\",\n                \"2020-06-11\",\n                \"2020-06-12\",\n                \"2020-06-13\",\n                \"2020-06-14\",\n                \"2020-06-15\",\n                \"2020-06-16\",\n                \"2020-06-17\",\n                \"2020-06-18\",\n                \"2020-06-19\",\n                \"2020-06-20\",\n                \"2020-06-21\",\n                \"2020-06-22\",\n                \"2020-06-23\",\n                \"2020-06-24\",\n                \"2020-06-25\",\n                \"2020-06-26\",\n                \"2020-06-27\",\n                \"2020-06-28\",\n                \"2020-06-29\",\n                \"2020-06-30\",\n                \"2020-07-01\",\n                \"2020-07-02\",\n                \"2020-07-03\",\n                \"2020-07-04\",\n                \"2020-07-05\",\n                \"2020-07-06\",\n                \"2020-07-07\",\n                \"2020-07-08\",\n                \"2020-07-09\",\n                \"2020-07-10\",\n                \"2020-07-11\",\n                \"2020-07-12\",\n                \"2020-07-13\",\n                \"2020-07-14\",\n                \"2020-07-15\",\n                \"2020-07-16\",\n                \"2020-07-17\",\n                \"2020-07-18\",\n                \"2020-07-19\",\n                \"2020-07-20\",\n                \"2020-07-21\",\n                \"2020-07-22\",\n                \"2020-07-23\",\n                \"2020-07-24\",\n                \"2020-07-25\",\n                \"2020-07-26\",\n                \"2020-07-27\",\n                \"2020-07-28\",\n                \"2020-07-29\",\n                \"2020-07-30\",\n                \"2020-07-31\",\n                \"2020-08-01\",\n                \"2020-08-02\",\n                \"2020-08-03\",\n                \"2020-08-04\",\n                \"2020-08-05\",\n                \"2020-08-06\",\n                \"2020-08-07\",\n                \"2020-08-08\",\n                \"2020-08-09\",\n                \"2020-08-10\",\n                \"2020-08-11\",\n                \"2020-08-12\",\n                \"2020-08-13\",\n                \"2020-08-14\",\n                \"2020-08-15\",\n                \"2020-08-16\",\n                \"2020-08-17\",\n                \"2020-08-18\",\n                \"2020-08-19\",\n                \"2020-08-20\",\n                \"2020-08-21\",\n                \"2020-08-22\",\n                \"2020-08-23\",\n                \"2020-08-24\",\n                \"2020-08-25\",\n                \"2020-08-26\",\n                \"2020-08-27\",\n                \"2020-08-28\",\n                \"2020-08-29\",\n                \"2020-08-30\",\n                \"2020-08-31\",\n                \"2020-09-01\",\n                \"2020-09-02\",\n                \"2020-09-03\",\n                \"2020-09-04\",\n                \"2020-09-05\",\n                \"2020-09-06\",\n                \"2020-09-07\",\n                \"2020-09-08\",\n                \"2020-09-09\",\n                \"2020-09-10\",\n                \"2020-09-11\",\n                \"2020-09-12\",\n                \"2020-09-13\",\n                \"2020-09-14\",\n                \"2020-09-15\",\n                \"2020-09-16\",\n                \"2020-09-17\",\n                \"2020-09-18\",\n                \"2020-09-19\",\n                \"2020-09-20\",\n                \"2020-09-21\",\n                \"2020-09-22\",\n                \"2020-09-23\",\n                \"2020-09-24\",\n                \"2020-09-25\",\n                \"2020-09-26\",\n                \"2020-09-27\",\n                \"2020-09-28\",\n                \"2020-09-29\",\n                \"2020-09-30\",\n                \"2020-10-01\",\n                \"2020-10-02\",\n                \"2020-10-03\",\n                \"2020-10-04\",\n                \"2020-10-05\",\n                \"2020-10-06\",\n                \"2020-10-07\",\n                \"2020-10-08\",\n                \"2020-10-09\",\n                \"2020-10-10\",\n                \"2020-10-11\",\n                \"2020-10-12\",\n                \"2020-10-13\",\n                \"2020-10-14\",\n                \"2020-10-15\",\n                \"2020-10-16\",\n                \"2020-10-17\",\n                \"2020-10-18\",\n                \"2020-10-19\",\n                \"2020-10-20\",\n                \"2020-10-21\",\n                \"2020-10-22\",\n                \"2020-10-23\",\n                \"2020-10-24\",\n                \"2020-10-25\",\n                \"2020-10-26\",\n                \"2020-10-27\",\n                \"2020-10-28\",\n                \"2020-10-29\",\n                \"2020-10-30\",\n                \"2020-10-31\",\n                \"2020-11-01\",\n                \"2020-11-02\",\n                \"2020-11-03\",\n                \"2020-11-04\",\n                \"2020-11-05\",\n                \"2020-11-06\",\n                \"2020-11-07\",\n                \"2020-11-08\",\n                \"2020-11-09\",\n                \"2020-11-10\",\n                \"2020-11-11\",\n                \"2020-11-12\",\n                \"2020-11-13\",\n                \"2020-11-14\",\n                \"2020-11-15\",\n                \"2020-11-16\",\n                \"2020-11-17\",\n                \"2020-11-18\",\n                \"2020-11-19\",\n                \"2020-11-20\",\n                \"2020-11-21\",\n                \"2020-11-22\",\n                \"2020-11-23\",\n                \"2020-11-24\",\n                \"2020-11-25\",\n                \"2020-11-26\",\n                \"2020-11-27\",\n                \"2020-11-28\",\n                \"2020-11-29\",\n                \"2020-11-30\",\n                \"2020-12-01\",\n                \"2020-12-02\",\n                \"2020-12-03\",\n                \"2020-12-04\",\n                \"2020-12-05\",\n                \"2020-12-06\",\n                \"2020-12-07\",\n                \"2020-12-08\",\n                \"2020-12-09\",\n                \"2020-12-10\",\n                \"2020-12-11\",\n                \"2020-12-12\",\n                \"2020-12-13\",\n                \"2020-12-14\",\n                \"2020-12-15\",\n                \"2020-12-16\",\n                \"2020-12-17\",\n                \"2020-12-18\",\n                \"2020-12-19\",\n                \"2020-12-20\",\n                \"2020-12-21\",\n                \"2020-12-22\",\n                \"2020-12-23\",\n                \"2020-12-24\",\n                \"2020-12-25\",\n                \"2020-12-26\",\n                \"2020-12-27\",\n                \"2020-12-28\",\n                \"2020-12-29\",\n                \"2020-12-30\",\n                \"2020-12-31\",\n                \"2021-01-01\",\n                \"2021-01-02\",\n                \"2021-01-03\",\n                \"2021-01-04\",\n                \"2021-01-05\",\n                \"2021-01-06\",\n                \"2021-01-07\",\n                \"2021-01-08\",\n                \"2021-01-09\",\n                \"2021-01-10\",\n                \"2021-01-11\",\n                \"2021-01-12\",\n                \"2021-01-13\",\n                \"2021-01-14\",\n                \"2021-01-15\",\n                \"2021-01-16\",\n                \"2021-01-17\",\n                \"2021-01-18\",\n                \"2021-01-19\",\n                \"2021-01-20\",\n                \"2021-01-21\",\n                \"2021-01-22\",\n                \"2021-01-23\",\n                \"2021-01-24\",\n                \"2021-01-25\",\n                \"2021-01-26\",\n                \"2021-01-27\",\n                \"2021-01-28\",\n                \"2021-01-29\",\n                \"2021-01-30\",\n                \"2021-01-31\",\n                \"2021-02-01\",\n                \"2021-02-02\",\n                \"2021-02-03\",\n                \"2021-02-04\",\n                \"2021-02-05\",\n                \"2021-02-06\",\n                \"2021-02-07\",\n                \"2021-02-08\",\n                \"2021-02-09\",\n                \"2021-02-10\",\n                \"2021-02-11\",\n                \"2021-02-12\",\n                \"2021-02-13\",\n                \"2021-02-14\",\n                \"2021-02-15\",\n                \"2021-02-16\",\n                \"2021-02-17\",\n                \"2021-02-18\",\n                \"2021-02-19\",\n                \"2021-02-20\",\n                \"2021-02-21\",\n                \"2021-02-22\",\n                \"2021-02-23\",\n                \"2021-02-24\",\n                \"2021-02-25\",\n                \"2021-02-26\",\n                \"2021-02-27\",\n                \"2021-02-28\",\n                \"2021-03-01\",\n                \"2021-03-02\",\n                \"2021-03-03\",\n                \"2021-03-04\",\n                \"2021-03-05\",\n                \"2021-03-06\",\n                \"2021-03-07\",\n                \"2021-03-08\",\n                \"2021-03-09\",\n                \"2021-03-10\",\n                \"2021-03-11\",\n                \"2021-03-12\",\n                \"2021-03-13\",\n                \"2021-03-14\",\n                \"2021-03-15\",\n                \"2021-03-16\",\n                \"2021-03-17\",\n                \"2021-03-18\",\n                \"2021-03-19\",\n                \"2021-03-20\",\n                \"2021-03-21\",\n                \"2021-03-22\",\n                \"2021-03-23\",\n                \"2021-03-24\",\n                \"2021-03-25\",\n                \"2021-03-26\",\n                \"2021-03-27\",\n                \"2021-03-28\",\n                \"2021-03-29\",\n                \"2021-03-30\",\n                \"2021-03-31\",\n                \"2021-04-01\",\n                \"2021-04-02\",\n                \"2021-04-03\",\n                \"2021-04-04\",\n                \"2021-04-05\",\n                \"2021-04-06\",\n                \"2021-04-07\",\n                \"2021-04-08\",\n                \"2021-04-09\",\n                \"2021-04-10\",\n                \"2021-04-11\",\n                \"2021-04-12\",\n                \"2021-04-13\",\n                \"2021-04-14\",\n                \"2021-04-15\",\n                \"2021-04-16\",\n                \"2021-04-17\",\n                \"2021-04-18\",\n                \"2021-04-19\",\n                \"2021-04-20\",\n                \"2021-04-21\",\n                \"2021-04-22\",\n                \"2021-04-23\",\n                \"2021-04-24\",\n                \"2021-04-25\",\n                \"2021-04-26\",\n                \"2021-04-27\",\n                \"2021-04-28\",\n                \"2021-04-29\",\n                \"2021-04-30\",\n                \"2021-05-01\",\n                \"2021-05-02\",\n                \"2021-05-03\",\n                \"2021-05-04\",\n                \"2021-05-05\",\n                \"2021-05-06\",\n                \"2021-05-07\",\n                \"2021-05-08\",\n                \"2021-05-09\",\n                \"2021-05-10\",\n                \"2021-05-11\",\n                \"2021-05-12\",\n                \"2021-05-13\",\n                \"2021-05-14\",\n                \"2021-05-15\",\n                \"2021-05-16\",\n                \"2021-05-17\",\n                \"2021-05-18\",\n                \"2021-05-19\",\n                \"2021-05-20\",\n                \"2021-05-21\",\n                \"2021-05-22\",\n                \"2021-05-23\",\n                \"2021-05-24\",\n                \"2021-05-25\",\n                \"2021-05-26\",\n                \"2021-05-27\",\n                \"2021-05-28\",\n                \"2021-05-29\",\n                \"2021-05-30\",\n                \"2021-05-31\",\n                \"2021-06-01\",\n                \"2021-06-02\",\n                \"2021-06-03\",\n                \"2021-06-04\",\n                \"2021-06-05\",\n                \"2021-06-06\",\n                \"2021-06-07\",\n                \"2021-06-08\",\n                \"2021-06-09\",\n                \"2021-06-10\",\n                \"2021-06-11\",\n                \"2021-06-12\",\n                \"2021-06-13\",\n                \"2021-06-14\",\n                \"2021-06-15\",\n                \"2021-06-16\",\n                \"2021-06-17\",\n                \"2021-06-18\",\n                \"2021-06-19\",\n                \"2021-06-20\",\n                \"2021-06-21\",\n                \"2021-06-22\",\n                \"2021-06-23\",\n                \"2021-06-24\",\n                \"2021-06-25\",\n                \"2021-06-26\",\n                \"2021-06-27\",\n                \"2021-06-28\",\n                \"2021-06-29\",\n                \"2021-06-30\",\n                \"2021-07-01\",\n                \"2021-07-02\",\n                \"2021-07-03\",\n                \"2021-07-04\",\n                \"2021-07-05\",\n                \"2021-07-06\",\n                \"2021-07-07\",\n                \"2021-07-08\",\n                \"2021-07-09\",\n                \"2021-07-10\",\n                \"2021-07-11\",\n                \"2021-07-12\",\n                \"2021-07-13\",\n                \"2021-07-14\",\n                \"2021-07-15\",\n                \"2021-07-16\",\n                \"2021-07-17\",\n                \"2021-07-18\",\n                \"2021-07-19\",\n                \"2021-07-20\",\n                \"2021-07-21\",\n                \"2021-07-22\",\n                \"2021-07-23\",\n                \"2021-07-24\",\n                \"2021-07-25\",\n                \"2021-07-26\",\n                \"2021-07-27\",\n                \"2021-07-28\",\n                \"2021-07-29\",\n                \"2021-07-30\",\n                \"2021-07-31\",\n                \"2021-08-01\",\n                \"2021-08-02\",\n                \"2021-08-03\",\n                \"2021-08-04\",\n                \"2021-08-05\",\n                \"2021-08-06\",\n                \"2021-08-07\",\n                \"2021-08-08\",\n                \"2021-08-09\",\n                \"2021-08-10\",\n                \"2021-08-11\",\n                \"2021-08-12\",\n                \"2021-08-13\",\n                \"2021-08-14\",\n                \"2021-08-15\",\n                \"2021-08-16\",\n                \"2021-08-17\",\n                \"2021-08-18\",\n                \"2021-08-19\",\n                \"2021-08-20\",\n                \"2021-08-21\",\n                \"2021-08-22\",\n                \"2021-08-23\",\n                \"2021-08-24\",\n                \"2021-08-25\",\n                \"2021-08-26\",\n                \"2021-08-27\",\n                \"2021-08-28\",\n                \"2021-08-29\",\n                \"2021-08-30\",\n                \"2021-08-31\",\n                \"2021-09-01\",\n                \"2021-09-02\",\n                \"2021-09-03\",\n                \"2021-09-04\",\n                \"2021-09-05\",\n                \"2021-09-06\",\n                \"2021-09-07\",\n                \"2021-09-08\",\n                \"2021-09-09\",\n                \"2021-09-10\",\n                \"2021-09-11\",\n                \"2021-09-12\",\n                \"2021-09-13\",\n                \"2021-09-14\",\n                \"2021-09-15\",\n                \"2021-09-16\",\n                \"2021-09-17\",\n                \"2021-09-18\",\n                \"2021-09-19\",\n                \"2021-09-20\",\n                \"2021-09-21\",\n                \"2021-09-22\",\n                \"2021-09-23\",\n                \"2021-09-24\",\n                \"2021-09-25\",\n                \"2021-09-26\",\n                \"2021-09-27\",\n                \"2021-09-28\",\n                \"2021-09-29\",\n                \"2021-09-30\",\n                \"2021-10-01\",\n                \"2021-10-02\",\n                \"2021-10-03\",\n                \"2021-10-04\",\n                \"2021-10-05\",\n                \"2021-10-06\",\n                \"2021-10-07\",\n                \"2021-10-08\",\n                \"2021-10-09\",\n                \"2021-10-10\",\n                \"2021-10-11\",\n                \"2021-10-12\",\n                \"2021-10-13\",\n                \"2021-10-14\",\n                \"2021-10-15\",\n                \"2021-10-16\",\n                \"2021-10-17\",\n                \"2021-10-18\",\n                \"2021-10-19\",\n                \"2021-10-20\",\n                \"2021-10-21\",\n                \"2021-10-22\",\n                \"2021-10-23\",\n                \"2021-10-24\",\n                \"2021-10-25\",\n                \"2021-10-26\",\n                \"2021-10-27\",\n                \"2021-10-28\",\n                \"2021-10-29\",\n                \"2021-10-30\",\n                \"2021-10-31\",\n                \"2021-11-01\",\n                \"2021-11-02\",\n                \"2021-11-03\",\n                \"2021-11-04\",\n                \"2021-11-05\",\n                \"2021-11-06\",\n                \"2021-11-07\",\n                \"2021-11-08\",\n                \"2021-11-09\",\n                \"2021-11-10\",\n                \"2021-11-11\",\n                \"2021-11-12\",\n                \"2021-11-13\",\n                \"2021-11-14\",\n                \"2021-11-15\",\n                \"2021-11-16\",\n                \"2021-11-17\",\n                \"2021-11-18\",\n                \"2021-11-19\",\n                \"2021-11-20\",\n                \"2021-11-21\",\n                \"2021-11-22\",\n                \"2021-11-23\",\n                \"2021-11-24\",\n                \"2021-11-25\",\n                \"2021-11-26\",\n                \"2021-11-27\",\n                \"2021-11-28\",\n                \"2021-11-29\",\n                \"2021-11-30\",\n                \"2021-12-01\",\n                \"2021-12-02\",\n                \"2021-12-03\",\n                \"2021-12-04\",\n                \"2021-12-05\",\n                \"2021-12-06\",\n                \"2021-12-07\",\n                \"2021-12-08\",\n                \"2021-12-09\",\n                \"2021-12-10\",\n                \"2021-12-11\",\n                \"2021-12-12\",\n                \"2021-12-13\",\n                \"2021-12-14\",\n                \"2021-12-15\",\n                \"2021-12-16\",\n                \"2021-12-17\",\n                \"2021-12-18\",\n                \"2021-12-19\",\n                \"2021-12-20\"\n              ],\n              \"xaxis\": \"x\",\n              \"y\": [\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                2.0,\n                2.0,\n                2.0,\n                3.0,\n                3.0,\n                3.0,\n                4.0,\n                5.0,\n                5.0,\n                6.0,\n                6.0,\n                7.0,\n                8.0,\n                9.0,\n                9.0,\n                10.0,\n                11.0,\n                12.0,\n                13.0,\n                14.0,\n                15.0,\n                17.0,\n                18.0,\n                20.0,\n                21.0,\n                23.0,\n                25.0,\n                27.0,\n                29.0,\n                31.0,\n                34.0,\n                36.0,\n                38.0,\n                40.0,\n                43.0,\n                46.0,\n                49.0,\n                51.0,\n                55.0,\n                57.0,\n                61.0,\n                64.0,\n                67.0,\n                71.0,\n                74.0,\n                77.0,\n                80.0,\n                84.0,\n                88.0,\n                92.0,\n                96.0,\n                100.0,\n                103.0,\n                106.0,\n                110.0,\n                115.0,\n                119.0,\n                123.0,\n                127.0,\n                130.0,\n                133.0,\n                138.0,\n                143.0,\n                148.0,\n                152.0,\n                156.0,\n                159.0,\n                164.0,\n                168.0,\n                173.0,\n                178.0,\n                183.0,\n                187.0,\n                191.0,\n                194.0,\n                199.0,\n                204.0,\n                209.0,\n                214.0,\n                219.0,\n                223.0,\n                226.0,\n                231.0,\n                235.0,\n                240.0,\n                245.0,\n                250.0,\n                253.0,\n                257.0,\n                262.0,\n                266.0,\n                272.0,\n                277.0,\n                282.0,\n                285.0,\n                289.0,\n                294.0,\n                299.0,\n                304.0,\n                309.0,\n                314.0,\n                318.0,\n                321.0,\n                327.0,\n                332.0,\n                337.0,\n                345.0,\n                351.0,\n                355.0,\n                358.0,\n                363.0,\n                368.0,\n                374.0,\n                380.0,\n                385.0,\n                389.0,\n                393.0,\n                398.0,\n                405.0,\n                410.0,\n                416.0,\n                421.0,\n                425.0,\n                429.0,\n                435.0,\n                441.0,\n                447.0,\n                453.0,\n                457.0,\n                461.0,\n                466.0,\n                472.0,\n                477.0,\n                483.0,\n                489.0,\n                493.0,\n                497.0,\n                501.0,\n                507.0,\n                513.0,\n                519.0,\n                524.0,\n                529.0,\n                533.0,\n                537.0,\n                543.0,\n                548.0,\n                553.0,\n                558.0,\n                562.0,\n                566.0,\n                569.0,\n                575.0,\n                580.0,\n                585.0,\n                589.0,\n                593.0,\n                596.0,\n                611.0,\n                615.0,\n                619.0,\n                624.0,\n                628.0,\n                632.0,\n                635.0,\n                638.0,\n                642.0,\n                646.0,\n                650.0,\n                654.0,\n                658.0,\n                660.0,\n                663.0,\n                667.0,\n                670.0,\n                676.0,\n                680.0,\n                684.0,\n                687.0,\n                689.0,\n                693.0,\n                698.0,\n                708.0,\n                711.0,\n                715.0,\n                718.0,\n                721.0,\n                724.0,\n                728.0,\n                732.0,\n                737.0,\n                740.0,\n                742.0,\n                744.0,\n                747.0,\n                750.0,\n                754.0,\n                757.0,\n                760.0,\n                762.0,\n                765.0,\n                768.0,\n                771.0,\n                775.0,\n                778.0,\n                780.0,\n                782.0,\n                785.0,\n                788.0,\n                791.0,\n                794.0,\n                797.0,\n                799.0,\n                801.0,\n                803.0,\n                805.0,\n                809.0,\n                810.0,\n                814.0,\n                816.0,\n                818.0,\n                820.0,\n                822.0,\n                825.0,\n                828.0,\n                831.0,\n                834.0,\n                836.0,\n                838.0,\n                841.0,\n                844.0,\n                847.0,\n                850.0,\n                852.0,\n                853.0,\n                855.0,\n                858.0,\n                861.0,\n                864.0,\n                867.0,\n                869.0,\n                871.0,\n                873.0,\n                876.0,\n                879.0,\n                882.0,\n                885.0,\n                888.0,\n                890.0,\n                892.0,\n                895.0,\n                898.0,\n                901.0,\n                904.0,\n                906.0,\n                908.0,\n                910.0,\n                914.0,\n                917.0,\n                921.0,\n                924.0,\n                927.0,\n                929.0,\n                932.0,\n                936.0,\n                939.0,\n                942.0,\n                944.0,\n                946.0,\n                949.0,\n                951.0,\n                955.0,\n                959.0,\n                963.0,\n                966.0,\n                968.0,\n                970.0,\n                973.0,\n                977.0,\n                982.0,\n                987.0,\n                991.0,\n                996.0,\n                999.0,\n                1002.0,\n                1006.0,\n                1011.0,\n                1016.0,\n                1021.0,\n                1026.0,\n                1029.0,\n                1033.0,\n                1038.0,\n                1044.0,\n                1050.0,\n                1055.0,\n                1061.0,\n                1065.0,\n                1069.0,\n                1076.0,\n                1081.0,\n                1087.0,\n                1093.0,\n                1099.0,\n                1103.0,\n                1107.0,\n                1113.0,\n                1119.0,\n                1124.0,\n                1130.0,\n                1133.0,\n                1139.0,\n                1142.0,\n                1150.0,\n                1155.0,\n                1162.0,\n                1168.0,\n                1173.0,\n                1177.0,\n                1181.0,\n                1186.0,\n                1192.0,\n                1198.0,\n                1204.0,\n                1209.0,\n                1214.0,\n                1217.0,\n                1223.0,\n                1229.0,\n                1235.0,\n                1241.0,\n                1247.0,\n                1251.0,\n                1255.0,\n                1261.0,\n                1268.0,\n                1275.0,\n                1282.0,\n                1287.0,\n                1292.0,\n                1296.0,\n                1304.0,\n                1311.0,\n                1318.0,\n                1326.0,\n                1333.0,\n                1338.0,\n                1343.0,\n                1352.0,\n                1361.0,\n                1369.0,\n                1379.0,\n                1387.0,\n                1392.0,\n                1397.0,\n                1408.0,\n                1415.0,\n                1424.0,\n                1435.0,\n                1446.0,\n                1453.0,\n                1460.0,\n                1471.0,\n                1483.0,\n                1495.0,\n                1504.0,\n                1512.0,\n                1518.0,\n                1524.0,\n                1537.0,\n                1549.0,\n                1562.0,\n                1575.0,\n                1585.0,\n                1593.0,\n                1600.0,\n                1613.0,\n                1625.0,\n                1637.0,\n                1649.0,\n                1660.0,\n                1667.0,\n                1674.0,\n                1686.0,\n                1698.0,\n                1708.0,\n                1721.0,\n                1731.0,\n                1739.0,\n                1746.0,\n                1758.0,\n                1770.0,\n                1782.0,\n                1792.0,\n                1802.0,\n                1808.0,\n                1816.0,\n                1827.0,\n                1838.0,\n                1849.0,\n                1858.0,\n                1868.0,\n                1874.0,\n                1880.0,\n                1890.0,\n                1900.0,\n                1910.0,\n                1920.0,\n                1929.0,\n                1935.0,\n                1942.0,\n                1951.0,\n                1962.0,\n                1972.0,\n                1982.0,\n                1991.0,\n                1997.0,\n                2002.0,\n                2012.0,\n                2021.0,\n                2031.0,\n                2040.0,\n                2049.0,\n                2055.0,\n                2062.0,\n                2071.0,\n                2083.0,\n                2090.0,\n                2099.0,\n                2107.0,\n                2112.0,\n                2119.0,\n                2129.0,\n                2139.0,\n                2151.0,\n                2160.0,\n                2168.0,\n                2175.0,\n                2181.0,\n                2192.0,\n                2202.0,\n                2213.0,\n                2222.0,\n                2231.0,\n                2237.0,\n                2243.0,\n                2252.0,\n                2262.0,\n                2271.0,\n                2280.0,\n                2287.0,\n                2292.0,\n                2298.0,\n                2306.0,\n                2315.0,\n                2324.0,\n                2332.0,\n                2339.0,\n                2345.0,\n                2350.0,\n                2357.0,\n                2365.0,\n                2372.0,\n                2378.0,\n                2382.0,\n                2388.0,\n                2393.0,\n                2400.0,\n                2406.0,\n                2413.0,\n                2419.0,\n                2424.0,\n                2428.0,\n                2432.0,\n                2458.0,\n                2464.0,\n                2469.0,\n                2475.0,\n                2479.0,\n                2482.0,\n                2486.0,\n                2491.0,\n                2496.0,\n                2503.0,\n                2507.0,\n                2511.0,\n                2514.0,\n                2516.0,\n                2521.0,\n                2526.0,\n                2530.0,\n                2534.0,\n                2537.0,\n                2539.0,\n                2542.0,\n                2546.0,\n                2550.0,\n                2554.0,\n                2558.0,\n                2561.0,\n                2562.0,\n                2564.0,\n                2568.0,\n                2572.0,\n                2575.0,\n                2578.0,\n                2581.0,\n                2582.0,\n                2585.0,\n                2588.0,\n                2591.0,\n                2594.0,\n                2596.0,\n                2599.0,\n                2600.0,\n                2602.0,\n                2604.0,\n                2607.0,\n                2610.0,\n                2613.0,\n                2615.0,\n                2616.0,\n                2617.0,\n                2619.0,\n                2620.0,\n                2623.0,\n                2625.0,\n                2627.0,\n                2629.0,\n                2630.0,\n                2632.0,\n                2635.0,\n                2637.0,\n                2639.0,\n                2641.0,\n                2643.0,\n                2644.0,\n                2645.0,\n                2648.0,\n                2650.0,\n                2652.0,\n                2653.0,\n                2654.0,\n                2655.0,\n                2658.0,\n                2660.0,\n                2661.0,\n                2663.0,\n                2664.0,\n                2665.0,\n                2666.0,\n                2668.0,\n                2670.0,\n                2671.0,\n                2673.0,\n                2674.0,\n                2675.0,\n                2675.0,\n                2676.0,\n                2677.0,\n                2679.0,\n                2680.0,\n                2681.0,\n                2682.0,\n                2683.0,\n                2684.0,\n                2685.0,\n                2687.0,\n                2688.0,\n                2689.0,\n                2690.0,\n                2690.0,\n                2692.0,\n                2693.0,\n                2694.0,\n                2695.0,\n                2696.0,\n                2697.0,\n                2697.0,\n                2698.0,\n                2698.0,\n                2700.0,\n                2701.0,\n                2702.0,\n                2702.0,\n                2703.0,\n                2704.0,\n                2705.0,\n                2705.0,\n                2706.0,\n                2708.0,\n                2709.0,\n                2709.0,\n                2710.0,\n                2711.0,\n                2712.0,\n                2713.0,\n                2714.0,\n                2715.0,\n                2715.0,\n                2716.0,\n                2717.0,\n                2718.0,\n                2719.0,\n                2720.0,\n                2721.0,\n                2722.0,\n                2723.0,\n                2724.0,\n                2725.0,\n                2726.0,\n                2727.0,\n                2727.0,\n                2728.0,\n                2729.0,\n                2730.0,\n                2731.0,\n                2731.0,\n                2732.0,\n                2732.0,\n                2733.0,\n                2734.0,\n                2735.0,\n                2736.0,\n                2737.0,\n                2737.0,\n                2739.0,\n                2739.0\n              ],\n              \"yaxis\": \"y\",\n              \"type\": \"scattergl\"\n            },\n            {\n              \"hovertemplate\": \"Continent=North America<br>Date=%{x}<br>Total Deaths per Million=%{y}<extra></extra>\",\n              \"legendgroup\": \"North America\",\n              \"line\": {\n                \"color\": \"#EF553B\",\n                \"dash\": \"solid\"\n              },\n              \"marker\": {\n                \"symbol\": \"circle\"\n              },\n              \"mode\": \"lines\",\n              \"name\": \"North America\",\n              \"showlegend\": true,\n              \"x\": [\n                \"2020-02-23\",\n                \"2020-02-24\",\n                \"2020-02-25\",\n                \"2020-02-26\",\n                \"2020-02-27\",\n                \"2020-02-28\",\n                \"2020-02-29\",\n                \"2020-03-01\",\n                \"2020-03-02\",\n                \"2020-03-03\",\n                \"2020-03-04\",\n                \"2020-03-05\",\n                \"2020-03-06\",\n                \"2020-03-07\",\n                \"2020-03-08\",\n                \"2020-03-09\",\n                \"2020-03-10\",\n                \"2020-03-11\",\n                \"2020-03-12\",\n                \"2020-03-13\",\n                \"2020-03-14\",\n                \"2020-03-15\",\n                \"2020-03-16\",\n                \"2020-03-17\",\n                \"2020-03-18\",\n                \"2020-03-19\",\n                \"2020-03-20\",\n                \"2020-03-21\",\n                \"2020-03-22\",\n                \"2020-03-23\",\n                \"2020-03-24\",\n                \"2020-03-25\",\n                \"2020-03-26\",\n                \"2020-03-27\",\n                \"2020-03-28\",\n                \"2020-03-29\",\n                \"2020-03-30\",\n                \"2020-03-31\",\n                \"2020-04-01\",\n                \"2020-04-02\",\n                \"2020-04-03\",\n                \"2020-04-04\",\n                \"2020-04-05\",\n                \"2020-04-06\",\n                \"2020-04-07\",\n                \"2020-04-08\",\n                \"2020-04-09\",\n                \"2020-04-10\",\n                \"2020-04-11\",\n                \"2020-04-12\",\n                \"2020-04-13\",\n                \"2020-04-14\",\n                \"2020-04-15\",\n                \"2020-04-16\",\n                \"2020-04-17\",\n                \"2020-04-18\",\n                \"2020-04-19\",\n                \"2020-04-20\",\n                \"2020-04-21\",\n                \"2020-04-22\",\n                \"2020-04-23\",\n                \"2020-04-24\",\n                \"2020-04-25\",\n                \"2020-04-26\",\n                \"2020-04-27\",\n                \"2020-04-28\",\n                \"2020-04-29\",\n                \"2020-04-30\",\n                \"2020-05-01\",\n                \"2020-05-02\",\n                \"2020-05-03\",\n                \"2020-05-04\",\n                \"2020-05-05\",\n                \"2020-05-06\",\n                \"2020-05-07\",\n                \"2020-05-08\",\n                \"2020-05-09\",\n                \"2020-05-10\",\n                \"2020-05-11\",\n                \"2020-05-12\",\n                \"2020-05-13\",\n                \"2020-05-14\",\n                \"2020-05-15\",\n                \"2020-05-16\",\n                \"2020-05-17\",\n                \"2020-05-18\",\n                \"2020-05-19\",\n                \"2020-05-20\",\n                \"2020-05-21\",\n                \"2020-05-22\",\n                \"2020-05-23\",\n                \"2020-05-24\",\n                \"2020-05-25\",\n                \"2020-05-26\",\n                \"2020-05-27\",\n                \"2020-05-28\",\n                \"2020-05-29\",\n                \"2020-05-30\",\n                \"2020-05-31\",\n                \"2020-06-01\",\n                \"2020-06-02\",\n                \"2020-06-03\",\n                \"2020-06-04\",\n                \"2020-06-05\",\n                \"2020-06-06\",\n                \"2020-06-07\",\n                \"2020-06-08\",\n                \"2020-06-09\",\n                \"2020-06-10\",\n                \"2020-06-11\",\n                \"2020-06-12\",\n                \"2020-06-13\",\n                \"2020-06-14\",\n                \"2020-06-15\",\n                \"2020-06-16\",\n                \"2020-06-17\",\n                \"2020-06-18\",\n                \"2020-06-19\",\n                \"2020-06-20\",\n                \"2020-06-21\",\n                \"2020-06-22\",\n                \"2020-06-23\",\n                \"2020-06-24\",\n                \"2020-06-25\",\n                \"2020-06-26\",\n                \"2020-06-27\",\n                \"2020-06-28\",\n                \"2020-06-29\",\n                \"2020-06-30\",\n                \"2020-07-01\",\n                \"2020-07-02\",\n                \"2020-07-03\",\n                \"2020-07-04\",\n                \"2020-07-05\",\n                \"2020-07-06\",\n                \"2020-07-07\",\n                \"2020-07-08\",\n                \"2020-07-09\",\n                \"2020-07-10\",\n                \"2020-07-11\",\n                \"2020-07-12\",\n                \"2020-07-13\",\n                \"2020-07-14\",\n                \"2020-07-15\",\n                \"2020-07-16\",\n                \"2020-07-17\",\n                \"2020-07-18\",\n                \"2020-07-19\",\n                \"2020-07-20\",\n                \"2020-07-21\",\n                \"2020-07-22\",\n                \"2020-07-23\",\n                \"2020-07-24\",\n                \"2020-07-25\",\n                \"2020-07-26\",\n                \"2020-07-27\",\n                \"2020-07-28\",\n                \"2020-07-29\",\n                \"2020-07-30\",\n                \"2020-07-31\",\n                \"2020-08-01\",\n                \"2020-08-02\",\n                \"2020-08-03\",\n                \"2020-08-04\",\n                \"2020-08-05\",\n                \"2020-08-06\",\n                \"2020-08-07\",\n                \"2020-08-08\",\n                \"2020-08-09\",\n                \"2020-08-10\",\n                \"2020-08-11\",\n                \"2020-08-12\",\n                \"2020-08-13\",\n                \"2020-08-14\",\n                \"2020-08-15\",\n                \"2020-08-16\",\n                \"2020-08-17\",\n                \"2020-08-18\",\n                \"2020-08-19\",\n                \"2020-08-20\",\n                \"2020-08-21\",\n                \"2020-08-22\",\n                \"2020-08-23\",\n                \"2020-08-24\",\n                \"2020-08-25\",\n                \"2020-08-26\",\n                \"2020-08-27\",\n                \"2020-08-28\",\n                \"2020-08-29\",\n                \"2020-08-30\",\n                \"2020-08-31\",\n                \"2020-09-01\",\n                \"2020-09-02\",\n                \"2020-09-03\",\n                \"2020-09-04\",\n                \"2020-09-05\",\n                \"2020-09-06\",\n                \"2020-09-07\",\n                \"2020-09-08\",\n                \"2020-09-09\",\n                \"2020-09-10\",\n                \"2020-09-11\",\n                \"2020-09-12\",\n                \"2020-09-13\",\n                \"2020-09-14\",\n                \"2020-09-15\",\n                \"2020-09-16\",\n                \"2020-09-17\",\n                \"2020-09-18\",\n                \"2020-09-19\",\n                \"2020-09-20\",\n                \"2020-09-21\",\n                \"2020-09-22\",\n                \"2020-09-23\",\n                \"2020-09-24\",\n                \"2020-09-25\",\n                \"2020-09-26\",\n                \"2020-09-27\",\n                \"2020-09-28\",\n                \"2020-09-29\",\n                \"2020-09-30\",\n                \"2020-10-01\",\n                \"2020-10-02\",\n                \"2020-10-03\",\n                \"2020-10-04\",\n                \"2020-10-05\",\n                \"2020-10-06\",\n                \"2020-10-07\",\n                \"2020-10-08\",\n                \"2020-10-09\",\n                \"2020-10-10\",\n                \"2020-10-11\",\n                \"2020-10-12\",\n                \"2020-10-13\",\n                \"2020-10-14\",\n                \"2020-10-15\",\n                \"2020-10-16\",\n                \"2020-10-17\",\n                \"2020-10-18\",\n                \"2020-10-19\",\n                \"2020-10-20\",\n                \"2020-10-21\",\n                \"2020-10-22\",\n                \"2020-10-23\",\n                \"2020-10-24\",\n                \"2020-10-25\",\n                \"2020-10-26\",\n                \"2020-10-27\",\n                \"2020-10-28\",\n                \"2020-10-29\",\n                \"2020-10-30\",\n                \"2020-10-31\",\n                \"2020-11-01\",\n                \"2020-11-02\",\n                \"2020-11-03\",\n                \"2020-11-04\",\n                \"2020-11-05\",\n                \"2020-11-06\",\n                \"2020-11-07\",\n                \"2020-11-08\",\n                \"2020-11-09\",\n                \"2020-11-10\",\n                \"2020-11-11\",\n                \"2020-11-12\",\n                \"2020-11-13\",\n                \"2020-11-14\",\n                \"2020-11-15\",\n                \"2020-11-16\",\n                \"2020-11-17\",\n                \"2020-11-18\",\n                \"2020-11-19\",\n                \"2020-11-20\",\n                \"2020-11-21\",\n                \"2020-11-22\",\n                \"2020-11-23\",\n                \"2020-11-24\",\n                \"2020-11-25\",\n                \"2020-11-26\",\n                \"2020-11-27\",\n                \"2020-11-28\",\n                \"2020-11-29\",\n                \"2020-11-30\",\n                \"2020-12-01\",\n                \"2020-12-02\",\n                \"2020-12-03\",\n                \"2020-12-04\",\n                \"2020-12-05\",\n                \"2020-12-06\",\n                \"2020-12-07\",\n                \"2020-12-08\",\n                \"2020-12-09\",\n                \"2020-12-10\",\n                \"2020-12-11\",\n                \"2020-12-12\",\n                \"2020-12-13\",\n                \"2020-12-14\",\n                \"2020-12-15\",\n                \"2020-12-16\",\n                \"2020-12-17\",\n                \"2020-12-18\",\n                \"2020-12-19\",\n                \"2020-12-20\",\n                \"2020-12-21\",\n                \"2020-12-22\",\n                \"2020-12-23\",\n                \"2020-12-24\",\n                \"2020-12-25\",\n                \"2020-12-26\",\n                \"2020-12-27\",\n                \"2020-12-28\",\n                \"2020-12-29\",\n                \"2020-12-30\",\n                \"2020-12-31\",\n                \"2021-01-01\",\n                \"2021-01-02\",\n                \"2021-01-03\",\n                \"2021-01-04\",\n                \"2021-01-05\",\n                \"2021-01-06\",\n                \"2021-01-07\",\n                \"2021-01-08\",\n                \"2021-01-09\",\n                \"2021-01-10\",\n                \"2021-01-11\",\n                \"2021-01-12\",\n                \"2021-01-13\",\n                \"2021-01-14\",\n                \"2021-01-15\",\n                \"2021-01-16\",\n                \"2021-01-17\",\n                \"2021-01-18\",\n                \"2021-01-19\",\n                \"2021-01-20\",\n                \"2021-01-21\",\n                \"2021-01-22\",\n                \"2021-01-23\",\n                \"2021-01-24\",\n                \"2021-01-25\",\n                \"2021-01-26\",\n                \"2021-01-27\",\n                \"2021-01-28\",\n                \"2021-01-29\",\n                \"2021-01-30\",\n                \"2021-01-31\",\n                \"2021-02-01\",\n                \"2021-02-02\",\n                \"2021-02-03\",\n                \"2021-02-04\",\n                \"2021-02-05\",\n                \"2021-02-06\",\n                \"2021-02-07\",\n                \"2021-02-08\",\n                \"2021-02-09\",\n                \"2021-02-10\",\n                \"2021-02-11\",\n                \"2021-02-12\",\n                \"2021-02-13\",\n                \"2021-02-14\",\n                \"2021-02-15\",\n                \"2021-02-16\",\n                \"2021-02-17\",\n                \"2021-02-18\",\n                \"2021-02-19\",\n                \"2021-02-20\",\n                \"2021-02-21\",\n                \"2021-02-22\",\n                \"2021-02-23\",\n                \"2021-02-24\",\n                \"2021-02-25\",\n                \"2021-02-26\",\n                \"2021-02-27\",\n                \"2021-02-28\",\n                \"2021-03-01\",\n                \"2021-03-02\",\n                \"2021-03-03\",\n                \"2021-03-04\",\n                \"2021-03-05\",\n                \"2021-03-06\",\n                \"2021-03-07\",\n                \"2021-03-08\",\n                \"2021-03-09\",\n                \"2021-03-10\",\n                \"2021-03-11\",\n                \"2021-03-12\",\n                \"2021-03-13\",\n                \"2021-03-14\",\n                \"2021-03-15\",\n                \"2021-03-16\",\n                \"2021-03-17\",\n                \"2021-03-18\",\n                \"2021-03-19\",\n                \"2021-03-20\",\n                \"2021-03-21\",\n                \"2021-03-22\",\n                \"2021-03-23\",\n                \"2021-03-24\",\n                \"2021-03-25\",\n                \"2021-03-26\",\n                \"2021-03-27\",\n                \"2021-03-28\",\n                \"2021-03-29\",\n                \"2021-03-30\",\n                \"2021-03-31\",\n                \"2021-04-01\",\n                \"2021-04-02\",\n                \"2021-04-03\",\n                \"2021-04-04\",\n                \"2021-04-05\",\n                \"2021-04-06\",\n                \"2021-04-07\",\n                \"2021-04-08\",\n                \"2021-04-09\",\n                \"2021-04-10\",\n                \"2021-04-11\",\n                \"2021-04-12\",\n                \"2021-04-13\",\n                \"2021-04-14\",\n                \"2021-04-15\",\n                \"2021-04-16\",\n                \"2021-04-17\",\n                \"2021-04-18\",\n                \"2021-04-19\",\n                \"2021-04-20\",\n                \"2021-04-21\",\n                \"2021-04-22\",\n                \"2021-04-23\",\n                \"2021-04-24\",\n                \"2021-04-25\",\n                \"2021-04-26\",\n                \"2021-04-27\",\n                \"2021-04-28\",\n                \"2021-04-29\",\n                \"2021-04-30\",\n                \"2021-05-01\",\n                \"2021-05-02\",\n                \"2021-05-03\",\n                \"2021-05-04\",\n                \"2021-05-05\",\n                \"2021-05-06\",\n                \"2021-05-07\",\n                \"2021-05-08\",\n                \"2021-05-09\",\n                \"2021-05-10\",\n                \"2021-05-11\",\n                \"2021-05-12\",\n                \"2021-05-13\",\n                \"2021-05-14\",\n                \"2021-05-15\",\n                \"2021-05-16\",\n                \"2021-05-17\",\n                \"2021-05-18\",\n                \"2021-05-19\",\n                \"2021-05-20\",\n                \"2021-05-21\",\n                \"2021-05-22\",\n                \"2021-05-23\",\n                \"2021-05-24\",\n                \"2021-05-25\",\n                \"2021-05-26\",\n                \"2021-05-27\",\n                \"2021-05-28\",\n                \"2021-05-29\",\n                \"2021-05-30\",\n                \"2021-05-31\",\n                \"2021-06-01\",\n                \"2021-06-02\",\n                \"2021-06-03\",\n                \"2021-06-04\",\n                \"2021-06-05\",\n                \"2021-06-06\",\n                \"2021-06-07\",\n                \"2021-06-08\",\n                \"2021-06-09\",\n                \"2021-06-10\",\n                \"2021-06-11\",\n                \"2021-06-12\",\n                \"2021-06-13\",\n                \"2021-06-14\",\n                \"2021-06-15\",\n                \"2021-06-16\",\n                \"2021-06-17\",\n                \"2021-06-18\",\n                \"2021-06-19\",\n                \"2021-06-20\",\n                \"2021-06-21\",\n                \"2021-06-22\",\n                \"2021-06-23\",\n                \"2021-06-24\",\n                \"2021-06-25\",\n                \"2021-06-26\",\n                \"2021-06-27\",\n                \"2021-06-28\",\n                \"2021-06-29\",\n                \"2021-06-30\",\n                \"2021-07-01\",\n                \"2021-07-02\",\n                \"2021-07-03\",\n                \"2021-07-04\",\n                \"2021-07-05\",\n                \"2021-07-06\",\n                \"2021-07-07\",\n                \"2021-07-08\",\n                \"2021-07-09\",\n                \"2021-07-10\",\n                \"2021-07-11\",\n                \"2021-07-12\",\n                \"2021-07-13\",\n                \"2021-07-14\",\n                \"2021-07-15\",\n                \"2021-07-16\",\n                \"2021-07-17\",\n                \"2021-07-18\",\n                \"2021-07-19\",\n                \"2021-07-20\",\n                \"2021-07-21\",\n                \"2021-07-22\",\n                \"2021-07-23\",\n                \"2021-07-24\",\n                \"2021-07-25\",\n                \"2021-07-26\",\n                \"2021-07-27\",\n                \"2021-07-28\",\n                \"2021-07-29\",\n                \"2021-07-30\",\n                \"2021-07-31\",\n                \"2021-08-01\",\n                \"2021-08-02\",\n                \"2021-08-03\",\n                \"2021-08-04\",\n                \"2021-08-05\",\n                \"2021-08-06\",\n                \"2021-08-07\",\n                \"2021-08-08\",\n                \"2021-08-09\",\n                \"2021-08-10\",\n                \"2021-08-11\",\n                \"2021-08-12\",\n                \"2021-08-13\",\n                \"2021-08-14\",\n                \"2021-08-15\",\n                \"2021-08-16\",\n                \"2021-08-17\",\n                \"2021-08-18\",\n                \"2021-08-19\",\n                \"2021-08-20\",\n                \"2021-08-21\",\n                \"2021-08-22\",\n                \"2021-08-23\",\n                \"2021-08-24\",\n                \"2021-08-25\",\n                \"2021-08-26\",\n                \"2021-08-27\",\n                \"2021-08-28\",\n                \"2021-08-29\",\n                \"2021-08-30\",\n                \"2021-08-31\",\n                \"2021-09-01\",\n                \"2021-09-02\",\n                \"2021-09-03\",\n                \"2021-09-04\",\n                \"2021-09-05\",\n                \"2021-09-06\",\n                \"2021-09-07\",\n                \"2021-09-08\",\n                \"2021-09-09\",\n                \"2021-09-10\",\n                \"2021-09-11\",\n                \"2021-09-12\",\n                \"2021-09-13\",\n                \"2021-09-14\",\n                \"2021-09-15\",\n                \"2021-09-16\",\n                \"2021-09-17\",\n                \"2021-09-18\",\n                \"2021-09-19\",\n                \"2021-09-20\",\n                \"2021-09-21\",\n                \"2021-09-22\",\n                \"2021-09-23\",\n                \"2021-09-24\",\n                \"2021-09-25\",\n                \"2021-09-26\",\n                \"2021-09-27\",\n                \"2021-09-28\",\n                \"2021-09-29\",\n                \"2021-09-30\",\n                \"2021-10-01\",\n                \"2021-10-02\",\n                \"2021-10-03\",\n                \"2021-10-04\",\n                \"2021-10-05\",\n                \"2021-10-06\",\n                \"2021-10-07\",\n                \"2021-10-08\",\n                \"2021-10-09\",\n                \"2021-10-10\",\n                \"2021-10-11\",\n                \"2021-10-12\",\n                \"2021-10-13\",\n                \"2021-10-14\",\n                \"2021-10-15\",\n                \"2021-10-16\",\n                \"2021-10-17\",\n                \"2021-10-18\",\n                \"2021-10-19\",\n                \"2021-10-20\",\n                \"2021-10-21\",\n                \"2021-10-22\",\n                \"2021-10-23\",\n                \"2021-10-24\",\n                \"2021-10-25\",\n                \"2021-10-26\",\n                \"2021-10-27\",\n                \"2021-10-28\",\n                \"2021-10-29\",\n                \"2021-10-30\",\n                \"2021-10-31\",\n                \"2021-11-01\",\n                \"2021-11-02\",\n                \"2021-11-03\",\n                \"2021-11-04\",\n                \"2021-11-05\",\n                \"2021-11-06\",\n                \"2021-11-07\",\n                \"2021-11-08\",\n                \"2021-11-09\",\n                \"2021-11-10\",\n                \"2021-11-11\",\n                \"2021-11-12\",\n                \"2021-11-13\",\n                \"2021-11-14\",\n                \"2021-11-15\",\n                \"2021-11-16\",\n                \"2021-11-17\",\n                \"2021-11-18\",\n                \"2021-11-19\",\n                \"2021-11-20\",\n                \"2021-11-21\",\n                \"2021-11-22\",\n                \"2021-11-23\",\n                \"2021-11-24\",\n                \"2021-11-25\",\n                \"2021-11-26\",\n                \"2021-11-27\",\n                \"2021-11-28\",\n                \"2021-11-29\",\n                \"2021-11-30\",\n                \"2021-12-01\",\n                \"2021-12-02\",\n                \"2021-12-03\",\n                \"2021-12-04\",\n                \"2021-12-05\",\n                \"2021-12-06\",\n                \"2021-12-07\",\n                \"2021-12-08\",\n                \"2021-12-09\",\n                \"2021-12-10\",\n                \"2021-12-11\",\n                \"2021-12-12\",\n                \"2021-12-13\",\n                \"2021-12-14\",\n                \"2021-12-15\",\n                \"2021-12-16\",\n                \"2021-12-17\",\n                \"2021-12-18\",\n                \"2021-12-19\",\n                \"2021-12-20\"\n              ],\n              \"xaxis\": \"x\",\n              \"y\": [\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                2.0,\n                2.0,\n                3.0,\n                4.0,\n                5.0,\n                6.0,\n                8.0,\n                10.0,\n                12.0,\n                14.0,\n                17.0,\n                20.0,\n                23.0,\n                26.0,\n                30.0,\n                34.0,\n                38.0,\n                42.0,\n                46.0,\n                50.0,\n                53.0,\n                58.0,\n                63.0,\n                67.0,\n                71.0,\n                74.0,\n                78.0,\n                82.0,\n                87.0,\n                92.0,\n                96.0,\n                100.0,\n                104.0,\n                107.0,\n                110.0,\n                114.0,\n                119.0,\n                123.0,\n                127.0,\n                130.0,\n                133.0,\n                136.0,\n                140.0,\n                145.0,\n                149.0,\n                152.0,\n                155.0,\n                157.0,\n                160.0,\n                163.0,\n                167.0,\n                170.0,\n                174.0,\n                177.0,\n                178.0,\n                181.0,\n                184.0,\n                188.0,\n                191.0,\n                194.0,\n                196.0,\n                198.0,\n                199.0,\n                201.0,\n                205.0,\n                208.0,\n                210.0,\n                213.0,\n                214.0,\n                216.0,\n                219.0,\n                222.0,\n                226.0,\n                228.0,\n                230.0,\n                231.0,\n                233.0,\n                236.0,\n                238.0,\n                241.0,\n                243.0,\n                245.0,\n                247.0,\n                248.0,\n                251.0,\n                253.0,\n                256.0,\n                258.0,\n                260.0,\n                262.0,\n                264.0,\n                267.0,\n                270.0,\n                272.0,\n                275.0,\n                277.0,\n                278.0,\n                280.0,\n                282.0,\n                285.0,\n                287.0,\n                290.0,\n                291.0,\n                292.0,\n                294.0,\n                298.0,\n                300.0,\n                304.0,\n                306.0,\n                309.0,\n                310.0,\n                312.0,\n                315.0,\n                318.0,\n                321.0,\n                324.0,\n                327.0,\n                328.0,\n                330.0,\n                333.0,\n                337.0,\n                340.0,\n                343.0,\n                347.0,\n                348.0,\n                351.0,\n                355.0,\n                358.0,\n                362.0,\n                365.0,\n                368.0,\n                370.0,\n                371.0,\n                375.0,\n                379.0,\n                383.0,\n                387.0,\n                390.0,\n                391.0,\n                394.0,\n                397.0,\n                401.0,\n                404.0,\n                408.0,\n                411.0,\n                412.0,\n                414.0,\n                417.0,\n                421.0,\n                424.0,\n                427.0,\n                430.0,\n                431.0,\n                432.0,\n                436.0,\n                439.0,\n                442.0,\n                445.0,\n                448.0,\n                449.0,\n                451.0,\n                454.0,\n                457.0,\n                460.0,\n                462.0,\n                465.0,\n                466.0,\n                467.0,\n                469.0,\n                472.0,\n                475.0,\n                478.0,\n                480.0,\n                481.0,\n                482.0,\n                486.0,\n                488.0,\n                490.0,\n                493.0,\n                495.0,\n                496.0,\n                497.0,\n                500.0,\n                503.0,\n                506.0,\n                508.0,\n                510.0,\n                511.0,\n                512.0,\n                515.0,\n                517.0,\n                520.0,\n                522.0,\n                524.0,\n                525.0,\n                531.0,\n                533.0,\n                535.0,\n                538.0,\n                540.0,\n                542.0,\n                543.0,\n                544.0,\n                546.0,\n                549.0,\n                551.0,\n                554.0,\n                556.0,\n                557.0,\n                558.0,\n                561.0,\n                564.0,\n                565.0,\n                569.0,\n                571.0,\n                572.0,\n                574.0,\n                577.0,\n                580.0,\n                582.0,\n                585.0,\n                588.0,\n                589.0,\n                590.0,\n                594.0,\n                597.0,\n                600.0,\n                603.0,\n                606.0,\n                608.0,\n                610.0,\n                613.0,\n                617.0,\n                620.0,\n                623.0,\n                627.0,\n                629.0,\n                631.0,\n                634.0,\n                639.0,\n                644.0,\n                648.0,\n                652.0,\n                655.0,\n                657.0,\n                662.0,\n                668.0,\n                672.0,\n                676.0,\n                679.0,\n                681.0,\n                684.0,\n                690.0,\n                697.0,\n                703.0,\n                709.0,\n                714.0,\n                717.0,\n                721.0,\n                727.0,\n                734.0,\n                740.0,\n                747.0,\n                753.0,\n                757.0,\n                760.0,\n                767.0,\n                775.0,\n                783.0,\n                789.0,\n                795.0,\n                799.0,\n                803.0,\n                811.0,\n                818.0,\n                825.0,\n                829.0,\n                833.0,\n                836.0,\n                840.0,\n                849.0,\n                857.0,\n                865.0,\n                870.0,\n                875.0,\n                879.0,\n                883.0,\n                892.0,\n                901.0,\n                910.0,\n                919.0,\n                927.0,\n                932.0,\n                936.0,\n                946.0,\n                956.0,\n                964.0,\n                973.0,\n                982.0,\n                986.0,\n                990.0,\n                997.0,\n                1008.0,\n                1019.0,\n                1028.0,\n                1037.0,\n                1041.0,\n                1046.0,\n                1056.0,\n                1066.0,\n                1076.0,\n                1084.0,\n                1092.0,\n                1097.0,\n                1101.0,\n                1108.0,\n                1118.0,\n                1125.0,\n                1137.0,\n                1144.0,\n                1148.0,\n                1152.0,\n                1160.0,\n                1168.0,\n                1177.0,\n                1184.0,\n                1190.0,\n                1193.0,\n                1196.0,\n                1201.0,\n                1207.0,\n                1214.0,\n                1220.0,\n                1225.0,\n                1227.0,\n                1230.0,\n                1237.0,\n                1244.0,\n                1250.0,\n                1255.0,\n                1259.0,\n                1262.0,\n                1265.0,\n                1270.0,\n                1276.0,\n                1281.0,\n                1285.0,\n                1290.0,\n                1291.0,\n                1293.0,\n                1298.0,\n                1302.0,\n                1306.0,\n                1310.0,\n                1312.0,\n                1314.0,\n                1316.0,\n                1318.0,\n                1322.0,\n                1326.0,\n                1329.0,\n                1331.0,\n                1333.0,\n                1335.0,\n                1338.0,\n                1341.0,\n                1345.0,\n                1348.0,\n                1351.0,\n                1352.0,\n                1353.0,\n                1356.0,\n                1359.0,\n                1362.0,\n                1364.0,\n                1366.0,\n                1367.0,\n                1368.0,\n                1371.0,\n                1376.0,\n                1379.0,\n                1383.0,\n                1388.0,\n                1388.0,\n                1390.0,\n                1393.0,\n                1396.0,\n                1398.0,\n                1400.0,\n                1403.0,\n                1404.0,\n                1405.0,\n                1408.0,\n                1410.0,\n                1413.0,\n                1415.0,\n                1417.0,\n                1418.0,\n                1420.0,\n                1422.0,\n                1424.0,\n                1427.0,\n                1429.0,\n                1431.0,\n                1432.0,\n                1433.0,\n                1436.0,\n                1438.0,\n                1440.0,\n                1442.0,\n                1444.0,\n                1445.0,\n                1446.0,\n                1448.0,\n                1450.0,\n                1452.0,\n                1454.0,\n                1456.0,\n                1457.0,\n                1458.0,\n                1460.0,\n                1461.0,\n                1463.0,\n                1465.0,\n                1466.0,\n                1467.0,\n                1468.0,\n                1470.0,\n                1472.0,\n                1476.0,\n                1478.0,\n                1479.0,\n                1479.0,\n                1480.0,\n                1489.0,\n                1491.0,\n                1492.0,\n                1494.0,\n                1495.0,\n                1496.0,\n                1497.0,\n                1498.0,\n                1499.0,\n                1501.0,\n                1502.0,\n                1503.0,\n                1504.0,\n                1505.0,\n                1506.0,\n                1507.0,\n                1508.0,\n                1510.0,\n                1510.0,\n                1511.0,\n                1512.0,\n                1513.0,\n                1515.0,\n                1516.0,\n                1517.0,\n                1518.0,\n                1519.0,\n                1519.0,\n                1520.0,\n                1522.0,\n                1523.0,\n                1524.0,\n                1525.0,\n                1525.0,\n                1526.0,\n                1527.0,\n                1528.0,\n                1529.0,\n                1531.0,\n                1531.0,\n                1532.0,\n                1533.0,\n                1534.0,\n                1535.0,\n                1537.0,\n                1538.0,\n                1539.0,\n                1539.0,\n                1540.0,\n                1542.0,\n                1543.0,\n                1545.0,\n                1546.0,\n                1548.0,\n                1548.0,\n                1549.0,\n                1551.0,\n                1553.0,\n                1555.0,\n                1557.0,\n                1559.0,\n                1560.0,\n                1561.0,\n                1563.0,\n                1566.0,\n                1568.0,\n                1571.0,\n                1573.0,\n                1574.0,\n                1576.0,\n                1579.0,\n                1582.0,\n                1585.0,\n                1588.0,\n                1590.0,\n                1591.0,\n                1594.0,\n                1598.0,\n                1602.0,\n                1606.0,\n                1611.0,\n                1613.0,\n                1614.0,\n                1618.0,\n                1622.0,\n                1627.0,\n                1632.0,\n                1637.0,\n                1640.0,\n                1641.0,\n                1645.0,\n                1649.0,\n                1655.0,\n                1662.0,\n                1667.0,\n                1670.0,\n                1671.0,\n                1673.0,\n                1680.0,\n                1685.0,\n                1693.0,\n                1697.0,\n                1701.0,\n                1702.0,\n                1707.0,\n                1712.0,\n                1719.0,\n                1726.0,\n                1731.0,\n                1733.0,\n                1735.0,\n                1740.0,\n                1746.0,\n                1753.0,\n                1760.0,\n                1766.0,\n                1767.0,\n                1770.0,\n                1775.0,\n                1781.0,\n                1787.0,\n                1793.0,\n                1798.0,\n                1800.0,\n                1801.0,\n                1806.0,\n                1810.0,\n                1816.0,\n                1823.0,\n                1827.0,\n                1828.0,\n                1830.0,\n                1832.0,\n                1838.0,\n                1844.0,\n                1849.0,\n                1853.0,\n                1855.0,\n                1856.0,\n                1860.0,\n                1864.0,\n                1871.0,\n                1875.0,\n                1879.0,\n                1881.0,\n                1881.0,\n                1884.0,\n                1887.0,\n                1892.0,\n                1896.0,\n                1900.0,\n                1902.0,\n                1902.0,\n                1905.0,\n                1907.0,\n                1911.0,\n                1914.0,\n                1918.0,\n                1920.0,\n                1920.0,\n                1923.0,\n                1926.0,\n                1929.0,\n                1932.0,\n                1936.0,\n                1938.0,\n                1939.0,\n                1941.0,\n                1944.0,\n                1947.0,\n                1950.0,\n                1953.0,\n                1955.0,\n                1955.0,\n                1958.0,\n                1960.0,\n                1964.0,\n                1966.0,\n                1967.0,\n                1967.0,\n                1968.0,\n                1972.0,\n                1974.0,\n                1979.0,\n                1985.0,\n                1989.0,\n                1990.0,\n                1991.0,\n                1994.0,\n                1996.0,\n                2000.0,\n                2004.0,\n                2007.0,\n                2008.0,\n                2009.0,\n                2011.0,\n                2014.0,\n                2018.0,\n                2021.0,\n                2024.0,\n                2025.0,\n                2026.0,\n                2029.0\n              ],\n              \"yaxis\": \"y\",\n              \"type\": \"scattergl\"\n            },\n            {\n              \"hovertemplate\": \"Continent=Europe<br>Date=%{x}<br>Total Deaths per Million=%{y}<extra></extra>\",\n              \"legendgroup\": \"Europe\",\n              \"line\": {\n                \"color\": \"#00cc96\",\n                \"dash\": \"solid\"\n              },\n              \"marker\": {\n                \"symbol\": \"circle\"\n              },\n              \"mode\": \"lines\",\n              \"name\": \"Europe\",\n              \"showlegend\": true,\n              \"x\": [\n                \"2020-02-23\",\n                \"2020-02-24\",\n                \"2020-02-25\",\n                \"2020-02-26\",\n                \"2020-02-27\",\n                \"2020-02-28\",\n                \"2020-02-29\",\n                \"2020-03-01\",\n                \"2020-03-02\",\n                \"2020-03-03\",\n                \"2020-03-04\",\n                \"2020-03-05\",\n                \"2020-03-06\",\n                \"2020-03-07\",\n                \"2020-03-08\",\n                \"2020-03-09\",\n                \"2020-03-10\",\n                \"2020-03-11\",\n                \"2020-03-12\",\n                \"2020-03-13\",\n                \"2020-03-14\",\n                \"2020-03-15\",\n                \"2020-03-16\",\n                \"2020-03-17\",\n                \"2020-03-18\",\n                \"2020-03-19\",\n                \"2020-03-20\",\n                \"2020-03-21\",\n                \"2020-03-22\",\n                \"2020-03-23\",\n                \"2020-03-24\",\n                \"2020-03-25\",\n                \"2020-03-26\",\n                \"2020-03-27\",\n                \"2020-03-28\",\n                \"2020-03-29\",\n                \"2020-03-30\",\n                \"2020-03-31\",\n                \"2020-04-01\",\n                \"2020-04-02\",\n                \"2020-04-03\",\n                \"2020-04-04\",\n                \"2020-04-05\",\n                \"2020-04-06\",\n                \"2020-04-07\",\n                \"2020-04-08\",\n                \"2020-04-09\",\n                \"2020-04-10\",\n                \"2020-04-11\",\n                \"2020-04-12\",\n                \"2020-04-13\",\n                \"2020-04-14\",\n                \"2020-04-15\",\n                \"2020-04-16\",\n                \"2020-04-17\",\n                \"2020-04-18\",\n                \"2020-04-19\",\n                \"2020-04-20\",\n                \"2020-04-21\",\n                \"2020-04-22\",\n                \"2020-04-23\",\n                \"2020-04-24\",\n                \"2020-04-25\",\n                \"2020-04-26\",\n                \"2020-04-27\",\n                \"2020-04-28\",\n                \"2020-04-29\",\n                \"2020-04-30\",\n                \"2020-05-01\",\n                \"2020-05-02\",\n                \"2020-05-03\",\n                \"2020-05-04\",\n                \"2020-05-05\",\n                \"2020-05-06\",\n                \"2020-05-07\",\n                \"2020-05-08\",\n                \"2020-05-09\",\n                \"2020-05-10\",\n                \"2020-05-11\",\n                \"2020-05-12\",\n                \"2020-05-13\",\n                \"2020-05-14\",\n                \"2020-05-15\",\n                \"2020-05-16\",\n                \"2020-05-17\",\n                \"2020-05-18\",\n                \"2020-05-19\",\n                \"2020-05-20\",\n                \"2020-05-21\",\n                \"2020-05-22\",\n                \"2020-05-23\",\n                \"2020-05-24\",\n                \"2020-05-25\",\n                \"2020-05-26\",\n                \"2020-05-27\",\n                \"2020-05-28\",\n                \"2020-05-29\",\n                \"2020-05-30\",\n                \"2020-05-31\",\n                \"2020-06-01\",\n                \"2020-06-02\",\n                \"2020-06-03\",\n                \"2020-06-04\",\n                \"2020-06-05\",\n                \"2020-06-06\",\n                \"2020-06-07\",\n                \"2020-06-08\",\n                \"2020-06-09\",\n                \"2020-06-10\",\n                \"2020-06-11\",\n                \"2020-06-12\",\n                \"2020-06-13\",\n                \"2020-06-14\",\n                \"2020-06-15\",\n                \"2020-06-16\",\n                \"2020-06-17\",\n                \"2020-06-18\",\n                \"2020-06-19\",\n                \"2020-06-20\",\n                \"2020-06-21\",\n                \"2020-06-22\",\n                \"2020-06-23\",\n                \"2020-06-24\",\n                \"2020-06-25\",\n                \"2020-06-26\",\n                \"2020-06-27\",\n                \"2020-06-28\",\n                \"2020-06-29\",\n                \"2020-06-30\",\n                \"2020-07-01\",\n                \"2020-07-02\",\n                \"2020-07-03\",\n                \"2020-07-04\",\n                \"2020-07-05\",\n                \"2020-07-06\",\n                \"2020-07-07\",\n                \"2020-07-08\",\n                \"2020-07-09\",\n                \"2020-07-10\",\n                \"2020-07-11\",\n                \"2020-07-12\",\n                \"2020-07-13\",\n                \"2020-07-14\",\n                \"2020-07-15\",\n                \"2020-07-16\",\n                \"2020-07-17\",\n                \"2020-07-18\",\n                \"2020-07-19\",\n                \"2020-07-20\",\n                \"2020-07-21\",\n                \"2020-07-22\",\n                \"2020-07-23\",\n                \"2020-07-24\",\n                \"2020-07-25\",\n                \"2020-07-26\",\n                \"2020-07-27\",\n                \"2020-07-28\",\n                \"2020-07-29\",\n                \"2020-07-30\",\n                \"2020-07-31\",\n                \"2020-08-01\",\n                \"2020-08-02\",\n                \"2020-08-03\",\n                \"2020-08-04\",\n                \"2020-08-05\",\n                \"2020-08-06\",\n                \"2020-08-07\",\n                \"2020-08-08\",\n                \"2020-08-09\",\n                \"2020-08-10\",\n                \"2020-08-11\",\n                \"2020-08-12\",\n                \"2020-08-13\",\n                \"2020-08-14\",\n                \"2020-08-15\",\n                \"2020-08-16\",\n                \"2020-08-17\",\n                \"2020-08-18\",\n                \"2020-08-19\",\n                \"2020-08-20\",\n                \"2020-08-21\",\n                \"2020-08-22\",\n                \"2020-08-23\",\n                \"2020-08-24\",\n                \"2020-08-25\",\n                \"2020-08-26\",\n                \"2020-08-27\",\n                \"2020-08-28\",\n                \"2020-08-29\",\n                \"2020-08-30\",\n                \"2020-08-31\",\n                \"2020-09-01\",\n                \"2020-09-02\",\n                \"2020-09-03\",\n                \"2020-09-04\",\n                \"2020-09-05\",\n                \"2020-09-06\",\n                \"2020-09-07\",\n                \"2020-09-08\",\n                \"2020-09-09\",\n                \"2020-09-10\",\n                \"2020-09-11\",\n                \"2020-09-12\",\n                \"2020-09-13\",\n                \"2020-09-14\",\n                \"2020-09-15\",\n                \"2020-09-16\",\n                \"2020-09-17\",\n                \"2020-09-18\",\n                \"2020-09-19\",\n                \"2020-09-20\",\n                \"2020-09-21\",\n                \"2020-09-22\",\n                \"2020-09-23\",\n                \"2020-09-24\",\n                \"2020-09-25\",\n                \"2020-09-26\",\n                \"2020-09-27\",\n                \"2020-09-28\",\n                \"2020-09-29\",\n                \"2020-09-30\",\n                \"2020-10-01\",\n                \"2020-10-02\",\n                \"2020-10-03\",\n                \"2020-10-04\",\n                \"2020-10-05\",\n                \"2020-10-06\",\n                \"2020-10-07\",\n                \"2020-10-08\",\n                \"2020-10-09\",\n                \"2020-10-10\",\n                \"2020-10-11\",\n                \"2020-10-12\",\n                \"2020-10-13\",\n                \"2020-10-14\",\n                \"2020-10-15\",\n                \"2020-10-16\",\n                \"2020-10-17\",\n                \"2020-10-18\",\n                \"2020-10-19\",\n                \"2020-10-20\",\n                \"2020-10-21\",\n                \"2020-10-22\",\n                \"2020-10-23\",\n                \"2020-10-24\",\n                \"2020-10-25\",\n                \"2020-10-26\",\n                \"2020-10-27\",\n                \"2020-10-28\",\n                \"2020-10-29\",\n                \"2020-10-30\",\n                \"2020-10-31\",\n                \"2020-11-01\",\n                \"2020-11-02\",\n                \"2020-11-03\",\n                \"2020-11-04\",\n                \"2020-11-05\",\n                \"2020-11-06\",\n                \"2020-11-07\",\n                \"2020-11-08\",\n                \"2020-11-09\",\n                \"2020-11-10\",\n                \"2020-11-11\",\n                \"2020-11-12\",\n                \"2020-11-13\",\n                \"2020-11-14\",\n                \"2020-11-15\",\n                \"2020-11-16\",\n                \"2020-11-17\",\n                \"2020-11-18\",\n                \"2020-11-19\",\n                \"2020-11-20\",\n                \"2020-11-21\",\n                \"2020-11-22\",\n                \"2020-11-23\",\n                \"2020-11-24\",\n                \"2020-11-25\",\n                \"2020-11-26\",\n                \"2020-11-27\",\n                \"2020-11-28\",\n                \"2020-11-29\",\n                \"2020-11-30\",\n                \"2020-12-01\",\n                \"2020-12-02\",\n                \"2020-12-03\",\n                \"2020-12-04\",\n                \"2020-12-05\",\n                \"2020-12-06\",\n                \"2020-12-07\",\n                \"2020-12-08\",\n                \"2020-12-09\",\n                \"2020-12-10\",\n                \"2020-12-11\",\n                \"2020-12-12\",\n                \"2020-12-13\",\n                \"2020-12-14\",\n                \"2020-12-15\",\n                \"2020-12-16\",\n                \"2020-12-17\",\n                \"2020-12-18\",\n                \"2020-12-19\",\n                \"2020-12-20\",\n                \"2020-12-21\",\n                \"2020-12-22\",\n                \"2020-12-23\",\n                \"2020-12-24\",\n                \"2020-12-25\",\n                \"2020-12-26\",\n                \"2020-12-27\",\n                \"2020-12-28\",\n                \"2020-12-29\",\n                \"2020-12-30\",\n                \"2020-12-31\",\n                \"2021-01-01\",\n                \"2021-01-02\",\n                \"2021-01-03\",\n                \"2021-01-04\",\n                \"2021-01-05\",\n                \"2021-01-06\",\n                \"2021-01-07\",\n                \"2021-01-08\",\n                \"2021-01-09\",\n                \"2021-01-10\",\n                \"2021-01-11\",\n                \"2021-01-12\",\n                \"2021-01-13\",\n                \"2021-01-14\",\n                \"2021-01-15\",\n                \"2021-01-16\",\n                \"2021-01-17\",\n                \"2021-01-18\",\n                \"2021-01-19\",\n                \"2021-01-20\",\n                \"2021-01-21\",\n                \"2021-01-22\",\n                \"2021-01-23\",\n                \"2021-01-24\",\n                \"2021-01-25\",\n                \"2021-01-26\",\n                \"2021-01-27\",\n                \"2021-01-28\",\n                \"2021-01-29\",\n                \"2021-01-30\",\n                \"2021-01-31\",\n                \"2021-02-01\",\n                \"2021-02-02\",\n                \"2021-02-03\",\n                \"2021-02-04\",\n                \"2021-02-05\",\n                \"2021-02-06\",\n                \"2021-02-07\",\n                \"2021-02-08\",\n                \"2021-02-09\",\n                \"2021-02-10\",\n                \"2021-02-11\",\n                \"2021-02-12\",\n                \"2021-02-13\",\n                \"2021-02-14\",\n                \"2021-02-15\",\n                \"2021-02-16\",\n                \"2021-02-17\",\n                \"2021-02-18\",\n                \"2021-02-19\",\n                \"2021-02-20\",\n                \"2021-02-21\",\n                \"2021-02-22\",\n                \"2021-02-23\",\n                \"2021-02-24\",\n                \"2021-02-25\",\n                \"2021-02-26\",\n                \"2021-02-27\",\n                \"2021-02-28\",\n                \"2021-03-01\",\n                \"2021-03-02\",\n                \"2021-03-03\",\n                \"2021-03-04\",\n                \"2021-03-05\",\n                \"2021-03-06\",\n                \"2021-03-07\",\n                \"2021-03-08\",\n                \"2021-03-09\",\n                \"2021-03-10\",\n                \"2021-03-11\",\n                \"2021-03-12\",\n                \"2021-03-13\",\n                \"2021-03-14\",\n                \"2021-03-15\",\n                \"2021-03-16\",\n                \"2021-03-17\",\n                \"2021-03-18\",\n                \"2021-03-19\",\n                \"2021-03-20\",\n                \"2021-03-21\",\n                \"2021-03-22\",\n                \"2021-03-23\",\n                \"2021-03-24\",\n                \"2021-03-25\",\n                \"2021-03-26\",\n                \"2021-03-27\",\n                \"2021-03-28\",\n                \"2021-03-29\",\n                \"2021-03-30\",\n                \"2021-03-31\",\n                \"2021-04-01\",\n                \"2021-04-02\",\n                \"2021-04-03\",\n                \"2021-04-04\",\n                \"2021-04-05\",\n                \"2021-04-06\",\n                \"2021-04-07\",\n                \"2021-04-08\",\n                \"2021-04-09\",\n                \"2021-04-10\",\n                \"2021-04-11\",\n                \"2021-04-12\",\n                \"2021-04-13\",\n                \"2021-04-14\",\n                \"2021-04-15\",\n                \"2021-04-16\",\n                \"2021-04-17\",\n                \"2021-04-18\",\n                \"2021-04-19\",\n                \"2021-04-20\",\n                \"2021-04-21\",\n                \"2021-04-22\",\n                \"2021-04-23\",\n                \"2021-04-24\",\n                \"2021-04-25\",\n                \"2021-04-26\",\n                \"2021-04-27\",\n                \"2021-04-28\",\n                \"2021-04-29\",\n                \"2021-04-30\",\n                \"2021-05-01\",\n                \"2021-05-02\",\n                \"2021-05-03\",\n                \"2021-05-04\",\n                \"2021-05-05\",\n                \"2021-05-06\",\n                \"2021-05-07\",\n                \"2021-05-08\",\n                \"2021-05-09\",\n                \"2021-05-10\",\n                \"2021-05-11\",\n                \"2021-05-12\",\n                \"2021-05-13\",\n                \"2021-05-14\",\n                \"2021-05-15\",\n                \"2021-05-16\",\n                \"2021-05-17\",\n                \"2021-05-18\",\n                \"2021-05-19\",\n                \"2021-05-20\",\n                \"2021-05-21\",\n                \"2021-05-22\",\n                \"2021-05-23\",\n                \"2021-05-24\",\n                \"2021-05-25\",\n                \"2021-05-26\",\n                \"2021-05-27\",\n                \"2021-05-28\",\n                \"2021-05-29\",\n                \"2021-05-30\",\n                \"2021-05-31\",\n                \"2021-06-01\",\n                \"2021-06-02\",\n                \"2021-06-03\",\n                \"2021-06-04\",\n                \"2021-06-05\",\n                \"2021-06-06\",\n                \"2021-06-07\",\n                \"2021-06-08\",\n                \"2021-06-09\",\n                \"2021-06-10\",\n                \"2021-06-11\",\n                \"2021-06-12\",\n                \"2021-06-13\",\n                \"2021-06-14\",\n                \"2021-06-15\",\n                \"2021-06-16\",\n                \"2021-06-17\",\n                \"2021-06-18\",\n                \"2021-06-19\",\n                \"2021-06-20\",\n                \"2021-06-21\",\n                \"2021-06-22\",\n                \"2021-06-23\",\n                \"2021-06-24\",\n                \"2021-06-25\",\n                \"2021-06-26\",\n                \"2021-06-27\",\n                \"2021-06-28\",\n                \"2021-06-29\",\n                \"2021-06-30\",\n                \"2021-07-01\",\n                \"2021-07-02\",\n                \"2021-07-03\",\n                \"2021-07-04\",\n                \"2021-07-05\",\n                \"2021-07-06\",\n                \"2021-07-07\",\n                \"2021-07-08\",\n                \"2021-07-09\",\n                \"2021-07-10\",\n                \"2021-07-11\",\n                \"2021-07-12\",\n                \"2021-07-13\",\n                \"2021-07-14\",\n                \"2021-07-15\",\n                \"2021-07-16\",\n                \"2021-07-17\",\n                \"2021-07-18\",\n                \"2021-07-19\",\n                \"2021-07-20\",\n                \"2021-07-21\",\n                \"2021-07-22\",\n                \"2021-07-23\",\n                \"2021-07-24\",\n                \"2021-07-25\",\n                \"2021-07-26\",\n                \"2021-07-27\",\n                \"2021-07-28\",\n                \"2021-07-29\",\n                \"2021-07-30\",\n                \"2021-07-31\",\n                \"2021-08-01\",\n                \"2021-08-02\",\n                \"2021-08-03\",\n                \"2021-08-04\",\n                \"2021-08-05\",\n                \"2021-08-06\",\n                \"2021-08-07\",\n                \"2021-08-08\",\n                \"2021-08-09\",\n                \"2021-08-10\",\n                \"2021-08-11\",\n                \"2021-08-12\",\n                \"2021-08-13\",\n                \"2021-08-14\",\n                \"2021-08-15\",\n                \"2021-08-16\",\n                \"2021-08-17\",\n                \"2021-08-18\",\n                \"2021-08-19\",\n                \"2021-08-20\",\n                \"2021-08-21\",\n                \"2021-08-22\",\n                \"2021-08-23\",\n                \"2021-08-24\",\n                \"2021-08-25\",\n                \"2021-08-26\",\n                \"2021-08-27\",\n                \"2021-08-28\",\n                \"2021-08-29\",\n                \"2021-08-30\",\n                \"2021-08-31\",\n                \"2021-09-01\",\n                \"2021-09-02\",\n                \"2021-09-03\",\n                \"2021-09-04\",\n                \"2021-09-05\",\n                \"2021-09-06\",\n                \"2021-09-07\",\n                \"2021-09-08\",\n                \"2021-09-09\",\n                \"2021-09-10\",\n                \"2021-09-11\",\n                \"2021-09-12\",\n                \"2021-09-13\",\n                \"2021-09-14\",\n                \"2021-09-15\",\n                \"2021-09-16\",\n                \"2021-09-17\",\n                \"2021-09-18\",\n                \"2021-09-19\",\n                \"2021-09-20\",\n                \"2021-09-21\",\n                \"2021-09-22\",\n                \"2021-09-23\",\n                \"2021-09-24\",\n                \"2021-09-25\",\n                \"2021-09-26\",\n                \"2021-09-27\",\n                \"2021-09-28\",\n                \"2021-09-29\",\n                \"2021-09-30\",\n                \"2021-10-01\",\n                \"2021-10-02\",\n                \"2021-10-03\",\n                \"2021-10-04\",\n                \"2021-10-05\",\n                \"2021-10-06\",\n                \"2021-10-07\",\n                \"2021-10-08\",\n                \"2021-10-09\",\n                \"2021-10-10\",\n                \"2021-10-11\",\n                \"2021-10-12\",\n                \"2021-10-13\",\n                \"2021-10-14\",\n                \"2021-10-15\",\n                \"2021-10-16\",\n                \"2021-10-17\",\n                \"2021-10-18\",\n                \"2021-10-19\",\n                \"2021-10-20\",\n                \"2021-10-21\",\n                \"2021-10-22\",\n                \"2021-10-23\",\n                \"2021-10-24\",\n                \"2021-10-25\",\n                \"2021-10-26\",\n                \"2021-10-27\",\n                \"2021-10-28\",\n                \"2021-10-29\",\n                \"2021-10-30\",\n                \"2021-10-31\",\n                \"2021-11-01\",\n                \"2021-11-02\",\n                \"2021-11-03\",\n                \"2021-11-04\",\n                \"2021-11-05\",\n                \"2021-11-06\",\n                \"2021-11-07\",\n                \"2021-11-08\",\n                \"2021-11-09\",\n                \"2021-11-10\",\n                \"2021-11-11\",\n                \"2021-11-12\",\n                \"2021-11-13\",\n                \"2021-11-14\",\n                \"2021-11-15\",\n                \"2021-11-16\",\n                \"2021-11-17\",\n                \"2021-11-18\",\n                \"2021-11-19\",\n                \"2021-11-20\",\n                \"2021-11-21\",\n                \"2021-11-22\",\n                \"2021-11-23\",\n                \"2021-11-24\",\n                \"2021-11-25\",\n                \"2021-11-26\",\n                \"2021-11-27\",\n                \"2021-11-28\",\n                \"2021-11-29\",\n                \"2021-11-30\",\n                \"2021-12-01\",\n                \"2021-12-02\",\n                \"2021-12-03\",\n                \"2021-12-04\",\n                \"2021-12-05\",\n                \"2021-12-06\",\n                \"2021-12-07\",\n                \"2021-12-08\",\n                \"2021-12-09\",\n                \"2021-12-10\",\n                \"2021-12-11\",\n                \"2021-12-12\",\n                \"2021-12-13\",\n                \"2021-12-14\",\n                \"2021-12-15\",\n                \"2021-12-16\",\n                \"2021-12-17\",\n                \"2021-12-18\",\n                \"2021-12-19\",\n                \"2021-12-20\"\n              ],\n              \"xaxis\": \"x\",\n              \"y\": [\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                2.0,\n                2.0,\n                3.0,\n                3.0,\n                4.0,\n                5.0,\n                6.0,\n                7.0,\n                9.0,\n                10.0,\n                12.0,\n                14.0,\n                17.0,\n                19.0,\n                23.0,\n                26.0,\n                29.0,\n                32.0,\n                36.0,\n                41.0,\n                46.0,\n                50.0,\n                55.0,\n                58.0,\n                63.0,\n                69.0,\n                73.0,\n                79.0,\n                84.0,\n                88.0,\n                92.0,\n                95.0,\n                100.0,\n                106.0,\n                111.0,\n                115.0,\n                119.0,\n                122.0,\n                126.0,\n                130.0,\n                134.0,\n                138.0,\n                142.0,\n                145.0,\n                147.0,\n                150.0,\n                153.0,\n                156.0,\n                159.0,\n                161.0,\n                164.0,\n                165.0,\n                167.0,\n                169.0,\n                172.0,\n                175.0,\n                177.0,\n                178.0,\n                179.0,\n                181.0,\n                183.0,\n                185.0,\n                187.0,\n                188.0,\n                190.0,\n                191.0,\n                192.0,\n                193.0,\n                194.0,\n                195.0,\n                197.0,\n                198.0,\n                199.0,\n                198.0,\n                199.0,\n                200.0,\n                201.0,\n                202.0,\n                203.0,\n                204.0,\n                204.0,\n                205.0,\n                206.0,\n                207.0,\n                208.0,\n                209.0,\n                209.0,\n                210.0,\n                210.0,\n                211.0,\n                212.0,\n                212.0,\n                213.0,\n                213.0,\n                214.0,\n                215.0,\n                215.0,\n                216.0,\n                218.0,\n                218.0,\n                219.0,\n                219.0,\n                220.0,\n                220.0,\n                221.0,\n                221.0,\n                222.0,\n                222.0,\n                222.0,\n                223.0,\n                224.0,\n                224.0,\n                225.0,\n                225.0,\n                225.0,\n                226.0,\n                226.0,\n                227.0,\n                227.0,\n                228.0,\n                228.0,\n                229.0,\n                229.0,\n                230.0,\n                230.0,\n                231.0,\n                231.0,\n                231.0,\n                232.0,\n                232.0,\n                233.0,\n                233.0,\n                233.0,\n                234.0,\n                234.0,\n                234.0,\n                235.0,\n                235.0,\n                236.0,\n                236.0,\n                237.0,\n                237.0,\n                238.0,\n                238.0,\n                238.0,\n                239.0,\n                239.0,\n                240.0,\n                240.0,\n                240.0,\n                241.0,\n                241.0,\n                242.0,\n                242.0,\n                243.0,\n                243.0,\n                244.0,\n                244.0,\n                244.0,\n                245.0,\n                245.0,\n                246.0,\n                246.0,\n                246.0,\n                247.0,\n                247.0,\n                248.0,\n                248.0,\n                248.0,\n                249.0,\n                249.0,\n                250.0,\n                250.0,\n                251.0,\n                251.0,\n                252.0,\n                252.0,\n                253.0,\n                253.0,\n                254.0,\n                254.0,\n                255.0,\n                255.0,\n                256.0,\n                256.0,\n                257.0,\n                257.0,\n                258.0,\n                259.0,\n                260.0,\n                261.0,\n                261.0,\n                262.0,\n                263.0,\n                263.0,\n                264.0,\n                265.0,\n                266.0,\n                266.0,\n                267.0,\n                268.0,\n                269.0,\n                270.0,\n                271.0,\n                272.0,\n                272.0,\n                273.0,\n                275.0,\n                276.0,\n                277.0,\n                278.0,\n                279.0,\n                280.0,\n                281.0,\n                282.0,\n                284.0,\n                286.0,\n                287.0,\n                289.0,\n                290.0,\n                291.0,\n                294.0,\n                296.0,\n                298.0,\n                300.0,\n                302.0,\n                304.0,\n                306.0,\n                310.0,\n                313.0,\n                316.0,\n                319.0,\n                322.0,\n                325.0,\n                328.0,\n                333.0,\n                339.0,\n                343.0,\n                349.0,\n                352.0,\n                355.0,\n                360.0,\n                366.0,\n                372.0,\n                377.0,\n                383.0,\n                387.0,\n                391.0,\n                396.0,\n                402.0,\n                409.0,\n                415.0,\n                421.0,\n                426.0,\n                430.0,\n                435.0,\n                443.0,\n                450.0,\n                456.0,\n                463.0,\n                468.0,\n                472.0,\n                478.0,\n                485.0,\n                492.0,\n                498.0,\n                505.0,\n                510.0,\n                514.0,\n                519.0,\n                526.0,\n                532.0,\n                539.0,\n                546.0,\n                551.0,\n                555.0,\n                560.0,\n                568.0,\n                575.0,\n                582.0,\n                589.0,\n                594.0,\n                598.0,\n                603.0,\n                610.0,\n                617.0,\n                623.0,\n                627.0,\n                631.0,\n                635.0,\n                640.0,\n                648.0,\n                656.0,\n                662.0,\n                666.0,\n                670.0,\n                674.0,\n                679.0,\n                687.0,\n                693.0,\n                700.0,\n                707.0,\n                713.0,\n                717.0,\n                722.0,\n                730.0,\n                738.0,\n                745.0,\n                752.0,\n                758.0,\n                762.0,\n                766.0,\n                775.0,\n                784.0,\n                791.0,\n                798.0,\n                804.0,\n                807.0,\n                813.0,\n                820.0,\n                828.0,\n                836.0,\n                842.0,\n                848.0,\n                851.0,\n                857.0,\n                865.0,\n                872.0,\n                878.0,\n                885.0,\n                889.0,\n                892.0,\n                896.0,\n                903.0,\n                910.0,\n                915.0,\n                921.0,\n                924.0,\n                927.0,\n                930.0,\n                936.0,\n                941.0,\n                946.0,\n                951.0,\n                954.0,\n                956.0,\n                960.0,\n                964.0,\n                969.0,\n                973.0,\n                977.0,\n                980.0,\n                982.0,\n                986.0,\n                990.0,\n                995.0,\n                999.0,\n                1003.0,\n                1006.0,\n                1008.0,\n                1012.0,\n                1016.0,\n                1020.0,\n                1024.0,\n                1028.0,\n                1031.0,\n                1033.0,\n                1037.0,\n                1041.0,\n                1045.0,\n                1049.0,\n                1053.0,\n                1057.0,\n                1062.0,\n                1066.0,\n                1070.0,\n                1075.0,\n                1080.0,\n                1085.0,\n                1089.0,\n                1091.0,\n                1095.0,\n                1100.0,\n                1105.0,\n                1109.0,\n                1114.0,\n                1118.0,\n                1121.0,\n                1124.0,\n                1128.0,\n                1134.0,\n                1139.0,\n                1145.0,\n                1149.0,\n                1152.0,\n                1156.0,\n                1161.0,\n                1167.0,\n                1171.0,\n                1176.0,\n                1180.0,\n                1183.0,\n                1187.0,\n                1192.0,\n                1197.0,\n                1202.0,\n                1206.0,\n                1210.0,\n                1213.0,\n                1217.0,\n                1221.0,\n                1226.0,\n                1230.0,\n                1234.0,\n                1237.0,\n                1239.0,\n                1242.0,\n                1246.0,\n                1249.0,\n                1253.0,\n                1257.0,\n                1260.0,\n                1262.0,\n                1265.0,\n                1268.0,\n                1271.0,\n                1274.0,\n                1277.0,\n                1279.0,\n                1281.0,\n                1283.0,\n                1286.0,\n                1288.0,\n                1291.0,\n                1293.0,\n                1295.0,\n                1296.0,\n                1298.0,\n                1300.0,\n                1303.0,\n                1305.0,\n                1306.0,\n                1308.0,\n                1309.0,\n                1311.0,\n                1312.0,\n                1314.0,\n                1316.0,\n                1317.0,\n                1319.0,\n                1320.0,\n                1321.0,\n                1323.0,\n                1324.0,\n                1326.0,\n                1327.0,\n                1328.0,\n                1329.0,\n                1330.0,\n                1332.0,\n                1333.0,\n                1334.0,\n                1335.0,\n                1336.0,\n                1337.0,\n                1338.0,\n                1340.0,\n                1341.0,\n                1342.0,\n                1344.0,\n                1345.0,\n                1346.0,\n                1347.0,\n                1349.0,\n                1350.0,\n                1351.0,\n                1353.0,\n                1354.0,\n                1355.0,\n                1356.0,\n                1357.0,\n                1358.0,\n                1360.0,\n                1361.0,\n                1362.0,\n                1363.0,\n                1364.0,\n                1366.0,\n                1367.0,\n                1368.0,\n                1369.0,\n                1370.0,\n                1372.0,\n                1373.0,\n                1374.0,\n                1376.0,\n                1377.0,\n                1378.0,\n                1380.0,\n                1381.0,\n                1382.0,\n                1384.0,\n                1385.0,\n                1387.0,\n                1388.0,\n                1389.0,\n                1391.0,\n                1392.0,\n                1394.0,\n                1395.0,\n                1398.0,\n                1399.0,\n                1401.0,\n                1402.0,\n                1404.0,\n                1406.0,\n                1408.0,\n                1410.0,\n                1411.0,\n                1413.0,\n                1414.0,\n                1417.0,\n                1419.0,\n                1421.0,\n                1423.0,\n                1425.0,\n                1427.0,\n                1428.0,\n                1432.0,\n                1434.0,\n                1436.0,\n                1438.0,\n                1440.0,\n                1442.0,\n                1444.0,\n                1447.0,\n                1449.0,\n                1452.0,\n                1455.0,\n                1457.0,\n                1459.0,\n                1461.0,\n                1464.0,\n                1466.0,\n                1469.0,\n                1471.0,\n                1473.0,\n                1475.0,\n                1477.0,\n                1480.0,\n                1483.0,\n                1485.0,\n                1488.0,\n                1490.0,\n                1492.0,\n                1494.0,\n                1497.0,\n                1500.0,\n                1502.0,\n                1505.0,\n                1507.0,\n                1509.0,\n                1511.0,\n                1514.0,\n                1517.0,\n                1520.0,\n                1522.0,\n                1525.0,\n                1527.0,\n                1529.0,\n                1532.0,\n                1535.0,\n                1539.0,\n                1542.0,\n                1545.0,\n                1547.0,\n                1549.0,\n                1552.0,\n                1556.0,\n                1559.0,\n                1563.0,\n                1566.0,\n                1569.0,\n                1571.0,\n                1574.0,\n                1578.0,\n                1582.0,\n                1586.0,\n                1590.0,\n                1593.0,\n                1596.0,\n                1600.0,\n                1604.0,\n                1609.0,\n                1613.0,\n                1618.0,\n                1621.0,\n                1625.0,\n                1628.0,\n                1633.0,\n                1638.0,\n                1643.0,\n                1648.0,\n                1652.0,\n                1656.0,\n                1660.0,\n                1665.0,\n                1671.0,\n                1676.0,\n                1681.0,\n                1685.0,\n                1689.0,\n                1693.0,\n                1699.0,\n                1705.0,\n                1710.0,\n                1715.0,\n                1719.0,\n                1723.0,\n                1728.0,\n                1733.0,\n                1739.0,\n                1744.0,\n                1749.0,\n                1753.0,\n                1757.0,\n                1762.0,\n                1767.0,\n                1773.0,\n                1778.0,\n                1783.0,\n                1787.0,\n                1790.0,\n                1795.0,\n                1801.0,\n                1806.0,\n                1811.0,\n                1817.0,\n                1821.0,\n                1824.0,\n                1828.0,\n                1834.0,\n                1839.0,\n                1844.0,\n                1849.0,\n                1853.0,\n                1856.0,\n                1860.0\n              ],\n              \"yaxis\": \"y\",\n              \"type\": \"scattergl\"\n            },\n            {\n              \"hovertemplate\": \"Continent=Asia<br>Date=%{x}<br>Total Deaths per Million=%{y}<extra></extra>\",\n              \"legendgroup\": \"Asia\",\n              \"line\": {\n                \"color\": \"#ab63fa\",\n                \"dash\": \"solid\"\n              },\n              \"marker\": {\n                \"symbol\": \"circle\"\n              },\n              \"mode\": \"lines\",\n              \"name\": \"Asia\",\n              \"showlegend\": true,\n              \"x\": [\n                \"2020-02-23\",\n                \"2020-02-24\",\n                \"2020-02-25\",\n                \"2020-02-26\",\n                \"2020-02-27\",\n                \"2020-02-28\",\n                \"2020-02-29\",\n                \"2020-03-01\",\n                \"2020-03-02\",\n                \"2020-03-03\",\n                \"2020-03-04\",\n                \"2020-03-05\",\n                \"2020-03-06\",\n                \"2020-03-07\",\n                \"2020-03-08\",\n                \"2020-03-09\",\n                \"2020-03-10\",\n                \"2020-03-11\",\n                \"2020-03-12\",\n                \"2020-03-13\",\n                \"2020-03-14\",\n                \"2020-03-15\",\n                \"2020-03-16\",\n                \"2020-03-17\",\n                \"2020-03-18\",\n                \"2020-03-19\",\n                \"2020-03-20\",\n                \"2020-03-21\",\n                \"2020-03-22\",\n                \"2020-03-23\",\n                \"2020-03-24\",\n                \"2020-03-25\",\n                \"2020-03-26\",\n                \"2020-03-27\",\n                \"2020-03-28\",\n                \"2020-03-29\",\n                \"2020-03-30\",\n                \"2020-03-31\",\n                \"2020-04-01\",\n                \"2020-04-02\",\n                \"2020-04-03\",\n                \"2020-04-04\",\n                \"2020-04-05\",\n                \"2020-04-06\",\n                \"2020-04-07\",\n                \"2020-04-08\",\n                \"2020-04-09\",\n                \"2020-04-10\",\n                \"2020-04-11\",\n                \"2020-04-12\",\n                \"2020-04-13\",\n                \"2020-04-14\",\n                \"2020-04-15\",\n                \"2020-04-16\",\n                \"2020-04-17\",\n                \"2020-04-18\",\n                \"2020-04-19\",\n                \"2020-04-20\",\n                \"2020-04-21\",\n                \"2020-04-22\",\n                \"2020-04-23\",\n                \"2020-04-24\",\n                \"2020-04-25\",\n                \"2020-04-26\",\n                \"2020-04-27\",\n                \"2020-04-28\",\n                \"2020-04-29\",\n                \"2020-04-30\",\n                \"2020-05-01\",\n                \"2020-05-02\",\n                \"2020-05-03\",\n                \"2020-05-04\",\n                \"2020-05-05\",\n                \"2020-05-06\",\n                \"2020-05-07\",\n                \"2020-05-08\",\n                \"2020-05-09\",\n                \"2020-05-10\",\n                \"2020-05-11\",\n                \"2020-05-12\",\n                \"2020-05-13\",\n                \"2020-05-14\",\n                \"2020-05-15\",\n                \"2020-05-16\",\n                \"2020-05-17\",\n                \"2020-05-18\",\n                \"2020-05-19\",\n                \"2020-05-20\",\n                \"2020-05-21\",\n                \"2020-05-22\",\n                \"2020-05-23\",\n                \"2020-05-24\",\n                \"2020-05-25\",\n                \"2020-05-26\",\n                \"2020-05-27\",\n                \"2020-05-28\",\n                \"2020-05-29\",\n                \"2020-05-30\",\n                \"2020-05-31\",\n                \"2020-06-01\",\n                \"2020-06-02\",\n                \"2020-06-03\",\n                \"2020-06-04\",\n                \"2020-06-05\",\n                \"2020-06-06\",\n                \"2020-06-07\",\n                \"2020-06-08\",\n                \"2020-06-09\",\n                \"2020-06-10\",\n                \"2020-06-11\",\n                \"2020-06-12\",\n                \"2020-06-13\",\n                \"2020-06-14\",\n                \"2020-06-15\",\n                \"2020-06-16\",\n                \"2020-06-17\",\n                \"2020-06-18\",\n                \"2020-06-19\",\n                \"2020-06-20\",\n                \"2020-06-21\",\n                \"2020-06-22\",\n                \"2020-06-23\",\n                \"2020-06-24\",\n                \"2020-06-25\",\n                \"2020-06-26\",\n                \"2020-06-27\",\n                \"2020-06-28\",\n                \"2020-06-29\",\n                \"2020-06-30\",\n                \"2020-07-01\",\n                \"2020-07-02\",\n                \"2020-07-03\",\n                \"2020-07-04\",\n                \"2020-07-05\",\n                \"2020-07-06\",\n                \"2020-07-07\",\n                \"2020-07-08\",\n                \"2020-07-09\",\n                \"2020-07-10\",\n                \"2020-07-11\",\n                \"2020-07-12\",\n                \"2020-07-13\",\n                \"2020-07-14\",\n                \"2020-07-15\",\n                \"2020-07-16\",\n                \"2020-07-17\",\n                \"2020-07-18\",\n                \"2020-07-19\",\n                \"2020-07-20\",\n                \"2020-07-21\",\n                \"2020-07-22\",\n                \"2020-07-23\",\n                \"2020-07-24\",\n                \"2020-07-25\",\n                \"2020-07-26\",\n                \"2020-07-27\",\n                \"2020-07-28\",\n                \"2020-07-29\",\n                \"2020-07-30\",\n                \"2020-07-31\",\n                \"2020-08-01\",\n                \"2020-08-02\",\n                \"2020-08-03\",\n                \"2020-08-04\",\n                \"2020-08-05\",\n                \"2020-08-06\",\n                \"2020-08-07\",\n                \"2020-08-08\",\n                \"2020-08-09\",\n                \"2020-08-10\",\n                \"2020-08-11\",\n                \"2020-08-12\",\n                \"2020-08-13\",\n                \"2020-08-14\",\n                \"2020-08-15\",\n                \"2020-08-16\",\n                \"2020-08-17\",\n                \"2020-08-18\",\n                \"2020-08-19\",\n                \"2020-08-20\",\n                \"2020-08-21\",\n                \"2020-08-22\",\n                \"2020-08-23\",\n                \"2020-08-24\",\n                \"2020-08-25\",\n                \"2020-08-26\",\n                \"2020-08-27\",\n                \"2020-08-28\",\n                \"2020-08-29\",\n                \"2020-08-30\",\n                \"2020-08-31\",\n                \"2020-09-01\",\n                \"2020-09-02\",\n                \"2020-09-03\",\n                \"2020-09-04\",\n                \"2020-09-05\",\n                \"2020-09-06\",\n                \"2020-09-07\",\n                \"2020-09-08\",\n                \"2020-09-09\",\n                \"2020-09-10\",\n                \"2020-09-11\",\n                \"2020-09-12\",\n                \"2020-09-13\",\n                \"2020-09-14\",\n                \"2020-09-15\",\n                \"2020-09-16\",\n                \"2020-09-17\",\n                \"2020-09-18\",\n                \"2020-09-19\",\n                \"2020-09-20\",\n                \"2020-09-21\",\n                \"2020-09-22\",\n                \"2020-09-23\",\n                \"2020-09-24\",\n                \"2020-09-25\",\n                \"2020-09-26\",\n                \"2020-09-27\",\n                \"2020-09-28\",\n                \"2020-09-29\",\n                \"2020-09-30\",\n                \"2020-10-01\",\n                \"2020-10-02\",\n                \"2020-10-03\",\n                \"2020-10-04\",\n                \"2020-10-05\",\n                \"2020-10-06\",\n                \"2020-10-07\",\n                \"2020-10-08\",\n                \"2020-10-09\",\n                \"2020-10-10\",\n                \"2020-10-11\",\n                \"2020-10-12\",\n                \"2020-10-13\",\n                \"2020-10-14\",\n                \"2020-10-15\",\n                \"2020-10-16\",\n                \"2020-10-17\",\n                \"2020-10-18\",\n                \"2020-10-19\",\n                \"2020-10-20\",\n                \"2020-10-21\",\n                \"2020-10-22\",\n                \"2020-10-23\",\n                \"2020-10-24\",\n                \"2020-10-25\",\n                \"2020-10-26\",\n                \"2020-10-27\",\n                \"2020-10-28\",\n                \"2020-10-29\",\n                \"2020-10-30\",\n                \"2020-10-31\",\n                \"2020-11-01\",\n                \"2020-11-02\",\n                \"2020-11-03\",\n                \"2020-11-04\",\n                \"2020-11-05\",\n                \"2020-11-06\",\n                \"2020-11-07\",\n                \"2020-11-08\",\n                \"2020-11-09\",\n                \"2020-11-10\",\n                \"2020-11-11\",\n                \"2020-11-12\",\n                \"2020-11-13\",\n                \"2020-11-14\",\n                \"2020-11-15\",\n                \"2020-11-16\",\n                \"2020-11-17\",\n                \"2020-11-18\",\n                \"2020-11-19\",\n                \"2020-11-20\",\n                \"2020-11-21\",\n                \"2020-11-22\",\n                \"2020-11-23\",\n                \"2020-11-24\",\n                \"2020-11-25\",\n                \"2020-11-26\",\n                \"2020-11-27\",\n                \"2020-11-28\",\n                \"2020-11-29\",\n                \"2020-11-30\",\n                \"2020-12-01\",\n                \"2020-12-02\",\n                \"2020-12-03\",\n                \"2020-12-04\",\n                \"2020-12-05\",\n                \"2020-12-06\",\n                \"2020-12-07\",\n                \"2020-12-08\",\n                \"2020-12-09\",\n                \"2020-12-10\",\n                \"2020-12-11\",\n                \"2020-12-12\",\n                \"2020-12-13\",\n                \"2020-12-14\",\n                \"2020-12-15\",\n                \"2020-12-16\",\n                \"2020-12-17\",\n                \"2020-12-18\",\n                \"2020-12-19\",\n                \"2020-12-20\",\n                \"2020-12-21\",\n                \"2020-12-22\",\n                \"2020-12-23\",\n                \"2020-12-24\",\n                \"2020-12-25\",\n                \"2020-12-26\",\n                \"2020-12-27\",\n                \"2020-12-28\",\n                \"2020-12-29\",\n                \"2020-12-30\",\n                \"2020-12-31\",\n                \"2021-01-01\",\n                \"2021-01-02\",\n                \"2021-01-03\",\n                \"2021-01-04\",\n                \"2021-01-05\",\n                \"2021-01-06\",\n                \"2021-01-07\",\n                \"2021-01-08\",\n                \"2021-01-09\",\n                \"2021-01-10\",\n                \"2021-01-11\",\n                \"2021-01-12\",\n                \"2021-01-13\",\n                \"2021-01-14\",\n                \"2021-01-15\",\n                \"2021-01-16\",\n                \"2021-01-17\",\n                \"2021-01-18\",\n                \"2021-01-19\",\n                \"2021-01-20\",\n                \"2021-01-21\",\n                \"2021-01-22\",\n                \"2021-01-23\",\n                \"2021-01-24\",\n                \"2021-01-25\",\n                \"2021-01-26\",\n                \"2021-01-27\",\n                \"2021-01-28\",\n                \"2021-01-29\",\n                \"2021-01-30\",\n                \"2021-01-31\",\n                \"2021-02-01\",\n                \"2021-02-02\",\n                \"2021-02-03\",\n                \"2021-02-04\",\n                \"2021-02-05\",\n                \"2021-02-06\",\n                \"2021-02-07\",\n                \"2021-02-08\",\n                \"2021-02-09\",\n                \"2021-02-10\",\n                \"2021-02-11\",\n                \"2021-02-12\",\n                \"2021-02-13\",\n                \"2021-02-14\",\n                \"2021-02-15\",\n                \"2021-02-16\",\n                \"2021-02-17\",\n                \"2021-02-18\",\n                \"2021-02-19\",\n                \"2021-02-20\",\n                \"2021-02-21\",\n                \"2021-02-22\",\n                \"2021-02-23\",\n                \"2021-02-24\",\n                \"2021-02-25\",\n                \"2021-02-26\",\n                \"2021-02-27\",\n                \"2021-02-28\",\n                \"2021-03-01\",\n                \"2021-03-02\",\n                \"2021-03-03\",\n                \"2021-03-04\",\n                \"2021-03-05\",\n                \"2021-03-06\",\n                \"2021-03-07\",\n                \"2021-03-08\",\n                \"2021-03-09\",\n                \"2021-03-10\",\n                \"2021-03-11\",\n                \"2021-03-12\",\n                \"2021-03-13\",\n                \"2021-03-14\",\n                \"2021-03-15\",\n                \"2021-03-16\",\n                \"2021-03-17\",\n                \"2021-03-18\",\n                \"2021-03-19\",\n                \"2021-03-20\",\n                \"2021-03-21\",\n                \"2021-03-22\",\n                \"2021-03-23\",\n                \"2021-03-24\",\n                \"2021-03-25\",\n                \"2021-03-26\",\n                \"2021-03-27\",\n                \"2021-03-28\",\n                \"2021-03-29\",\n                \"2021-03-30\",\n                \"2021-03-31\",\n                \"2021-04-01\",\n                \"2021-04-02\",\n                \"2021-04-03\",\n                \"2021-04-04\",\n                \"2021-04-05\",\n                \"2021-04-06\",\n                \"2021-04-07\",\n                \"2021-04-08\",\n                \"2021-04-09\",\n                \"2021-04-10\",\n                \"2021-04-11\",\n                \"2021-04-12\",\n                \"2021-04-13\",\n                \"2021-04-14\",\n                \"2021-04-15\",\n                \"2021-04-16\",\n                \"2021-04-17\",\n                \"2021-04-18\",\n                \"2021-04-19\",\n                \"2021-04-20\",\n                \"2021-04-21\",\n                \"2021-04-22\",\n                \"2021-04-23\",\n                \"2021-04-24\",\n                \"2021-04-25\",\n                \"2021-04-26\",\n                \"2021-04-27\",\n                \"2021-04-28\",\n                \"2021-04-29\",\n                \"2021-04-30\",\n                \"2021-05-01\",\n                \"2021-05-02\",\n                \"2021-05-03\",\n                \"2021-05-04\",\n                \"2021-05-05\",\n                \"2021-05-06\",\n                \"2021-05-07\",\n                \"2021-05-08\",\n                \"2021-05-09\",\n                \"2021-05-10\",\n                \"2021-05-11\",\n                \"2021-05-12\",\n                \"2021-05-13\",\n                \"2021-05-14\",\n                \"2021-05-15\",\n                \"2021-05-16\",\n                \"2021-05-17\",\n                \"2021-05-18\",\n                \"2021-05-19\",\n                \"2021-05-20\",\n                \"2021-05-21\",\n                \"2021-05-22\",\n                \"2021-05-23\",\n                \"2021-05-24\",\n                \"2021-05-25\",\n                \"2021-05-26\",\n                \"2021-05-27\",\n                \"2021-05-28\",\n                \"2021-05-29\",\n                \"2021-05-30\",\n                \"2021-05-31\",\n                \"2021-06-01\",\n                \"2021-06-02\",\n                \"2021-06-03\",\n                \"2021-06-04\",\n                \"2021-06-05\",\n                \"2021-06-06\",\n                \"2021-06-07\",\n                \"2021-06-08\",\n                \"2021-06-09\",\n                \"2021-06-10\",\n                \"2021-06-11\",\n                \"2021-06-12\",\n                \"2021-06-13\",\n                \"2021-06-14\",\n                \"2021-06-15\",\n                \"2021-06-16\",\n                \"2021-06-17\",\n                \"2021-06-18\",\n                \"2021-06-19\",\n                \"2021-06-20\",\n                \"2021-06-21\",\n                \"2021-06-22\",\n                \"2021-06-23\",\n                \"2021-06-24\",\n                \"2021-06-25\",\n                \"2021-06-26\",\n                \"2021-06-27\",\n                \"2021-06-28\",\n                \"2021-06-29\",\n                \"2021-06-30\",\n                \"2021-07-01\",\n                \"2021-07-02\",\n                \"2021-07-03\",\n                \"2021-07-04\",\n                \"2021-07-05\",\n                \"2021-07-06\",\n                \"2021-07-07\",\n                \"2021-07-08\",\n                \"2021-07-09\",\n                \"2021-07-10\",\n                \"2021-07-11\",\n                \"2021-07-12\",\n                \"2021-07-13\",\n                \"2021-07-14\",\n                \"2021-07-15\",\n                \"2021-07-16\",\n                \"2021-07-17\",\n                \"2021-07-18\",\n                \"2021-07-19\",\n                \"2021-07-20\",\n                \"2021-07-21\",\n                \"2021-07-22\",\n                \"2021-07-23\",\n                \"2021-07-24\",\n                \"2021-07-25\",\n                \"2021-07-26\",\n                \"2021-07-27\",\n                \"2021-07-28\",\n                \"2021-07-29\",\n                \"2021-07-30\",\n                \"2021-07-31\",\n                \"2021-08-01\",\n                \"2021-08-02\",\n                \"2021-08-03\",\n                \"2021-08-04\",\n                \"2021-08-05\",\n                \"2021-08-06\",\n                \"2021-08-07\",\n                \"2021-08-08\",\n                \"2021-08-09\",\n                \"2021-08-10\",\n                \"2021-08-11\",\n                \"2021-08-12\",\n                \"2021-08-13\",\n                \"2021-08-14\",\n                \"2021-08-15\",\n                \"2021-08-16\",\n                \"2021-08-17\",\n                \"2021-08-18\",\n                \"2021-08-19\",\n                \"2021-08-20\",\n                \"2021-08-21\",\n                \"2021-08-22\",\n                \"2021-08-23\",\n                \"2021-08-24\",\n                \"2021-08-25\",\n                \"2021-08-26\",\n                \"2021-08-27\",\n                \"2021-08-28\",\n                \"2021-08-29\",\n                \"2021-08-30\",\n                \"2021-08-31\",\n                \"2021-09-01\",\n                \"2021-09-02\",\n                \"2021-09-03\",\n                \"2021-09-04\",\n                \"2021-09-05\",\n                \"2021-09-06\",\n                \"2021-09-07\",\n                \"2021-09-08\",\n                \"2021-09-09\",\n                \"2021-09-10\",\n                \"2021-09-11\",\n                \"2021-09-12\",\n                \"2021-09-13\",\n                \"2021-09-14\",\n                \"2021-09-15\",\n                \"2021-09-16\",\n                \"2021-09-17\",\n                \"2021-09-18\",\n                \"2021-09-19\",\n                \"2021-09-20\",\n                \"2021-09-21\",\n                \"2021-09-22\",\n                \"2021-09-23\",\n                \"2021-09-24\",\n                \"2021-09-25\",\n                \"2021-09-26\",\n                \"2021-09-27\",\n                \"2021-09-28\",\n                \"2021-09-29\",\n                \"2021-09-30\",\n                \"2021-10-01\",\n                \"2021-10-02\",\n                \"2021-10-03\",\n                \"2021-10-04\",\n                \"2021-10-05\",\n                \"2021-10-06\",\n                \"2021-10-07\",\n                \"2021-10-08\",\n                \"2021-10-09\",\n                \"2021-10-10\",\n                \"2021-10-11\",\n                \"2021-10-12\",\n                \"2021-10-13\",\n                \"2021-10-14\",\n                \"2021-10-15\",\n                \"2021-10-16\",\n                \"2021-10-17\",\n                \"2021-10-18\",\n                \"2021-10-19\",\n                \"2021-10-20\",\n                \"2021-10-21\",\n                \"2021-10-22\",\n                \"2021-10-23\",\n                \"2021-10-24\",\n                \"2021-10-25\",\n                \"2021-10-26\",\n                \"2021-10-27\",\n                \"2021-10-28\",\n                \"2021-10-29\",\n                \"2021-10-30\",\n                \"2021-10-31\",\n                \"2021-11-01\",\n                \"2021-11-02\",\n                \"2021-11-03\",\n                \"2021-11-04\",\n                \"2021-11-05\",\n                \"2021-11-06\",\n                \"2021-11-07\",\n                \"2021-11-08\",\n                \"2021-11-09\",\n                \"2021-11-10\",\n                \"2021-11-11\",\n                \"2021-11-12\",\n                \"2021-11-13\",\n                \"2021-11-14\",\n                \"2021-11-15\",\n                \"2021-11-16\",\n                \"2021-11-17\",\n                \"2021-11-18\",\n                \"2021-11-19\",\n                \"2021-11-20\",\n                \"2021-11-21\",\n                \"2021-11-22\",\n                \"2021-11-23\",\n                \"2021-11-24\",\n                \"2021-11-25\",\n                \"2021-11-26\",\n                \"2021-11-27\",\n                \"2021-11-28\",\n                \"2021-11-29\",\n                \"2021-11-30\",\n                \"2021-12-01\",\n                \"2021-12-02\",\n                \"2021-12-03\",\n                \"2021-12-04\",\n                \"2021-12-05\",\n                \"2021-12-06\",\n                \"2021-12-07\",\n                \"2021-12-08\",\n                \"2021-12-09\",\n                \"2021-12-10\",\n                \"2021-12-11\",\n                \"2021-12-12\",\n                \"2021-12-13\",\n                \"2021-12-14\",\n                \"2021-12-15\",\n                \"2021-12-16\",\n                \"2021-12-17\",\n                \"2021-12-18\",\n                \"2021-12-19\",\n                \"2021-12-20\"\n              ],\n              \"xaxis\": \"x\",\n              \"y\": [\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                6.0,\n                6.0,\n                6.0,\n                6.0,\n                6.0,\n                6.0,\n                6.0,\n                6.0,\n                6.0,\n                6.0,\n                7.0,\n                7.0,\n                7.0,\n                7.0,\n                7.0,\n                7.0,\n                7.0,\n                8.0,\n                8.0,\n                8.0,\n                8.0,\n                8.0,\n                8.0,\n                9.0,\n                9.0,\n                9.0,\n                9.0,\n                9.0,\n                9.0,\n                10.0,\n                10.0,\n                10.0,\n                11.0,\n                11.0,\n                11.0,\n                11.0,\n                12.0,\n                12.0,\n                12.0,\n                12.0,\n                12.0,\n                13.0,\n                13.0,\n                13.0,\n                13.0,\n                14.0,\n                14.0,\n                14.0,\n                14.0,\n                15.0,\n                15.0,\n                15.0,\n                15.0,\n                16.0,\n                16.0,\n                16.0,\n                16.0,\n                17.0,\n                17.0,\n                17.0,\n                18.0,\n                18.0,\n                18.0,\n                19.0,\n                19.0,\n                19.0,\n                20.0,\n                20.0,\n                20.0,\n                21.0,\n                21.0,\n                21.0,\n                22.0,\n                22.0,\n                22.0,\n                22.0,\n                23.0,\n                23.0,\n                23.0,\n                24.0,\n                24.0,\n                24.0,\n                25.0,\n                25.0,\n                25.0,\n                26.0,\n                26.0,\n                26.0,\n                27.0,\n                27.0,\n                27.0,\n                28.0,\n                28.0,\n                28.0,\n                29.0,\n                29.0,\n                29.0,\n                30.0,\n                30.0,\n                30.0,\n                31.0,\n                31.0,\n                31.0,\n                32.0,\n                32.0,\n                32.0,\n                33.0,\n                33.0,\n                33.0,\n                34.0,\n                34.0,\n                34.0,\n                35.0,\n                35.0,\n                36.0,\n                36.0,\n                36.0,\n                37.0,\n                37.0,\n                37.0,\n                38.0,\n                38.0,\n                39.0,\n                39.0,\n                39.0,\n                40.0,\n                40.0,\n                41.0,\n                41.0,\n                41.0,\n                42.0,\n                42.0,\n                43.0,\n                43.0,\n                43.0,\n                44.0,\n                44.0,\n                45.0,\n                45.0,\n                45.0,\n                46.0,\n                46.0,\n                47.0,\n                47.0,\n                47.0,\n                48.0,\n                48.0,\n                49.0,\n                49.0,\n                49.0,\n                50.0,\n                50.0,\n                50.0,\n                51.0,\n                51.0,\n                52.0,\n                52.0,\n                52.0,\n                53.0,\n                53.0,\n                53.0,\n                54.0,\n                54.0,\n                54.0,\n                55.0,\n                55.0,\n                55.0,\n                56.0,\n                56.0,\n                57.0,\n                57.0,\n                57.0,\n                58.0,\n                58.0,\n                59.0,\n                59.0,\n                59.0,\n                60.0,\n                60.0,\n                60.0,\n                61.0,\n                61.0,\n                62.0,\n                62.0,\n                63.0,\n                63.0,\n                63.0,\n                64.0,\n                64.0,\n                65.0,\n                65.0,\n                66.0,\n                66.0,\n                66.0,\n                67.0,\n                67.0,\n                68.0,\n                68.0,\n                69.0,\n                69.0,\n                70.0,\n                70.0,\n                71.0,\n                71.0,\n                72.0,\n                72.0,\n                72.0,\n                73.0,\n                73.0,\n                74.0,\n                74.0,\n                75.0,\n                75.0,\n                75.0,\n                76.0,\n                76.0,\n                77.0,\n                77.0,\n                77.0,\n                78.0,\n                78.0,\n                79.0,\n                79.0,\n                80.0,\n                80.0,\n                80.0,\n                81.0,\n                81.0,\n                81.0,\n                82.0,\n                82.0,\n                83.0,\n                83.0,\n                83.0,\n                84.0,\n                84.0,\n                84.0,\n                85.0,\n                85.0,\n                85.0,\n                86.0,\n                86.0,\n                86.0,\n                87.0,\n                87.0,\n                87.0,\n                88.0,\n                88.0,\n                88.0,\n                89.0,\n                89.0,\n                89.0,\n                90.0,\n                90.0,\n                90.0,\n                91.0,\n                91.0,\n                92.0,\n                92.0,\n                92.0,\n                93.0,\n                93.0,\n                93.0,\n                94.0,\n                94.0,\n                94.0,\n                95.0,\n                95.0,\n                95.0,\n                95.0,\n                96.0,\n                96.0,\n                96.0,\n                97.0,\n                97.0,\n                97.0,\n                97.0,\n                98.0,\n                98.0,\n                98.0,\n                98.0,\n                99.0,\n                99.0,\n                99.0,\n                99.0,\n                100.0,\n                100.0,\n                100.0,\n                101.0,\n                101.0,\n                101.0,\n                101.0,\n                102.0,\n                102.0,\n                102.0,\n                102.0,\n                103.0,\n                103.0,\n                103.0,\n                103.0,\n                104.0,\n                104.0,\n                104.0,\n                104.0,\n                105.0,\n                105.0,\n                105.0,\n                106.0,\n                106.0,\n                106.0,\n                107.0,\n                107.0,\n                107.0,\n                108.0,\n                108.0,\n                108.0,\n                109.0,\n                109.0,\n                109.0,\n                110.0,\n                110.0,\n                110.0,\n                111.0,\n                111.0,\n                112.0,\n                112.0,\n                113.0,\n                113.0,\n                114.0,\n                114.0,\n                115.0,\n                115.0,\n                116.0,\n                116.0,\n                117.0,\n                118.0,\n                118.0,\n                119.0,\n                120.0,\n                120.0,\n                121.0,\n                122.0,\n                123.0,\n                124.0,\n                125.0,\n                126.0,\n                127.0,\n                128.0,\n                129.0,\n                131.0,\n                132.0,\n                133.0,\n                134.0,\n                135.0,\n                136.0,\n                138.0,\n                139.0,\n                140.0,\n                141.0,\n                143.0,\n                144.0,\n                145.0,\n                146.0,\n                148.0,\n                149.0,\n                150.0,\n                151.0,\n                152.0,\n                154.0,\n                155.0,\n                156.0,\n                158.0,\n                159.0,\n                160.0,\n                161.0,\n                162.0,\n                163.0,\n                165.0,\n                166.0,\n                167.0,\n                168.0,\n                169.0,\n                170.0,\n                171.0,\n                172.0,\n                173.0,\n                173.0,\n                174.0,\n                175.0,\n                176.0,\n                177.0,\n                179.0,\n                180.0,\n                181.0,\n                182.0,\n                183.0,\n                184.0,\n                184.0,\n                185.0,\n                186.0,\n                186.0,\n                187.0,\n                188.0,\n                188.0,\n                189.0,\n                190.0,\n                190.0,\n                191.0,\n                192.0,\n                192.0,\n                193.0,\n                193.0,\n                194.0,\n                195.0,\n                195.0,\n                196.0,\n                197.0,\n                197.0,\n                198.0,\n                199.0,\n                200.0,\n                200.0,\n                201.0,\n                202.0,\n                203.0,\n                204.0,\n                204.0,\n                205.0,\n                206.0,\n                207.0,\n                208.0,\n                209.0,\n                210.0,\n                211.0,\n                212.0,\n                213.0,\n                214.0,\n                215.0,\n                216.0,\n                217.0,\n                218.0,\n                219.0,\n                220.0,\n                221.0,\n                222.0,\n                223.0,\n                224.0,\n                226.0,\n                227.0,\n                228.0,\n                229.0,\n                230.0,\n                231.0,\n                232.0,\n                234.0,\n                235.0,\n                236.0,\n                237.0,\n                238.0,\n                239.0,\n                240.0,\n                241.0,\n                243.0,\n                244.0,\n                245.0,\n                246.0,\n                247.0,\n                248.0,\n                249.0,\n                250.0,\n                251.0,\n                252.0,\n                253.0,\n                254.0,\n                255.0,\n                256.0,\n                257.0,\n                258.0,\n                259.0,\n                260.0,\n                261.0,\n                262.0,\n                263.0,\n                264.0,\n                264.0,\n                265.0,\n                266.0,\n                267.0,\n                268.0,\n                268.0,\n                269.0,\n                270.0,\n                271.0,\n                271.0,\n                272.0,\n                273.0,\n                273.0,\n                274.0,\n                275.0,\n                275.0,\n                276.0,\n                276.0,\n                277.0,\n                278.0,\n                278.0,\n                279.0,\n                279.0,\n                280.0,\n                280.0,\n                281.0,\n                281.0,\n                282.0,\n                283.0,\n                283.0,\n                284.0,\n                284.0,\n                285.0,\n                285.0,\n                286.0,\n                286.0,\n                287.0,\n                287.0,\n                288.0,\n                288.0,\n                289.0,\n                289.0,\n                290.0,\n                290.0,\n                291.0,\n                291.0,\n                292.0,\n                293.0,\n                293.0,\n                294.0,\n                294.0,\n                295.0,\n                295.0,\n                296.0,\n                297.0,\n                297.0,\n                298.0,\n                298.0,\n                299.0,\n                299.0,\n                300.0,\n                300.0,\n                301.0,\n                301.0,\n                302.0,\n                302.0,\n                303.0,\n                304.0,\n                304.0,\n                305.0,\n                305.0,\n                306.0,\n                306.0,\n                307.0,\n                307.0,\n                308.0,\n                309.0,\n                309.0,\n                310.0,\n                310.0,\n                311.0,\n                311.0,\n                312.0,\n                312.0,\n                313.0,\n                314.0,\n                314.0,\n                315.0,\n                315.0,\n                316.0,\n                316.0,\n                317.0,\n                317.0,\n                318.0,\n                318.0,\n                319.0,\n                319.0,\n                320.0,\n                320.0,\n                321.0,\n                321.0\n              ],\n              \"yaxis\": \"y\",\n              \"type\": \"scattergl\"\n            },\n            {\n              \"hovertemplate\": \"Continent=Africa<br>Date=%{x}<br>Total Deaths per Million=%{y}<extra></extra>\",\n              \"legendgroup\": \"Africa\",\n              \"line\": {\n                \"color\": \"#FFA15A\",\n                \"dash\": \"solid\"\n              },\n              \"marker\": {\n                \"symbol\": \"circle\"\n              },\n              \"mode\": \"lines\",\n              \"name\": \"Africa\",\n              \"showlegend\": true,\n              \"x\": [\n                \"2020-02-23\",\n                \"2020-02-24\",\n                \"2020-02-25\",\n                \"2020-02-26\",\n                \"2020-02-27\",\n                \"2020-02-28\",\n                \"2020-02-29\",\n                \"2020-03-01\",\n                \"2020-03-02\",\n                \"2020-03-03\",\n                \"2020-03-04\",\n                \"2020-03-05\",\n                \"2020-03-06\",\n                \"2020-03-07\",\n                \"2020-03-08\",\n                \"2020-03-09\",\n                \"2020-03-10\",\n                \"2020-03-11\",\n                \"2020-03-12\",\n                \"2020-03-13\",\n                \"2020-03-14\",\n                \"2020-03-15\",\n                \"2020-03-16\",\n                \"2020-03-17\",\n                \"2020-03-18\",\n                \"2020-03-19\",\n                \"2020-03-20\",\n                \"2020-03-21\",\n                \"2020-03-22\",\n                \"2020-03-23\",\n                \"2020-03-24\",\n                \"2020-03-25\",\n                \"2020-03-26\",\n                \"2020-03-27\",\n                \"2020-03-28\",\n                \"2020-03-29\",\n                \"2020-03-30\",\n                \"2020-03-31\",\n                \"2020-04-01\",\n                \"2020-04-02\",\n                \"2020-04-03\",\n                \"2020-04-04\",\n                \"2020-04-05\",\n                \"2020-04-06\",\n                \"2020-04-07\",\n                \"2020-04-08\",\n                \"2020-04-09\",\n                \"2020-04-10\",\n                \"2020-04-11\",\n                \"2020-04-12\",\n                \"2020-04-13\",\n                \"2020-04-14\",\n                \"2020-04-15\",\n                \"2020-04-16\",\n                \"2020-04-17\",\n                \"2020-04-18\",\n                \"2020-04-19\",\n                \"2020-04-20\",\n                \"2020-04-21\",\n                \"2020-04-22\",\n                \"2020-04-23\",\n                \"2020-04-24\",\n                \"2020-04-25\",\n                \"2020-04-26\",\n                \"2020-04-27\",\n                \"2020-04-28\",\n                \"2020-04-29\",\n                \"2020-04-30\",\n                \"2020-05-01\",\n                \"2020-05-02\",\n                \"2020-05-03\",\n                \"2020-05-04\",\n                \"2020-05-05\",\n                \"2020-05-06\",\n                \"2020-05-07\",\n                \"2020-05-08\",\n                \"2020-05-09\",\n                \"2020-05-10\",\n                \"2020-05-11\",\n                \"2020-05-12\",\n                \"2020-05-13\",\n                \"2020-05-14\",\n                \"2020-05-15\",\n                \"2020-05-16\",\n                \"2020-05-17\",\n                \"2020-05-18\",\n                \"2020-05-19\",\n                \"2020-05-20\",\n                \"2020-05-21\",\n                \"2020-05-22\",\n                \"2020-05-23\",\n                \"2020-05-24\",\n                \"2020-05-25\",\n                \"2020-05-26\",\n                \"2020-05-27\",\n                \"2020-05-28\",\n                \"2020-05-29\",\n                \"2020-05-30\",\n                \"2020-05-31\",\n                \"2020-06-01\",\n                \"2020-06-02\",\n                \"2020-06-03\",\n                \"2020-06-04\",\n                \"2020-06-05\",\n                \"2020-06-06\",\n                \"2020-06-07\",\n                \"2020-06-08\",\n                \"2020-06-09\",\n                \"2020-06-10\",\n                \"2020-06-11\",\n                \"2020-06-12\",\n                \"2020-06-13\",\n                \"2020-06-14\",\n                \"2020-06-15\",\n                \"2020-06-16\",\n                \"2020-06-17\",\n                \"2020-06-18\",\n                \"2020-06-19\",\n                \"2020-06-20\",\n                \"2020-06-21\",\n                \"2020-06-22\",\n                \"2020-06-23\",\n                \"2020-06-24\",\n                \"2020-06-25\",\n                \"2020-06-26\",\n                \"2020-06-27\",\n                \"2020-06-28\",\n                \"2020-06-29\",\n                \"2020-06-30\",\n                \"2020-07-01\",\n                \"2020-07-02\",\n                \"2020-07-03\",\n                \"2020-07-04\",\n                \"2020-07-05\",\n                \"2020-07-06\",\n                \"2020-07-07\",\n                \"2020-07-08\",\n                \"2020-07-09\",\n                \"2020-07-10\",\n                \"2020-07-11\",\n                \"2020-07-12\",\n                \"2020-07-13\",\n                \"2020-07-14\",\n                \"2020-07-15\",\n                \"2020-07-16\",\n                \"2020-07-17\",\n                \"2020-07-18\",\n                \"2020-07-19\",\n                \"2020-07-20\",\n                \"2020-07-21\",\n                \"2020-07-22\",\n                \"2020-07-23\",\n                \"2020-07-24\",\n                \"2020-07-25\",\n                \"2020-07-26\",\n                \"2020-07-27\",\n                \"2020-07-28\",\n                \"2020-07-29\",\n                \"2020-07-30\",\n                \"2020-07-31\",\n                \"2020-08-01\",\n                \"2020-08-02\",\n                \"2020-08-03\",\n                \"2020-08-04\",\n                \"2020-08-05\",\n                \"2020-08-06\",\n                \"2020-08-07\",\n                \"2020-08-08\",\n                \"2020-08-09\",\n                \"2020-08-10\",\n                \"2020-08-11\",\n                \"2020-08-12\",\n                \"2020-08-13\",\n                \"2020-08-14\",\n                \"2020-08-15\",\n                \"2020-08-16\",\n                \"2020-08-17\",\n                \"2020-08-18\",\n                \"2020-08-19\",\n                \"2020-08-20\",\n                \"2020-08-21\",\n                \"2020-08-22\",\n                \"2020-08-23\",\n                \"2020-08-24\",\n                \"2020-08-25\",\n                \"2020-08-26\",\n                \"2020-08-27\",\n                \"2020-08-28\",\n                \"2020-08-29\",\n                \"2020-08-30\",\n                \"2020-08-31\",\n                \"2020-09-01\",\n                \"2020-09-02\",\n                \"2020-09-03\",\n                \"2020-09-04\",\n                \"2020-09-05\",\n                \"2020-09-06\",\n                \"2020-09-07\",\n                \"2020-09-08\",\n                \"2020-09-09\",\n                \"2020-09-10\",\n                \"2020-09-11\",\n                \"2020-09-12\",\n                \"2020-09-13\",\n                \"2020-09-14\",\n                \"2020-09-15\",\n                \"2020-09-16\",\n                \"2020-09-17\",\n                \"2020-09-18\",\n                \"2020-09-19\",\n                \"2020-09-20\",\n                \"2020-09-21\",\n                \"2020-09-22\",\n                \"2020-09-23\",\n                \"2020-09-24\",\n                \"2020-09-25\",\n                \"2020-09-26\",\n                \"2020-09-27\",\n                \"2020-09-28\",\n                \"2020-09-29\",\n                \"2020-09-30\",\n                \"2020-10-01\",\n                \"2020-10-02\",\n                \"2020-10-03\",\n                \"2020-10-04\",\n                \"2020-10-05\",\n                \"2020-10-06\",\n                \"2020-10-07\",\n                \"2020-10-08\",\n                \"2020-10-09\",\n                \"2020-10-10\",\n                \"2020-10-11\",\n                \"2020-10-12\",\n                \"2020-10-13\",\n                \"2020-10-14\",\n                \"2020-10-15\",\n                \"2020-10-16\",\n                \"2020-10-17\",\n                \"2020-10-18\",\n                \"2020-10-19\",\n                \"2020-10-20\",\n                \"2020-10-21\",\n                \"2020-10-22\",\n                \"2020-10-23\",\n                \"2020-10-24\",\n                \"2020-10-25\",\n                \"2020-10-26\",\n                \"2020-10-27\",\n                \"2020-10-28\",\n                \"2020-10-29\",\n                \"2020-10-30\",\n                \"2020-10-31\",\n                \"2020-11-01\",\n                \"2020-11-02\",\n                \"2020-11-03\",\n                \"2020-11-04\",\n                \"2020-11-05\",\n                \"2020-11-06\",\n                \"2020-11-07\",\n                \"2020-11-08\",\n                \"2020-11-09\",\n                \"2020-11-10\",\n                \"2020-11-11\",\n                \"2020-11-12\",\n                \"2020-11-13\",\n                \"2020-11-14\",\n                \"2020-11-15\",\n                \"2020-11-16\",\n                \"2020-11-17\",\n                \"2020-11-18\",\n                \"2020-11-19\",\n                \"2020-11-20\",\n                \"2020-11-21\",\n                \"2020-11-22\",\n                \"2020-11-23\",\n                \"2020-11-24\",\n                \"2020-11-25\",\n                \"2020-11-26\",\n                \"2020-11-27\",\n                \"2020-11-28\",\n                \"2020-11-29\",\n                \"2020-11-30\",\n                \"2020-12-01\",\n                \"2020-12-02\",\n                \"2020-12-03\",\n                \"2020-12-04\",\n                \"2020-12-05\",\n                \"2020-12-06\",\n                \"2020-12-07\",\n                \"2020-12-08\",\n                \"2020-12-09\",\n                \"2020-12-10\",\n                \"2020-12-11\",\n                \"2020-12-12\",\n                \"2020-12-13\",\n                \"2020-12-14\",\n                \"2020-12-15\",\n                \"2020-12-16\",\n                \"2020-12-17\",\n                \"2020-12-18\",\n                \"2020-12-19\",\n                \"2020-12-20\",\n                \"2020-12-21\",\n                \"2020-12-22\",\n                \"2020-12-23\",\n                \"2020-12-24\",\n                \"2020-12-25\",\n                \"2020-12-26\",\n                \"2020-12-27\",\n                \"2020-12-28\",\n                \"2020-12-29\",\n                \"2020-12-30\",\n                \"2020-12-31\",\n                \"2021-01-01\",\n                \"2021-01-02\",\n                \"2021-01-03\",\n                \"2021-01-04\",\n                \"2021-01-05\",\n                \"2021-01-06\",\n                \"2021-01-07\",\n                \"2021-01-08\",\n                \"2021-01-09\",\n                \"2021-01-10\",\n                \"2021-01-11\",\n                \"2021-01-12\",\n                \"2021-01-13\",\n                \"2021-01-14\",\n                \"2021-01-15\",\n                \"2021-01-16\",\n                \"2021-01-17\",\n                \"2021-01-18\",\n                \"2021-01-19\",\n                \"2021-01-20\",\n                \"2021-01-21\",\n                \"2021-01-22\",\n                \"2021-01-23\",\n                \"2021-01-24\",\n                \"2021-01-25\",\n                \"2021-01-26\",\n                \"2021-01-27\",\n                \"2021-01-28\",\n                \"2021-01-29\",\n                \"2021-01-30\",\n                \"2021-01-31\",\n                \"2021-02-01\",\n                \"2021-02-02\",\n                \"2021-02-03\",\n                \"2021-02-04\",\n                \"2021-02-05\",\n                \"2021-02-06\",\n                \"2021-02-07\",\n                \"2021-02-08\",\n                \"2021-02-09\",\n                \"2021-02-10\",\n                \"2021-02-11\",\n                \"2021-02-12\",\n                \"2021-02-13\",\n                \"2021-02-14\",\n                \"2021-02-15\",\n                \"2021-02-16\",\n                \"2021-02-17\",\n                \"2021-02-18\",\n                \"2021-02-19\",\n                \"2021-02-20\",\n                \"2021-02-21\",\n                \"2021-02-22\",\n                \"2021-02-23\",\n                \"2021-02-24\",\n                \"2021-02-25\",\n                \"2021-02-26\",\n                \"2021-02-27\",\n                \"2021-02-28\",\n                \"2021-03-01\",\n                \"2021-03-02\",\n                \"2021-03-03\",\n                \"2021-03-04\",\n                \"2021-03-05\",\n                \"2021-03-06\",\n                \"2021-03-07\",\n                \"2021-03-08\",\n                \"2021-03-09\",\n                \"2021-03-10\",\n                \"2021-03-11\",\n                \"2021-03-12\",\n                \"2021-03-13\",\n                \"2021-03-14\",\n                \"2021-03-15\",\n                \"2021-03-16\",\n                \"2021-03-17\",\n                \"2021-03-18\",\n                \"2021-03-19\",\n                \"2021-03-20\",\n                \"2021-03-21\",\n                \"2021-03-22\",\n                \"2021-03-23\",\n                \"2021-03-24\",\n                \"2021-03-25\",\n                \"2021-03-26\",\n                \"2021-03-27\",\n                \"2021-03-28\",\n                \"2021-03-29\",\n                \"2021-03-30\",\n                \"2021-03-31\",\n                \"2021-04-01\",\n                \"2021-04-02\",\n                \"2021-04-03\",\n                \"2021-04-04\",\n                \"2021-04-05\",\n                \"2021-04-06\",\n                \"2021-04-07\",\n                \"2021-04-08\",\n                \"2021-04-09\",\n                \"2021-04-10\",\n                \"2021-04-11\",\n                \"2021-04-12\",\n                \"2021-04-13\",\n                \"2021-04-14\",\n                \"2021-04-15\",\n                \"2021-04-16\",\n                \"2021-04-17\",\n                \"2021-04-18\",\n                \"2021-04-19\",\n                \"2021-04-20\",\n                \"2021-04-21\",\n                \"2021-04-22\",\n                \"2021-04-23\",\n                \"2021-04-24\",\n                \"2021-04-25\",\n                \"2021-04-26\",\n                \"2021-04-27\",\n                \"2021-04-28\",\n                \"2021-04-29\",\n                \"2021-04-30\",\n                \"2021-05-01\",\n                \"2021-05-02\",\n                \"2021-05-03\",\n                \"2021-05-04\",\n                \"2021-05-05\",\n                \"2021-05-06\",\n                \"2021-05-07\",\n                \"2021-05-08\",\n                \"2021-05-09\",\n                \"2021-05-10\",\n                \"2021-05-11\",\n                \"2021-05-12\",\n                \"2021-05-13\",\n                \"2021-05-14\",\n                \"2021-05-15\",\n                \"2021-05-16\",\n                \"2021-05-17\",\n                \"2021-05-18\",\n                \"2021-05-19\",\n                \"2021-05-20\",\n                \"2021-05-21\",\n                \"2021-05-22\",\n                \"2021-05-23\",\n                \"2021-05-24\",\n                \"2021-05-25\",\n                \"2021-05-26\",\n                \"2021-05-27\",\n                \"2021-05-28\",\n                \"2021-05-29\",\n                \"2021-05-30\",\n                \"2021-05-31\",\n                \"2021-06-01\",\n                \"2021-06-02\",\n                \"2021-06-03\",\n                \"2021-06-04\",\n                \"2021-06-05\",\n                \"2021-06-06\",\n                \"2021-06-07\",\n                \"2021-06-08\",\n                \"2021-06-09\",\n                \"2021-06-10\",\n                \"2021-06-11\",\n                \"2021-06-12\",\n                \"2021-06-13\",\n                \"2021-06-14\",\n                \"2021-06-15\",\n                \"2021-06-16\",\n                \"2021-06-17\",\n                \"2021-06-18\",\n                \"2021-06-19\",\n                \"2021-06-20\",\n                \"2021-06-21\",\n                \"2021-06-22\",\n                \"2021-06-23\",\n                \"2021-06-24\",\n                \"2021-06-25\",\n                \"2021-06-26\",\n                \"2021-06-27\",\n                \"2021-06-28\",\n                \"2021-06-29\",\n                \"2021-06-30\",\n                \"2021-07-01\",\n                \"2021-07-02\",\n                \"2021-07-03\",\n                \"2021-07-04\",\n                \"2021-07-05\",\n                \"2021-07-06\",\n                \"2021-07-07\",\n                \"2021-07-08\",\n                \"2021-07-09\",\n                \"2021-07-10\",\n                \"2021-07-11\",\n                \"2021-07-12\",\n                \"2021-07-13\",\n                \"2021-07-14\",\n                \"2021-07-15\",\n                \"2021-07-16\",\n                \"2021-07-17\",\n                \"2021-07-18\",\n                \"2021-07-19\",\n                \"2021-07-20\",\n                \"2021-07-21\",\n                \"2021-07-22\",\n                \"2021-07-23\",\n                \"2021-07-24\",\n                \"2021-07-25\",\n                \"2021-07-26\",\n                \"2021-07-27\",\n                \"2021-07-28\",\n                \"2021-07-29\",\n                \"2021-07-30\",\n                \"2021-07-31\",\n                \"2021-08-01\",\n                \"2021-08-02\",\n                \"2021-08-03\",\n                \"2021-08-04\",\n                \"2021-08-05\",\n                \"2021-08-06\",\n                \"2021-08-07\",\n                \"2021-08-08\",\n                \"2021-08-09\",\n                \"2021-08-10\",\n                \"2021-08-11\",\n                \"2021-08-12\",\n                \"2021-08-13\",\n                \"2021-08-14\",\n                \"2021-08-15\",\n                \"2021-08-16\",\n                \"2021-08-17\",\n                \"2021-08-18\",\n                \"2021-08-19\",\n                \"2021-08-20\",\n                \"2021-08-21\",\n                \"2021-08-22\",\n                \"2021-08-23\",\n                \"2021-08-24\",\n                \"2021-08-25\",\n                \"2021-08-26\",\n                \"2021-08-27\",\n                \"2021-08-28\",\n                \"2021-08-29\",\n                \"2021-08-30\",\n                \"2021-08-31\",\n                \"2021-09-01\",\n                \"2021-09-02\",\n                \"2021-09-03\",\n                \"2021-09-04\",\n                \"2021-09-05\",\n                \"2021-09-06\",\n                \"2021-09-07\",\n                \"2021-09-08\",\n                \"2021-09-09\",\n                \"2021-09-10\",\n                \"2021-09-11\",\n                \"2021-09-12\",\n                \"2021-09-13\",\n                \"2021-09-14\",\n                \"2021-09-15\",\n                \"2021-09-16\",\n                \"2021-09-17\",\n                \"2021-09-18\",\n                \"2021-09-19\",\n                \"2021-09-20\",\n                \"2021-09-21\",\n                \"2021-09-22\",\n                \"2021-09-23\",\n                \"2021-09-24\",\n                \"2021-09-25\",\n                \"2021-09-26\",\n                \"2021-09-27\",\n                \"2021-09-28\",\n                \"2021-09-29\",\n                \"2021-09-30\",\n                \"2021-10-01\",\n                \"2021-10-02\",\n                \"2021-10-03\",\n                \"2021-10-04\",\n                \"2021-10-05\",\n                \"2021-10-06\",\n                \"2021-10-07\",\n                \"2021-10-08\",\n                \"2021-10-09\",\n                \"2021-10-10\",\n                \"2021-10-11\",\n                \"2021-10-12\",\n                \"2021-10-13\",\n                \"2021-10-14\",\n                \"2021-10-15\",\n                \"2021-10-16\",\n                \"2021-10-17\",\n                \"2021-10-18\",\n                \"2021-10-19\",\n                \"2021-10-20\",\n                \"2021-10-21\",\n                \"2021-10-22\",\n                \"2021-10-23\",\n                \"2021-10-24\",\n                \"2021-10-25\",\n                \"2021-10-26\",\n                \"2021-10-27\",\n                \"2021-10-28\",\n                \"2021-10-29\",\n                \"2021-10-30\",\n                \"2021-10-31\",\n                \"2021-11-01\",\n                \"2021-11-02\",\n                \"2021-11-03\",\n                \"2021-11-04\",\n                \"2021-11-05\",\n                \"2021-11-06\",\n                \"2021-11-07\",\n                \"2021-11-08\",\n                \"2021-11-09\",\n                \"2021-11-10\",\n                \"2021-11-11\",\n                \"2021-11-12\",\n                \"2021-11-13\",\n                \"2021-11-14\",\n                \"2021-11-15\",\n                \"2021-11-16\",\n                \"2021-11-17\",\n                \"2021-11-18\",\n                \"2021-11-19\",\n                \"2021-11-20\",\n                \"2021-11-21\",\n                \"2021-11-22\",\n                \"2021-11-23\",\n                \"2021-11-24\",\n                \"2021-11-25\",\n                \"2021-11-26\",\n                \"2021-11-27\",\n                \"2021-11-28\",\n                \"2021-11-29\",\n                \"2021-11-30\",\n                \"2021-12-01\",\n                \"2021-12-02\",\n                \"2021-12-03\",\n                \"2021-12-04\",\n                \"2021-12-05\",\n                \"2021-12-06\",\n                \"2021-12-07\",\n                \"2021-12-08\",\n                \"2021-12-09\",\n                \"2021-12-10\",\n                \"2021-12-11\",\n                \"2021-12-12\",\n                \"2021-12-13\",\n                \"2021-12-14\",\n                \"2021-12-15\",\n                \"2021-12-16\",\n                \"2021-12-17\",\n                \"2021-12-18\",\n                \"2021-12-19\",\n                \"2021-12-20\"\n              ],\n              \"xaxis\": \"x\",\n              \"y\": [\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                6.0,\n                6.0,\n                6.0,\n                6.0,\n                6.0,\n                6.0,\n                7.0,\n                7.0,\n                7.0,\n                7.0,\n                7.0,\n                7.0,\n                8.0,\n                8.0,\n                8.0,\n                8.0,\n                8.0,\n                8.0,\n                9.0,\n                9.0,\n                9.0,\n                9.0,\n                9.0,\n                10.0,\n                10.0,\n                10.0,\n                10.0,\n                10.0,\n                11.0,\n                11.0,\n                11.0,\n                11.0,\n                11.0,\n                12.0,\n                12.0,\n                12.0,\n                13.0,\n                13.0,\n                13.0,\n                13.0,\n                14.0,\n                14.0,\n                14.0,\n                15.0,\n                15.0,\n                15.0,\n                15.0,\n                16.0,\n                16.0,\n                16.0,\n                17.0,\n                17.0,\n                17.0,\n                17.0,\n                18.0,\n                18.0,\n                18.0,\n                18.0,\n                19.0,\n                19.0,\n                19.0,\n                19.0,\n                20.0,\n                20.0,\n                20.0,\n                20.0,\n                20.0,\n                21.0,\n                21.0,\n                21.0,\n                21.0,\n                21.0,\n                22.0,\n                22.0,\n                22.0,\n                22.0,\n                22.0,\n                22.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                31.0,\n                31.0,\n                31.0,\n                31.0,\n                31.0,\n                32.0,\n                32.0,\n                32.0,\n                32.0,\n                32.0,\n                33.0,\n                33.0,\n                33.0,\n                33.0,\n                34.0,\n                34.0,\n                34.0,\n                34.0,\n                35.0,\n                35.0,\n                35.0,\n                35.0,\n                36.0,\n                36.0,\n                36.0,\n                36.0,\n                36.0,\n                37.0,\n                37.0,\n                37.0,\n                37.0,\n                38.0,\n                38.0,\n                38.0,\n                38.0,\n                38.0,\n                39.0,\n                39.0,\n                39.0,\n                39.0,\n                39.0,\n                40.0,\n                40.0,\n                40.0,\n                41.0,\n                41.0,\n                41.0,\n                41.0,\n                42.0,\n                42.0,\n                42.0,\n                43.0,\n                43.0,\n                43.0,\n                43.0,\n                44.0,\n                44.0,\n                45.0,\n                45.0,\n                45.0,\n                46.0,\n                46.0,\n                47.0,\n                47.0,\n                48.0,\n                48.0,\n                49.0,\n                49.0,\n                50.0,\n                50.0,\n                51.0,\n                51.0,\n                52.0,\n                53.0,\n                53.0,\n                54.0,\n                54.0,\n                55.0,\n                56.0,\n                57.0,\n                57.0,\n                58.0,\n                58.0,\n                59.0,\n                60.0,\n                60.0,\n                61.0,\n                62.0,\n                62.0,\n                63.0,\n                63.0,\n                64.0,\n                65.0,\n                65.0,\n                66.0,\n                66.0,\n                67.0,\n                67.0,\n                68.0,\n                68.0,\n                69.0,\n                69.0,\n                69.0,\n                70.0,\n                70.0,\n                71.0,\n                71.0,\n                71.0,\n                72.0,\n                72.0,\n                72.0,\n                72.0,\n                73.0,\n                73.0,\n                73.0,\n                74.0,\n                74.0,\n                74.0,\n                74.0,\n                75.0,\n                75.0,\n                75.0,\n                75.0,\n                76.0,\n                76.0,\n                76.0,\n                76.0,\n                77.0,\n                77.0,\n                77.0,\n                77.0,\n                77.0,\n                78.0,\n                78.0,\n                78.0,\n                78.0,\n                78.0,\n                79.0,\n                79.0,\n                79.0,\n                79.0,\n                79.0,\n                80.0,\n                80.0,\n                80.0,\n                80.0,\n                81.0,\n                81.0,\n                81.0,\n                81.0,\n                81.0,\n                82.0,\n                82.0,\n                82.0,\n                82.0,\n                83.0,\n                83.0,\n                83.0,\n                83.0,\n                83.0,\n                83.0,\n                84.0,\n                84.0,\n                84.0,\n                84.0,\n                84.0,\n                85.0,\n                85.0,\n                85.0,\n                85.0,\n                86.0,\n                86.0,\n                86.0,\n                86.0,\n                86.0,\n                87.0,\n                87.0,\n                87.0,\n                87.0,\n                88.0,\n                88.0,\n                88.0,\n                88.0,\n                89.0,\n                89.0,\n                89.0,\n                89.0,\n                89.0,\n                90.0,\n                90.0,\n                90.0,\n                90.0,\n                90.0,\n                91.0,\n                91.0,\n                91.0,\n                91.0,\n                92.0,\n                92.0,\n                92.0,\n                92.0,\n                92.0,\n                93.0,\n                93.0,\n                93.0,\n                93.0,\n                93.0,\n                94.0,\n                94.0,\n                94.0,\n                94.0,\n                94.0,\n                95.0,\n                95.0,\n                95.0,\n                95.0,\n                95.0,\n                96.0,\n                96.0,\n                96.0,\n                96.0,\n                96.0,\n                97.0,\n                97.0,\n                97.0,\n                97.0,\n                98.0,\n                98.0,\n                98.0,\n                98.0,\n                99.0,\n                99.0,\n                99.0,\n                100.0,\n                100.0,\n                100.0,\n                101.0,\n                101.0,\n                101.0,\n                102.0,\n                102.0,\n                103.0,\n                103.0,\n                103.0,\n                104.0,\n                104.0,\n                105.0,\n                105.0,\n                106.0,\n                106.0,\n                107.0,\n                108.0,\n                108.0,\n                109.0,\n                110.0,\n                110.0,\n                111.0,\n                111.0,\n                112.0,\n                113.0,\n                113.0,\n                114.0,\n                115.0,\n                115.0,\n                116.0,\n                116.0,\n                117.0,\n                118.0,\n                118.0,\n                119.0,\n                120.0,\n                120.0,\n                121.0,\n                122.0,\n                123.0,\n                123.0,\n                124.0,\n                125.0,\n                125.0,\n                126.0,\n                127.0,\n                128.0,\n                128.0,\n                129.0,\n                129.0,\n                130.0,\n                130.0,\n                131.0,\n                132.0,\n                133.0,\n                133.0,\n                134.0,\n                134.0,\n                135.0,\n                136.0,\n                137.0,\n                137.0,\n                137.0,\n                138.0,\n                138.0,\n                139.0,\n                140.0,\n                140.0,\n                141.0,\n                142.0,\n                142.0,\n                143.0,\n                143.0,\n                144.0,\n                144.0,\n                145.0,\n                145.0,\n                145.0,\n                146.0,\n                146.0,\n                146.0,\n                147.0,\n                147.0,\n                148.0,\n                148.0,\n                148.0,\n                149.0,\n                149.0,\n                149.0,\n                150.0,\n                150.0,\n                150.0,\n                150.0,\n                151.0,\n                151.0,\n                151.0,\n                152.0,\n                152.0,\n                152.0,\n                153.0,\n                153.0,\n                153.0,\n                153.0,\n                154.0,\n                154.0,\n                155.0,\n                155.0,\n                155.0,\n                155.0,\n                155.0,\n                156.0,\n                156.0,\n                156.0,\n                156.0,\n                156.0,\n                156.0,\n                157.0,\n                157.0,\n                157.0,\n                157.0,\n                157.0,\n                157.0,\n                158.0,\n                158.0,\n                158.0,\n                158.0,\n                158.0,\n                158.0,\n                158.0,\n                159.0,\n                159.0,\n                159.0,\n                159.0,\n                159.0,\n                159.0,\n                159.0,\n                159.0,\n                160.0,\n                160.0,\n                160.0,\n                160.0,\n                160.0,\n                160.0,\n                160.0,\n                161.0,\n                161.0,\n                161.0,\n                161.0,\n                161.0,\n                161.0,\n                161.0,\n                161.0,\n                161.0,\n                161.0,\n                162.0,\n                162.0,\n                162.0,\n                162.0,\n                162.0,\n                162.0,\n                162.0,\n                162.0,\n                162.0,\n                162.0,\n                163.0,\n                163.0,\n                163.0,\n                163.0,\n                163.0,\n                163.0,\n                163.0,\n                163.0,\n                163.0,\n                163.0,\n                164.0,\n                164.0,\n                164.0,\n                164.0,\n                164.0,\n                164.0,\n                164.0,\n                164.0,\n                164.0,\n                164.0\n              ],\n              \"yaxis\": \"y\",\n              \"type\": \"scattergl\"\n            },\n            {\n              \"hovertemplate\": \"Continent=Oceania<br>Date=%{x}<br>Total Deaths per Million=%{y}<extra></extra>\",\n              \"legendgroup\": \"Oceania\",\n              \"line\": {\n                \"color\": \"#19d3f3\",\n                \"dash\": \"solid\"\n              },\n              \"marker\": {\n                \"symbol\": \"circle\"\n              },\n              \"mode\": \"lines\",\n              \"name\": \"Oceania\",\n              \"showlegend\": true,\n              \"x\": [\n                \"2020-02-23\",\n                \"2020-02-24\",\n                \"2020-02-25\",\n                \"2020-02-26\",\n                \"2020-02-27\",\n                \"2020-02-28\",\n                \"2020-02-29\",\n                \"2020-03-01\",\n                \"2020-03-02\",\n                \"2020-03-03\",\n                \"2020-03-04\",\n                \"2020-03-05\",\n                \"2020-03-06\",\n                \"2020-03-07\",\n                \"2020-03-08\",\n                \"2020-03-09\",\n                \"2020-03-10\",\n                \"2020-03-11\",\n                \"2020-03-12\",\n                \"2020-03-13\",\n                \"2020-03-14\",\n                \"2020-03-15\",\n                \"2020-03-16\",\n                \"2020-03-17\",\n                \"2020-03-18\",\n                \"2020-03-19\",\n                \"2020-03-20\",\n                \"2020-03-21\",\n                \"2020-03-22\",\n                \"2020-03-23\",\n                \"2020-03-24\",\n                \"2020-03-25\",\n                \"2020-03-26\",\n                \"2020-03-27\",\n                \"2020-03-28\",\n                \"2020-03-29\",\n                \"2020-03-30\",\n                \"2020-03-31\",\n                \"2020-04-01\",\n                \"2020-04-02\",\n                \"2020-04-03\",\n                \"2020-04-04\",\n                \"2020-04-05\",\n                \"2020-04-06\",\n                \"2020-04-07\",\n                \"2020-04-08\",\n                \"2020-04-09\",\n                \"2020-04-10\",\n                \"2020-04-11\",\n                \"2020-04-12\",\n                \"2020-04-13\",\n                \"2020-04-14\",\n                \"2020-04-15\",\n                \"2020-04-16\",\n                \"2020-04-17\",\n                \"2020-04-18\",\n                \"2020-04-19\",\n                \"2020-04-20\",\n                \"2020-04-21\",\n                \"2020-04-22\",\n                \"2020-04-23\",\n                \"2020-04-24\",\n                \"2020-04-25\",\n                \"2020-04-26\",\n                \"2020-04-27\",\n                \"2020-04-28\",\n                \"2020-04-29\",\n                \"2020-04-30\",\n                \"2020-05-01\",\n                \"2020-05-02\",\n                \"2020-05-03\",\n                \"2020-05-04\",\n                \"2020-05-05\",\n                \"2020-05-06\",\n                \"2020-05-07\",\n                \"2020-05-08\",\n                \"2020-05-09\",\n                \"2020-05-10\",\n                \"2020-05-11\",\n                \"2020-05-12\",\n                \"2020-05-13\",\n                \"2020-05-14\",\n                \"2020-05-15\",\n                \"2020-05-16\",\n                \"2020-05-17\",\n                \"2020-05-18\",\n                \"2020-05-19\",\n                \"2020-05-20\",\n                \"2020-05-21\",\n                \"2020-05-22\",\n                \"2020-05-23\",\n                \"2020-05-24\",\n                \"2020-05-25\",\n                \"2020-05-26\",\n                \"2020-05-27\",\n                \"2020-05-28\",\n                \"2020-05-29\",\n                \"2020-05-30\",\n                \"2020-05-31\",\n                \"2020-06-01\",\n                \"2020-06-02\",\n                \"2020-06-03\",\n                \"2020-06-04\",\n                \"2020-06-05\",\n                \"2020-06-06\",\n                \"2020-06-07\",\n                \"2020-06-08\",\n                \"2020-06-09\",\n                \"2020-06-10\",\n                \"2020-06-11\",\n                \"2020-06-12\",\n                \"2020-06-13\",\n                \"2020-06-14\",\n                \"2020-06-15\",\n                \"2020-06-16\",\n                \"2020-06-17\",\n                \"2020-06-18\",\n                \"2020-06-19\",\n                \"2020-06-20\",\n                \"2020-06-21\",\n                \"2020-06-22\",\n                \"2020-06-23\",\n                \"2020-06-24\",\n                \"2020-06-25\",\n                \"2020-06-26\",\n                \"2020-06-27\",\n                \"2020-06-28\",\n                \"2020-06-29\",\n                \"2020-06-30\",\n                \"2020-07-01\",\n                \"2020-07-02\",\n                \"2020-07-03\",\n                \"2020-07-04\",\n                \"2020-07-05\",\n                \"2020-07-06\",\n                \"2020-07-07\",\n                \"2020-07-08\",\n                \"2020-07-09\",\n                \"2020-07-10\",\n                \"2020-07-11\",\n                \"2020-07-12\",\n                \"2020-07-13\",\n                \"2020-07-14\",\n                \"2020-07-15\",\n                \"2020-07-16\",\n                \"2020-07-17\",\n                \"2020-07-18\",\n                \"2020-07-19\",\n                \"2020-07-20\",\n                \"2020-07-21\",\n                \"2020-07-22\",\n                \"2020-07-23\",\n                \"2020-07-24\",\n                \"2020-07-25\",\n                \"2020-07-26\",\n                \"2020-07-27\",\n                \"2020-07-28\",\n                \"2020-07-29\",\n                \"2020-07-30\",\n                \"2020-07-31\",\n                \"2020-08-01\",\n                \"2020-08-02\",\n                \"2020-08-03\",\n                \"2020-08-04\",\n                \"2020-08-05\",\n                \"2020-08-06\",\n                \"2020-08-07\",\n                \"2020-08-08\",\n                \"2020-08-09\",\n                \"2020-08-10\",\n                \"2020-08-11\",\n                \"2020-08-12\",\n                \"2020-08-13\",\n                \"2020-08-14\",\n                \"2020-08-15\",\n                \"2020-08-16\",\n                \"2020-08-17\",\n                \"2020-08-18\",\n                \"2020-08-19\",\n                \"2020-08-20\",\n                \"2020-08-21\",\n                \"2020-08-22\",\n                \"2020-08-23\",\n                \"2020-08-24\",\n                \"2020-08-25\",\n                \"2020-08-26\",\n                \"2020-08-27\",\n                \"2020-08-28\",\n                \"2020-08-29\",\n                \"2020-08-30\",\n                \"2020-08-31\",\n                \"2020-09-01\",\n                \"2020-09-02\",\n                \"2020-09-03\",\n                \"2020-09-04\",\n                \"2020-09-05\",\n                \"2020-09-06\",\n                \"2020-09-07\",\n                \"2020-09-08\",\n                \"2020-09-09\",\n                \"2020-09-10\",\n                \"2020-09-11\",\n                \"2020-09-12\",\n                \"2020-09-13\",\n                \"2020-09-14\",\n                \"2020-09-15\",\n                \"2020-09-16\",\n                \"2020-09-17\",\n                \"2020-09-18\",\n                \"2020-09-19\",\n                \"2020-09-20\",\n                \"2020-09-21\",\n                \"2020-09-22\",\n                \"2020-09-23\",\n                \"2020-09-24\",\n                \"2020-09-25\",\n                \"2020-09-26\",\n                \"2020-09-27\",\n                \"2020-09-28\",\n                \"2020-09-29\",\n                \"2020-09-30\",\n                \"2020-10-01\",\n                \"2020-10-02\",\n                \"2020-10-03\",\n                \"2020-10-04\",\n                \"2020-10-05\",\n                \"2020-10-06\",\n                \"2020-10-07\",\n                \"2020-10-08\",\n                \"2020-10-09\",\n                \"2020-10-10\",\n                \"2020-10-11\",\n                \"2020-10-12\",\n                \"2020-10-13\",\n                \"2020-10-14\",\n                \"2020-10-15\",\n                \"2020-10-16\",\n                \"2020-10-17\",\n                \"2020-10-18\",\n                \"2020-10-19\",\n                \"2020-10-20\",\n                \"2020-10-21\",\n                \"2020-10-22\",\n                \"2020-10-23\",\n                \"2020-10-24\",\n                \"2020-10-25\",\n                \"2020-10-26\",\n                \"2020-10-27\",\n                \"2020-10-28\",\n                \"2020-10-29\",\n                \"2020-10-30\",\n                \"2020-10-31\",\n                \"2020-11-01\",\n                \"2020-11-02\",\n                \"2020-11-03\",\n                \"2020-11-04\",\n                \"2020-11-05\",\n                \"2020-11-06\",\n                \"2020-11-07\",\n                \"2020-11-08\",\n                \"2020-11-09\",\n                \"2020-11-10\",\n                \"2020-11-11\",\n                \"2020-11-12\",\n                \"2020-11-13\",\n                \"2020-11-14\",\n                \"2020-11-15\",\n                \"2020-11-16\",\n                \"2020-11-17\",\n                \"2020-11-18\",\n                \"2020-11-19\",\n                \"2020-11-20\",\n                \"2020-11-21\",\n                \"2020-11-22\",\n                \"2020-11-23\",\n                \"2020-11-24\",\n                \"2020-11-25\",\n                \"2020-11-26\",\n                \"2020-11-27\",\n                \"2020-11-28\",\n                \"2020-11-29\",\n                \"2020-11-30\",\n                \"2020-12-01\",\n                \"2020-12-02\",\n                \"2020-12-03\",\n                \"2020-12-04\",\n                \"2020-12-05\",\n                \"2020-12-06\",\n                \"2020-12-07\",\n                \"2020-12-08\",\n                \"2020-12-09\",\n                \"2020-12-10\",\n                \"2020-12-11\",\n                \"2020-12-12\",\n                \"2020-12-13\",\n                \"2020-12-14\",\n                \"2020-12-15\",\n                \"2020-12-16\",\n                \"2020-12-17\",\n                \"2020-12-18\",\n                \"2020-12-19\",\n                \"2020-12-20\",\n                \"2020-12-21\",\n                \"2020-12-22\",\n                \"2020-12-23\",\n                \"2020-12-24\",\n                \"2020-12-25\",\n                \"2020-12-26\",\n                \"2020-12-27\",\n                \"2020-12-28\",\n                \"2020-12-29\",\n                \"2020-12-30\",\n                \"2020-12-31\",\n                \"2021-01-01\",\n                \"2021-01-02\",\n                \"2021-01-03\",\n                \"2021-01-04\",\n                \"2021-01-05\",\n                \"2021-01-06\",\n                \"2021-01-07\",\n                \"2021-01-08\",\n                \"2021-01-09\",\n                \"2021-01-10\",\n                \"2021-01-11\",\n                \"2021-01-12\",\n                \"2021-01-13\",\n                \"2021-01-14\",\n                \"2021-01-15\",\n                \"2021-01-16\",\n                \"2021-01-17\",\n                \"2021-01-18\",\n                \"2021-01-19\",\n                \"2021-01-20\",\n                \"2021-01-21\",\n                \"2021-01-22\",\n                \"2021-01-23\",\n                \"2021-01-24\",\n                \"2021-01-25\",\n                \"2021-01-26\",\n                \"2021-01-27\",\n                \"2021-01-28\",\n                \"2021-01-29\",\n                \"2021-01-30\",\n                \"2021-01-31\",\n                \"2021-02-01\",\n                \"2021-02-02\",\n                \"2021-02-03\",\n                \"2021-02-04\",\n                \"2021-02-05\",\n                \"2021-02-06\",\n                \"2021-02-07\",\n                \"2021-02-08\",\n                \"2021-02-09\",\n                \"2021-02-10\",\n                \"2021-02-11\",\n                \"2021-02-12\",\n                \"2021-02-13\",\n                \"2021-02-14\",\n                \"2021-02-15\",\n                \"2021-02-16\",\n                \"2021-02-17\",\n                \"2021-02-18\",\n                \"2021-02-19\",\n                \"2021-02-20\",\n                \"2021-02-21\",\n                \"2021-02-22\",\n                \"2021-02-23\",\n                \"2021-02-24\",\n                \"2021-02-25\",\n                \"2021-02-26\",\n                \"2021-02-27\",\n                \"2021-02-28\",\n                \"2021-03-01\",\n                \"2021-03-02\",\n                \"2021-03-03\",\n                \"2021-03-04\",\n                \"2021-03-05\",\n                \"2021-03-06\",\n                \"2021-03-07\",\n                \"2021-03-08\",\n                \"2021-03-09\",\n                \"2021-03-10\",\n                \"2021-03-11\",\n                \"2021-03-12\",\n                \"2021-03-13\",\n                \"2021-03-14\",\n                \"2021-03-15\",\n                \"2021-03-16\",\n                \"2021-03-17\",\n                \"2021-03-18\",\n                \"2021-03-19\",\n                \"2021-03-20\",\n                \"2021-03-21\",\n                \"2021-03-22\",\n                \"2021-03-23\",\n                \"2021-03-24\",\n                \"2021-03-25\",\n                \"2021-03-26\",\n                \"2021-03-27\",\n                \"2021-03-28\",\n                \"2021-03-29\",\n                \"2021-03-30\",\n                \"2021-03-31\",\n                \"2021-04-01\",\n                \"2021-04-02\",\n                \"2021-04-03\",\n                \"2021-04-04\",\n                \"2021-04-05\",\n                \"2021-04-06\",\n                \"2021-04-07\",\n                \"2021-04-08\",\n                \"2021-04-09\",\n                \"2021-04-10\",\n                \"2021-04-11\",\n                \"2021-04-12\",\n                \"2021-04-13\",\n                \"2021-04-14\",\n                \"2021-04-15\",\n                \"2021-04-16\",\n                \"2021-04-17\",\n                \"2021-04-18\",\n                \"2021-04-19\",\n                \"2021-04-20\",\n                \"2021-04-21\",\n                \"2021-04-22\",\n                \"2021-04-23\",\n                \"2021-04-24\",\n                \"2021-04-25\",\n                \"2021-04-26\",\n                \"2021-04-27\",\n                \"2021-04-28\",\n                \"2021-04-29\",\n                \"2021-04-30\",\n                \"2021-05-01\",\n                \"2021-05-02\",\n                \"2021-05-03\",\n                \"2021-05-04\",\n                \"2021-05-05\",\n                \"2021-05-06\",\n                \"2021-05-07\",\n                \"2021-05-08\",\n                \"2021-05-09\",\n                \"2021-05-10\",\n                \"2021-05-11\",\n                \"2021-05-12\",\n                \"2021-05-13\",\n                \"2021-05-14\",\n                \"2021-05-15\",\n                \"2021-05-16\",\n                \"2021-05-17\",\n                \"2021-05-18\",\n                \"2021-05-19\",\n                \"2021-05-20\",\n                \"2021-05-21\",\n                \"2021-05-22\",\n                \"2021-05-23\",\n                \"2021-05-24\",\n                \"2021-05-25\",\n                \"2021-05-26\",\n                \"2021-05-27\",\n                \"2021-05-28\",\n                \"2021-05-29\",\n                \"2021-05-30\",\n                \"2021-05-31\",\n                \"2021-06-01\",\n                \"2021-06-02\",\n                \"2021-06-03\",\n                \"2021-06-04\",\n                \"2021-06-05\",\n                \"2021-06-06\",\n                \"2021-06-07\",\n                \"2021-06-08\",\n                \"2021-06-09\",\n                \"2021-06-10\",\n                \"2021-06-11\",\n                \"2021-06-12\",\n                \"2021-06-13\",\n                \"2021-06-14\",\n                \"2021-06-15\",\n                \"2021-06-16\",\n                \"2021-06-17\",\n                \"2021-06-18\",\n                \"2021-06-19\",\n                \"2021-06-20\",\n                \"2021-06-21\",\n                \"2021-06-22\",\n                \"2021-06-23\",\n                \"2021-06-24\",\n                \"2021-06-25\",\n                \"2021-06-26\",\n                \"2021-06-27\",\n                \"2021-06-28\",\n                \"2021-06-29\",\n                \"2021-06-30\",\n                \"2021-07-01\",\n                \"2021-07-02\",\n                \"2021-07-03\",\n                \"2021-07-04\",\n                \"2021-07-05\",\n                \"2021-07-06\",\n                \"2021-07-07\",\n                \"2021-07-08\",\n                \"2021-07-09\",\n                \"2021-07-10\",\n                \"2021-07-11\",\n                \"2021-07-12\",\n                \"2021-07-13\",\n                \"2021-07-14\",\n                \"2021-07-15\",\n                \"2021-07-16\",\n                \"2021-07-17\",\n                \"2021-07-18\",\n                \"2021-07-19\",\n                \"2021-07-20\",\n                \"2021-07-21\",\n                \"2021-07-22\",\n                \"2021-07-23\",\n                \"2021-07-24\",\n                \"2021-07-25\",\n                \"2021-07-26\",\n                \"2021-07-27\",\n                \"2021-07-28\",\n                \"2021-07-29\",\n                \"2021-07-30\",\n                \"2021-07-31\",\n                \"2021-08-01\",\n                \"2021-08-02\",\n                \"2021-08-03\",\n                \"2021-08-04\",\n                \"2021-08-05\",\n                \"2021-08-06\",\n                \"2021-08-07\",\n                \"2021-08-08\",\n                \"2021-08-09\",\n                \"2021-08-10\",\n                \"2021-08-11\",\n                \"2021-08-12\",\n                \"2021-08-13\",\n                \"2021-08-14\",\n                \"2021-08-15\",\n                \"2021-08-16\",\n                \"2021-08-17\",\n                \"2021-08-18\",\n                \"2021-08-19\",\n                \"2021-08-20\",\n                \"2021-08-21\",\n                \"2021-08-22\",\n                \"2021-08-23\",\n                \"2021-08-24\",\n                \"2021-08-25\",\n                \"2021-08-26\",\n                \"2021-08-27\",\n                \"2021-08-28\",\n                \"2021-08-29\",\n                \"2021-08-30\",\n                \"2021-08-31\",\n                \"2021-09-01\",\n                \"2021-09-02\",\n                \"2021-09-03\",\n                \"2021-09-04\",\n                \"2021-09-05\",\n                \"2021-09-06\",\n                \"2021-09-07\",\n                \"2021-09-08\",\n                \"2021-09-09\",\n                \"2021-09-10\",\n                \"2021-09-11\",\n                \"2021-09-12\",\n                \"2021-09-13\",\n                \"2021-09-14\",\n                \"2021-09-15\",\n                \"2021-09-16\",\n                \"2021-09-17\",\n                \"2021-09-18\",\n                \"2021-09-19\",\n                \"2021-09-20\",\n                \"2021-09-21\",\n                \"2021-09-22\",\n                \"2021-09-23\",\n                \"2021-09-24\",\n                \"2021-09-25\",\n                \"2021-09-26\",\n                \"2021-09-27\",\n                \"2021-09-28\",\n                \"2021-09-29\",\n                \"2021-09-30\",\n                \"2021-10-01\",\n                \"2021-10-02\",\n                \"2021-10-03\",\n                \"2021-10-04\",\n                \"2021-10-05\",\n                \"2021-10-06\",\n                \"2021-10-07\",\n                \"2021-10-08\",\n                \"2021-10-09\",\n                \"2021-10-10\",\n                \"2021-10-11\",\n                \"2021-10-12\",\n                \"2021-10-13\",\n                \"2021-10-14\",\n                \"2021-10-15\",\n                \"2021-10-16\",\n                \"2021-10-17\",\n                \"2021-10-18\",\n                \"2021-10-19\",\n                \"2021-10-20\",\n                \"2021-10-21\",\n                \"2021-10-22\",\n                \"2021-10-23\",\n                \"2021-10-24\",\n                \"2021-10-25\",\n                \"2021-10-26\",\n                \"2021-10-27\",\n                \"2021-10-28\",\n                \"2021-10-29\",\n                \"2021-10-30\",\n                \"2021-10-31\",\n                \"2021-11-01\",\n                \"2021-11-02\",\n                \"2021-11-03\",\n                \"2021-11-04\",\n                \"2021-11-05\",\n                \"2021-11-06\",\n                \"2021-11-07\",\n                \"2021-11-08\",\n                \"2021-11-09\",\n                \"2021-11-10\",\n                \"2021-11-11\",\n                \"2021-11-12\",\n                \"2021-11-13\",\n                \"2021-11-14\",\n                \"2021-11-15\",\n                \"2021-11-16\",\n                \"2021-11-17\",\n                \"2021-11-18\",\n                \"2021-11-19\",\n                \"2021-11-20\",\n                \"2021-11-21\",\n                \"2021-11-22\",\n                \"2021-11-23\",\n                \"2021-11-24\",\n                \"2021-11-25\",\n                \"2021-11-26\",\n                \"2021-11-27\",\n                \"2021-11-28\",\n                \"2021-11-29\",\n                \"2021-11-30\",\n                \"2021-12-01\",\n                \"2021-12-02\",\n                \"2021-12-03\",\n                \"2021-12-04\",\n                \"2021-12-05\",\n                \"2021-12-06\",\n                \"2021-12-07\",\n                \"2021-12-08\",\n                \"2021-12-09\",\n                \"2021-12-10\",\n                \"2021-12-11\",\n                \"2021-12-12\",\n                \"2021-12-13\",\n                \"2021-12-14\",\n                \"2021-12-15\",\n                \"2021-12-16\",\n                \"2021-12-17\",\n                \"2021-12-18\",\n                \"2021-12-19\",\n                \"2021-12-20\"\n              ],\n              \"xaxis\": \"x\",\n              \"y\": [\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                0.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                1.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                2.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                3.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                4.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                5.0,\n                6.0,\n                6.0,\n                6.0,\n                7.0,\n                7.0,\n                7.0,\n                7.0,\n                8.0,\n                8.0,\n                9.0,\n                9.0,\n                9.0,\n                10.0,\n                10.0,\n                10.0,\n                11.0,\n                11.0,\n                11.0,\n                12.0,\n                12.0,\n                12.0,\n                13.0,\n                13.0,\n                13.0,\n                14.0,\n                14.0,\n                15.0,\n                15.0,\n                15.0,\n                16.0,\n                17.0,\n                17.0,\n                17.0,\n                18.0,\n                19.0,\n                19.0,\n                19.0,\n                19.0,\n                20.0,\n                20.0,\n                20.0,\n                20.0,\n                20.0,\n                20.0,\n                20.0,\n                21.0,\n                21.0,\n                21.0,\n                21.0,\n                21.0,\n                21.0,\n                21.0,\n                22.0,\n                22.0,\n                22.0,\n                22.0,\n                22.0,\n                22.0,\n                22.0,\n                22.0,\n                22.0,\n                22.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                22.0,\n                22.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                24.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                23.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                24.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                25.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                26.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                27.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                28.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                29.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                30.0,\n                31.0,\n                31.0,\n                31.0,\n                31.0,\n                31.0,\n                31.0,\n                31.0,\n                31.0,\n                32.0,\n                32.0,\n                33.0,\n                33.0,\n                34.0,\n                34.0,\n                34.0,\n                34.0,\n                34.0,\n                35.0,\n                35.0,\n                35.0,\n                35.0,\n                36.0,\n                36.0,\n                36.0,\n                36.0,\n                37.0,\n                37.0,\n                37.0,\n                37.0,\n                38.0,\n                38.0,\n                39.0,\n                39.0,\n                39.0,\n                40.0,\n                40.0,\n                40.0,\n                42.0,\n                42.0,\n                43.0,\n                43.0,\n                44.0,\n                44.0,\n                44.0,\n                45.0,\n                46.0,\n                47.0,\n                48.0,\n                48.0,\n                48.0,\n                48.0,\n                50.0,\n                50.0,\n                51.0,\n                52.0,\n                52.0,\n                52.0,\n                52.0,\n                54.0,\n                54.0,\n                55.0,\n                55.0,\n                56.0,\n                56.0,\n                56.0,\n                57.0,\n                57.0,\n                58.0,\n                58.0,\n                59.0,\n                60.0,\n                60.0,\n                61.0,\n                61.0,\n                62.0,\n                63.0,\n                63.0,\n                64.0,\n                65.0,\n                65.0,\n                67.0,\n                67.0,\n                68.0,\n                69.0,\n                69.0,\n                70.0,\n                70.0,\n                71.0,\n                72.0,\n                73.0,\n                73.0,\n                74.0,\n                74.0,\n                75.0,\n                75.0,\n                77.0,\n                77.0,\n                77.0,\n                78.0,\n                78.0,\n                80.0,\n                80.0,\n                81.0,\n                81.0,\n                82.0,\n                83.0,\n                83.0,\n                83.0,\n                84.0,\n                84.0,\n                85.0,\n                86.0,\n                86.0,\n                86.0,\n                87.0,\n                87.0,\n                88.0,\n                88.0,\n                89.0,\n                89.0,\n                89.0,\n                90.0,\n                90.0,\n                90.0,\n                91.0,\n                91.0,\n                91.0,\n                92.0,\n                92.0,\n                92.0,\n                93.0,\n                93.0,\n                94.0,\n                95.0,\n                95.0,\n                96.0,\n                96.0,\n                97.0,\n                97.0,\n                97.0,\n                97.0,\n                97.0,\n                98.0,\n                98.0,\n                98.0,\n                98.0,\n                99.0,\n                99.0,\n                99.0,\n                99.0,\n                100.0,\n                100.0,\n                100.0,\n                101.0,\n                101.0,\n                101.0,\n                101.0,\n                101.0,\n                101.0,\n                102.0,\n                102.0,\n                102.0,\n                102.0,\n                102.0\n              ],\n              \"yaxis\": \"y\",\n              \"type\": \"scattergl\"\n            }\n          ],\n          \"layout\": {\n            \"template\": {\n              \"data\": {\n                \"bar\": [\n                  {\n                    \"error_x\": {\n                      \"color\": \"#2a3f5f\"\n                    },\n                    \"error_y\": {\n                      \"color\": \"#2a3f5f\"\n                    },\n                    \"marker\": {\n                      \"line\": {\n                        \"color\": \"#E5ECF6\",\n                        \"width\": 0.5\n                      },\n                      \"pattern\": {\n                        \"fillmode\": \"overlay\",\n                        \"size\": 10,\n                        \"solidity\": 0.2\n                      }\n                    },\n                    \"type\": \"bar\"\n                  }\n                ],\n                \"barpolar\": [\n                  {\n                    \"marker\": {\n                      \"line\": {\n                        \"color\": \"#E5ECF6\",\n                        \"width\": 0.5\n                      },\n                      \"pattern\": {\n                        \"fillmode\": \"overlay\",\n                        \"size\": 10,\n                        \"solidity\": 0.2\n                      }\n                    },\n                    \"type\": \"barpolar\"\n                  }\n                ],\n                \"carpet\": [\n                  {\n                    \"aaxis\": {\n                      \"endlinecolor\": \"#2a3f5f\",\n                      \"gridcolor\": \"white\",\n                      \"linecolor\": \"white\",\n                      \"minorgridcolor\": \"white\",\n                      \"startlinecolor\": \"#2a3f5f\"\n                    },\n                    \"baxis\": {\n                      \"endlinecolor\": \"#2a3f5f\",\n                      \"gridcolor\": \"white\",\n                      \"linecolor\": \"white\",\n                      \"minorgridcolor\": \"white\",\n                      \"startlinecolor\": \"#2a3f5f\"\n                    },\n                    \"type\": \"carpet\"\n                  }\n                ],\n                \"choropleth\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"type\": \"choropleth\"\n                  }\n                ],\n                \"contour\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"contour\"\n                  }\n                ],\n                \"contourcarpet\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"type\": \"contourcarpet\"\n                  }\n                ],\n                \"heatmap\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"heatmap\"\n                  }\n                ],\n                \"heatmapgl\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"heatmapgl\"\n                  }\n                ],\n                \"histogram\": [\n                  {\n                    \"marker\": {\n                      \"pattern\": {\n                        \"fillmode\": \"overlay\",\n                        \"size\": 10,\n                        \"solidity\": 0.2\n                      }\n                    },\n                    \"type\": \"histogram\"\n                  }\n                ],\n                \"histogram2d\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"histogram2d\"\n                  }\n                ],\n                \"histogram2dcontour\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"histogram2dcontour\"\n                  }\n                ],\n                \"mesh3d\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"type\": \"mesh3d\"\n                  }\n                ],\n                \"parcoords\": [\n                  {\n                    \"line\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"parcoords\"\n                  }\n                ],\n                \"pie\": [\n                  {\n                    \"automargin\": true,\n                    \"type\": \"pie\"\n                  }\n                ],\n                \"scatter\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scatter\"\n                  }\n                ],\n                \"scatter3d\": [\n                  {\n                    \"line\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scatter3d\"\n                  }\n                ],\n                \"scattercarpet\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scattercarpet\"\n                  }\n                ],\n                \"scattergeo\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scattergeo\"\n                  }\n                ],\n                \"scattergl\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scattergl\"\n                  }\n                ],\n                \"scattermapbox\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scattermapbox\"\n                  }\n                ],\n                \"scatterpolar\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scatterpolar\"\n                  }\n                ],\n                \"scatterpolargl\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scatterpolargl\"\n                  }\n                ],\n                \"scatterternary\": [\n                  {\n                    \"marker\": {\n                      \"colorbar\": {\n                        \"outlinewidth\": 0,\n                        \"ticks\": \"\"\n                      }\n                    },\n                    \"type\": \"scatterternary\"\n                  }\n                ],\n                \"surface\": [\n                  {\n                    \"colorbar\": {\n                      \"outlinewidth\": 0,\n                      \"ticks\": \"\"\n                    },\n                    \"colorscale\": [\n                      [\n                        0.0,\n                        \"#0d0887\"\n                      ],\n                      [\n                        0.1111111111111111,\n                        \"#46039f\"\n                      ],\n                      [\n                        0.2222222222222222,\n                        \"#7201a8\"\n                      ],\n                      [\n                        0.3333333333333333,\n                        \"#9c179e\"\n                      ],\n                      [\n                        0.4444444444444444,\n                        \"#bd3786\"\n                      ],\n                      [\n                        0.5555555555555556,\n                        \"#d8576b\"\n                      ],\n                      [\n                        0.6666666666666666,\n                        \"#ed7953\"\n                      ],\n                      [\n                        0.7777777777777778,\n                        \"#fb9f3a\"\n                      ],\n                      [\n                        0.8888888888888888,\n                        \"#fdca26\"\n                      ],\n                      [\n                        1.0,\n                        \"#f0f921\"\n                      ]\n                    ],\n                    \"type\": \"surface\"\n                  }\n                ],\n                \"table\": [\n                  {\n                    \"cells\": {\n                      \"fill\": {\n                        \"color\": \"#EBF0F8\"\n                      },\n                      \"line\": {\n                        \"color\": \"white\"\n                      }\n                    },\n                    \"header\": {\n                      \"fill\": {\n                        \"color\": \"#C8D4E3\"\n                      },\n                      \"line\": {\n                        \"color\": \"white\"\n                      }\n                    },\n                    \"type\": \"table\"\n                  }\n                ]\n              },\n              \"layout\": {\n                \"annotationdefaults\": {\n                  \"arrowcolor\": \"#2a3f5f\",\n                  \"arrowhead\": 0,\n                  \"arrowwidth\": 1\n                },\n                \"autotypenumbers\": \"strict\",\n                \"coloraxis\": {\n                  \"colorbar\": {\n                    \"outlinewidth\": 0,\n                    \"ticks\": \"\"\n                  }\n                },\n                \"colorscale\": {\n                  \"diverging\": [\n                    [\n                      0,\n                      \"#8e0152\"\n                    ],\n                    [\n                      0.1,\n                      \"#c51b7d\"\n                    ],\n                    [\n                      0.2,\n                      \"#de77ae\"\n                    ],\n                    [\n                      0.3,\n                      \"#f1b6da\"\n                    ],\n                    [\n                      0.4,\n                      \"#fde0ef\"\n                    ],\n                    [\n                      0.5,\n                      \"#f7f7f7\"\n                    ],\n                    [\n                      0.6,\n                      \"#e6f5d0\"\n                    ],\n                    [\n                      0.7,\n                      \"#b8e186\"\n                    ],\n                    [\n                      0.8,\n                      \"#7fbc41\"\n                    ],\n                    [\n                      0.9,\n                      \"#4d9221\"\n                    ],\n                    [\n                      1,\n                      \"#276419\"\n                    ]\n                  ],\n                  \"sequential\": [\n                    [\n                      0.0,\n                      \"#0d0887\"\n                    ],\n                    [\n                      0.1111111111111111,\n                      \"#46039f\"\n                    ],\n                    [\n                      0.2222222222222222,\n                      \"#7201a8\"\n                    ],\n                    [\n                      0.3333333333333333,\n                      \"#9c179e\"\n                    ],\n                    [\n                      0.4444444444444444,\n                      \"#bd3786\"\n                    ],\n                    [\n                      0.5555555555555556,\n                      \"#d8576b\"\n                    ],\n                    [\n                      0.6666666666666666,\n                      \"#ed7953\"\n                    ],\n                    [\n                      0.7777777777777778,\n                      \"#fb9f3a\"\n                    ],\n                    [\n                      0.8888888888888888,\n                      \"#fdca26\"\n                    ],\n                    [\n                      1.0,\n                      \"#f0f921\"\n                    ]\n                  ],\n                  \"sequentialminus\": [\n                    [\n                      0.0,\n                      \"#0d0887\"\n                    ],\n                    [\n                      0.1111111111111111,\n                      \"#46039f\"\n                    ],\n                    [\n                      0.2222222222222222,\n                      \"#7201a8\"\n                    ],\n                    [\n                      0.3333333333333333,\n                      \"#9c179e\"\n                    ],\n                    [\n                      0.4444444444444444,\n                      \"#bd3786\"\n                    ],\n                    [\n                      0.5555555555555556,\n                      \"#d8576b\"\n                    ],\n                    [\n                      0.6666666666666666,\n                      \"#ed7953\"\n                    ],\n                    [\n                      0.7777777777777778,\n                      \"#fb9f3a\"\n                    ],\n                    [\n                      0.8888888888888888,\n                      \"#fdca26\"\n                    ],\n                    [\n                      1.0,\n                      \"#f0f921\"\n                    ]\n                  ]\n                },\n                \"colorway\": [\n                  \"#636efa\",\n                  \"#EF553B\",\n                  \"#00cc96\",\n                  \"#ab63fa\",\n                  \"#FFA15A\",\n                  \"#19d3f3\",\n                  \"#FF6692\",\n                  \"#B6E880\",\n                  \"#FF97FF\",\n                  \"#FECB52\"\n                ],\n                \"font\": {\n                  \"color\": \"#2a3f5f\"\n                },\n                \"geo\": {\n                  \"bgcolor\": \"white\",\n                  \"lakecolor\": \"white\",\n                  \"landcolor\": \"#E5ECF6\",\n                  \"showlakes\": true,\n                  \"showland\": true,\n                  \"subunitcolor\": \"white\"\n                },\n                \"hoverlabel\": {\n                  \"align\": \"left\"\n                },\n                \"hovermode\": \"closest\",\n                \"mapbox\": {\n                  \"style\": \"light\"\n                },\n                \"paper_bgcolor\": \"white\",\n                \"plot_bgcolor\": \"#E5ECF6\",\n                \"polar\": {\n                  \"angularaxis\": {\n                    \"gridcolor\": \"white\",\n                    \"linecolor\": \"white\",\n                    \"ticks\": \"\"\n                  },\n                  \"bgcolor\": \"#E5ECF6\",\n                  \"radialaxis\": {\n                    \"gridcolor\": \"white\",\n                    \"linecolor\": \"white\",\n                    \"ticks\": \"\"\n                  }\n                },\n                \"scene\": {\n                  \"xaxis\": {\n                    \"backgroundcolor\": \"#E5ECF6\",\n                    \"gridcolor\": \"white\",\n                    \"gridwidth\": 2,\n                    \"linecolor\": \"white\",\n                    \"showbackground\": true,\n                    \"ticks\": \"\",\n                    \"zerolinecolor\": \"white\"\n                  },\n                  \"yaxis\": {\n                    \"backgroundcolor\": \"#E5ECF6\",\n                    \"gridcolor\": \"white\",\n                    \"gridwidth\": 2,\n                    \"linecolor\": \"white\",\n                    \"showbackground\": true,\n                    \"ticks\": \"\",\n                    \"zerolinecolor\": \"white\"\n                  },\n                  \"zaxis\": {\n                    \"backgroundcolor\": \"#E5ECF6\",\n                    \"gridcolor\": \"white\",\n                    \"gridwidth\": 2,\n                    \"linecolor\": \"white\",\n                    \"showbackground\": true,\n                    \"ticks\": \"\",\n                    \"zerolinecolor\": \"white\"\n                  }\n                },\n                \"shapedefaults\": {\n                  \"line\": {\n                    \"color\": \"#2a3f5f\"\n                  }\n                },\n                \"ternary\": {\n                  \"aaxis\": {\n                    \"gridcolor\": \"white\",\n                    \"linecolor\": \"white\",\n                    \"ticks\": \"\"\n                  },\n                  \"baxis\": {\n                    \"gridcolor\": \"white\",\n                    \"linecolor\": \"white\",\n                    \"ticks\": \"\"\n                  },\n                  \"bgcolor\": \"#E5ECF6\",\n                  \"caxis\": {\n                    \"gridcolor\": \"white\",\n                    \"linecolor\": \"white\",\n                    \"ticks\": \"\"\n                  }\n                },\n                \"title\": {\n                  \"x\": 0.05\n                },\n                \"xaxis\": {\n                  \"automargin\": true,\n                  \"gridcolor\": \"white\",\n                  \"linecolor\": \"white\",\n                  \"ticks\": \"\",\n                  \"title\": {\n                    \"standoff\": 15\n                  },\n                  \"zerolinecolor\": \"white\",\n                  \"zerolinewidth\": 2\n                },\n                \"yaxis\": {\n                  \"automargin\": true,\n                  \"gridcolor\": \"white\",\n                  \"linecolor\": \"white\",\n                  \"ticks\": \"\",\n                  \"title\": {\n                    \"standoff\": 15\n                  },\n                  \"zerolinecolor\": \"white\",\n                  \"zerolinewidth\": 2\n                }\n              }\n            },\n            \"xaxis\": {\n              \"anchor\": \"y\",\n              \"domain\": [\n                0.0,\n                1.0\n              ],\n              \"title\": {\n                \"text\": \"Date\"\n              }\n            },\n            \"yaxis\": {\n              \"anchor\": \"x\",\n              \"domain\": [\n                0.0,\n                1.0\n              ],\n              \"title\": {\n                \"text\": \"Total Deaths per Million\"\n              }\n            },\n            \"legend\": {\n              \"title\": {\n                \"text\": \"Continent\"\n              },\n              \"tracegroupgap\": 0\n            },\n            \"margin\": {\n              \"t\": 24,\n              \"b\": 0\n            },\n            \"paper_bgcolor\": \"rgba(0, 0, 0, 0)\"\n          }\n        }\n    )\n};\n"
  },
  {
    "path": "web/empty_script.py",
    "content": "# This is an empty Python script.\n# It is here, so it tricks GitHub into thinking that this is a Python project.\n# But because GitHub counts characters, we have to fill it with something.\n# How about:\n\nfrom math import sin, pi\n\nLEN = 40\nwave = ['#' * (1 + round(amp * (1+sin(i/resolution*2*pi))))\n            for resolution, amp in zip(range(10, 10+LEN, 2), range(2, 2+LEN, 2))\n                for i in range(resolution)]\nprint('\\n'.join(wave))\n\n\n#\n##\n###\n####\n#####\n#####\n####\n###\n##\n#\n#\n##\n#####\n#######\n########\n#########\n########\n#######\n#####\n###\n##\n#\n##\n###\n#######\n##########\n############\n#############\n#############\n############\n##########\n#######\n####\n##\n#\n#\n##\n####\n#########\n############\n###############\n################\n#################\n################\n###############\n############\n#########\n######\n###\n##\n#\n##\n###\n######\n###########\n##############\n#################\n####################\n#####################\n#####################\n####################\n#################\n##############\n###########\n########\n#####\n##\n#\n#\n##\n#####\n########\n#############\n#################\n####################\n#######################\n########################\n#########################\n########################\n#######################\n####################\n#################\n#############\n#########\n######\n###\n##\n#\n##\n###\n######\n#########\n###############\n###################\n#######################\n##########################\n############################\n#############################\n#############################\n############################\n##########################\n#######################\n###################\n###############\n###########\n#######\n####\n##\n#\n#\n##\n####\n#######\n###########\n#################\n#####################\n#########################\n############################\n###############################\n################################\n#################################\n################################\n###############################\n############################\n#########################\n#####################\n#################\n#############\n#########\n######\n###\n##\n#\n##\n###\n######\n#########\n#############\n###################\n#######################\n###########################\n###############################\n##################################\n####################################\n#####################################\n#####################################\n####################################\n##################################\n###############################\n###########################\n#######################\n###################\n###############\n###########\n#######\n####\n##\n#\n#\n##\n####\n#######\n###########\n###############\n#####################\n#########################\n##############################\n#################################\n#####################################\n#######################################\n########################################\n#########################################\n########################################\n#######################################\n#####################################\n#################################\n##############################\n#########################\n#####################\n#################\n############\n#########\n#####\n###\n##\n#\n##\n###\n#####\n#########\n############\n#################\n#######################\n############################\n################################\n####################################\n#######################################\n##########################################\n############################################\n#############################################\n#############################################\n############################################\n##########################################\n#######################################\n####################################\n################################\n############################\n#######################\n##################\n##############\n##########\n#######\n####\n##\n#\n#\n##\n####\n#######\n##########\n##############\n##################\n#########################\n##############################\n##################################\n######################################\n##########################################\n#############################################\n###############################################\n#################################################\n#################################################\n#################################################\n###############################################\n#############################################\n##########################################\n######################################\n##################################\n##############################\n#########################\n####################\n################\n############\n########\n#####\n###\n#\n#\n#\n###\n#####\n########\n############\n################\n####################\n###########################\n################################\n####################################\n#########################################\n#############################################\n################################################\n##################################################\n####################################################\n#####################################################\n#####################################################\n####################################################\n##################################################\n################################################\n#############################################\n#########################################\n####################################\n################################\n###########################\n######################\n##################\n#############\n#########\n######\n####\n##\n#\n#\n##\n####\n######\n#########\n#############\n##################\n######################\n#############################\n##################################\n#######################################\n###########################################\n###############################################\n##################################################\n#####################################################\n#######################################################\n#########################################################\n#########################################################\n#########################################################\n#######################################################\n#####################################################\n##################################################\n###############################################\n###########################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n#\n#\n#\n###\n#####\n########\n###########\n###############\n###################\n########################\n###############################\n####################################\n#########################################\n#############################################\n#################################################\n#####################################################\n########################################################\n##########################################################\n############################################################\n#############################################################\n#############################################################\n############################################################\n##########################################################\n########################################################\n#####################################################\n#################################################\n#############################################\n#########################################\n####################################\n###############################\n##########################\n#####################\n#################\n#############\n#########\n######\n####\n##\n#\n#\n##\n####\n######\n#########\n#############\n#################\n#####################\n##########################\n#################################\n######################################\n###########################################\n################################################\n####################################################\n########################################################\n###########################################################\n##############################################################\n###############################################################\n#################################################################\n#################################################################\n#################################################################\n###############################################################\n##############################################################\n###########################################################\n########################################################\n####################################################\n################################################\n###########################################\n######################################\n#################################\n############################\n#######################\n##################\n##############\n##########\n#######\n####\n###\n#\n#\n#\n###\n####\n#######\n##########\n##############\n##################\n#######################\n############################\n###################################\n########################################\n#############################################\n##################################################\n######################################################\n##########################################################\n##############################################################\n################################################################\n###################################################################\n####################################################################\n#####################################################################\n#####################################################################\n####################################################################\n###################################################################\n################################################################\n##############################################################\n##########################################################\n######################################################\n##################################################\n#############################################\n########################################\n###################################\n##############################\n#########################\n####################\n################\n############\n########\n######\n###\n##\n#\n#\n##\n###\n######\n########\n############\n################\n####################\n#########################\n##############################\n#####################################\n##########################################\n###############################################\n####################################################\n########################################################\n#############################################################\n################################################################\n###################################################################\n######################################################################\n########################################################################\n#########################################################################\n#########################################################################\n#########################################################################\n########################################################################\n######################################################################\n###################################################################\n################################################################\n#############################################################\n########################################################\n####################################################\n###############################################\n##########################################\n#####################################\n################################\n###########################\n######################\n##################\n#############\n##########\n#######\n####\n##\n#\n#\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n#\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n#\n##\n###\n####\n#######\n##########\n#############\n##################\n######################\n###########################\n################################\n#######################################\n############################################\n#################################################\n######################################################\n###########################################################\n###############################################################\n###################################################################\n######################################################################\n#########################################################################\n###########################################################################\n############################################################################\n#############################################################################\n#############################################################################\n############################################################################\n###########################################################################\n#########################################################################\n######################################################################\n###################################################################\n###############################################################\n###########################################################\n######################################################\n#################################################\n############################################\n#######################################\n##################################\n#############################\n########################\n###################\n###############\n###########\n########\n#####\n###\n##\n#\n\n"
  },
  {
    "path": "web/faq.html",
    "content": "<details open><summary><strong>Which Python version is this for?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;Everything should work in the latest Python version, which is 3.12. Every feature that requires version higher than 3.9 has that mentioned in comments or brackets. There are only two such features, both requiring 3.10.<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;As of 12th March 2024, the only libraries whose latest version requires Python version higher than 3.8 are: numpy, pandas and matplotlib. They all require Python 3.9. This cheatsheet covers numpy version 2.0 (or higher) that was released on 16th June, 2024 and pandas version 2.0 (or higher) that was released on 3rd April 2023.\n</details><br>\n\n<details open><summary><strong>How to use it?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;This cheatsheet consists of minimal text and short examples so things are easy to find with <code>Ctrl+F</code> / <code>⌘F</code>. If you're on the webpage, searching for <code>'#&lt;name&gt;'</code> will only search for the titles. To get a link to a specific section click the grey hashtag next to the section's title before copying the address. To search for titles in the text editor use <code>^&lt;name&gt;</code> with enabled regular expressions option.<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;I also keep the Python console open at all times to test little snippets of code, to check out the available functions of a module using code completion and above all, to use <code>help(&lt;module/object/function/type/str&gt;)</code> command. If something is still unclear, then I search the Python docs by googling <code>'python docs &lt;module/function&gt;'</code>.<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;Recently I started using the ptpython REPL (Python console). It supports multiline editing, syntax validation, IDE-like autocompletion and syntax highlighting. It can be installed with <code>pip3 install ptpython</code>. Even more recently I switched to ipython REPL, which is very similar to ptpython only more responsive. It can be installed with <code>pip3 install ipython</code>.\n</details><br>\n\n<details open><summary><strong>What does the '&lt;type&gt;' signify?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;It is a placeholder for an object. It needs to be replaced by an expression, literal or a variable that returns/is of that type. However, if it is located on the left side of an assignment (<code>=</code>) then it signifies what type of object is produced/returned by the expression on the right side of the assignment.\n</details><br>\n\n<details open><summary><strong>Why the '&lt;type&gt;' semantics?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;It makes examples much less ambiguous.\n</details><br>\n\n<details open><summary><strong>What exactly is <code>&lt;el&gt;</code>?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;El is short for element and can be any object, but it usually denotes an object that is an item of a collection.\n</details><br>\n\n<details open><summary><strong>What exactly is <code>&lt;collection&gt;</code>?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;Collection is my name for an iterable object. An iterable object in Python is any object that has at least one of iter() and getitem() special methods defined. By convention, <code>&lt;object&gt;.__iter__()</code> should return an iterator of object's items and <code>&lt;object&gt;.__getitem__(&lt;index&gt;)</code> an item at that index. I chose not to use the name iterable because it sounds scarier and more vague than collection, even though it has a precise definition.<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;To make matters a bit more confusing, an abstract base class called Iterable doesn't fully follow this definition. An expression <code>instanceof(&lt;object&gt;, collections.abc.Iterable)</code> only checks whether an object has iter() special method, disregarding the getitem().<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;Although collection has no definition in Python's <a href=\"https://docs.python.org/3/glossary.html\">glossary</a>, there exists a Collection abstract base class. Expression <code>instanceof(&lt;object&gt;, collections.abc.Collection)</code> returns 'True' for any object that has len(), iter() and contains() special methods defined. <code>&lt;object&gt;.__len__()</code> should return the number of elements and <code>&lt;object&gt;.__contains__(&lt;el&gt;)</code> should check if object contains the passed element.\n</details><br>\n\n<details open><summary><strong>What about PEP 8?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;Check out <a href=\"https://google.github.io/styleguide/pyguide.html\">Google Style Guide</a> and use <code>Ctrl+Alt+L</code> / <code>⌥⌘L</code> shortcut in PyCharm to automatically reformat code.\n</details><br>\n\n<details open><summary><strong>Why are there no blank lines between method definitions?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;This way classes can be copy-pasted into the Python console, which would otherwise raise IndentationError.\n</details><br>\n\n<details open><summary><strong>Why are tests not covered?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;Check out <a href=\"https://docs.python-guide.org/writing/tests/\">The Hitchhiker’s Guide to Python</a> for a nice overview.\n</details><br>\n\n<details open><summary><strong>Django?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;Here is a nice <a href=\"https://github.com/kickstartcoding/cheatsheets/blob/master/build/topical/django.jpg\">Django cheatsheet</a>.\n</details><br>\n\n<details open><summary><strong>Why are there no concrete Regex examples?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;Regular expressions are a separate technology that is independent from Python. There are many resources available online.\n</details><br>\n\n<details open><summary><strong>Why are descriptors not covered?</strong></summary><br>\n&nbsp;&nbsp;&nbsp;&nbsp;Because property decorator is sufficient for everyday use.\n</details><br>"
  },
  {
    "path": "web/script_2.js",
    "content": "const TOC =\n  '<strong>ToC</strong> = {\\n' +\n  '    <strong><span class=\"hljs-string\">\\'1. Collections\\'</span></strong>: [<a href=\"#list\">List</a>, <a href=\"#dictionary\">Dictionary</a>, <a href=\"#set\">Set</a>, <a href=\"#tuple\">Tuple</a>, <a href=\"#range\">Range</a>, <a href=\"#enumerate\">Enumerate</a>, <a href=\"#iterator\">Iterator</a>, <a href=\"#generator\">Generator</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'2. Types\\'</span></strong>:       [<a href=\"#type\">Type</a>, <a href=\"#string\">String</a>, <a href=\"#regex\">Regular_Exp</a>, <a href=\"#format\">Format</a>, <a href=\"#numbers\">Numbers</a>, <a href=\"#combinatorics\">Combinatorics</a>, <a href=\"#datetime\">Datetime</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'3. Syntax\\'</span></strong>:      [<a href=\"#function\">Function</a>, <a href=\"#inline\">Inline</a>, <a href=\"#imports\">Import</a>, <a href=\"#decorator\">Decorator</a>, <a href=\"#class\">Class</a>, <a href=\"#ducktypes\">Duck_Type</a>, <a href=\"#enum\">Enum</a>, <a href=\"#exceptions\">Except</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'4. System\\'</span></strong>:      [<a href=\"#exit\">Exit</a>, <a href=\"#print\">Print</a>, <a href=\"#input\">Input</a>, <a href=\"#commandlinearguments\">Command_Line_Arguments</a>, <a href=\"#open\">Open</a>, <a href=\"#paths\">Path</a>, <a href=\"#oscommands\">OS_Commands</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'5. Data\\'</span></strong>:        [<a href=\"#json\">JSON</a>, <a href=\"#pickle\">Pickle</a>, <a href=\"#csv\">CSV</a>, <a href=\"#sqlite\">SQLite</a>, <a href=\"#bytes\">Bytes</a>, <a href=\"#struct\">Struct</a>, <a href=\"#array\">Array</a>, <a href=\"#memoryview\">Memory_View</a>, <a href=\"#deque\">Deque</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'6. Advanced\\'</span></strong>:    [<a href=\"#operator\">Operator</a>, <a href=\"#matchstatement\">Match_Statement</a>, <a href=\"#logging\">Logging</a>, <a href=\"#introspection\">Introspection</a>, <a href=\"#threading\">Threads</a>, <a href=\"#asyncio\">Asyncio</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'7. Libraries\\'</span></strong>:   [<a href=\"#progressbar\">Progress_Bar</a>, <a href=\"#plot\">Plot</a>, <a href=\"#table\">Table</a>, <a href=\"#consoleapp\">Console_App</a>, <a href=\"#guiapp\">GUI</a>, <a href=\"#scraping\">Scraping</a>, <a href=\"#webapp\">Web</a>, <a href=\"#profiling\">Profile</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'8. Multimedia\\'</span></strong>:  [<a href=\"#numpy\">NumPy</a>, <a href=\"#image\">Image</a>, <a href=\"#animation\">Animation</a>, <a href=\"#audio\">Audio</a>, <a href=\"#synthesizer\">Synthesizer</a>, <a href=\"#pygame\">Pygame</a>, <a href=\"#pandas\">Pandas</a>, <a href=\"#plotly\">Plotly</a>]\\n' +\n  '}\\n';\n\nconst TOC_MOBILE =\n  '<strong>ToC</strong> = {\\n' +\n  '    <strong><span class=\"hljs-string\">\\'1. Collections\\'</span></strong>: [<a href=\"#list\">List</a>, <a href=\"#dictionary\">Dictionary</a>, <a href=\"#set\">Set</a>,\\n' +\n  '                       <a href=\"#tuple\">Tuple</a>, <a href=\"#range\">Range</a>, <a href=\"#enumerate\">Enumerate</a>,\\n' +\n  '                       <a href=\"#iterator\">Iterator</a>, <a href=\"#generator\">Generator</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'2. Types\\'</span></strong>:       [<a href=\"#type\">Type</a>, <a href=\"#string\">String</a>, <a href=\"#regex\">Regular_Exp</a>,\\n' +\n  '                       <a href=\"#format\">Format</a>, <a href=\"#numbers\">Numbers</a>,\\n' +\n  '                       <a href=\"#combinatorics\">Combinatorics</a>, <a href=\"#datetime\">Datetime</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'3. Syntax\\'</span></strong>:      [<a href=\"#function\">Function</a>, <a href=\"#inline\">Inline</a>, <a href=\"#imports\">Import</a>,\\n' +\n  '                       <a href=\"#decorator\">Decorator</a>, <a href=\"#class\">Class</a>,\\n' +\n  '                       <a href=\"#ducktypes\">Duck_Types</a>, <a href=\"#enum\">Enum</a>, <a href=\"#exceptions\">Except</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'4. System\\'</span></strong>:      [<a href=\"#exit\">Exit</a>, <a href=\"#print\">Print</a>, <a href=\"#input\">Input</a>,\\n' +\n  '                       <a href=\"#commandlinearguments\">Command_Line_Arguments</a>,\\n' +\n  '                       <a href=\"#open\">Open</a>, <a href=\"#paths\">Paths</a>, <a href=\"#oscommands\">OS_Commands</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'5. Data\\'</span></strong>:        [<a href=\"#json\">JSON</a>, <a href=\"#pickle\">Pickle</a>, <a href=\"#csv\">CSV</a>, <a href=\"#sqlite\">SQLite</a>,\\n' +\n  '                       <a href=\"#bytes\">Bytes</a>, <a href=\"#struct\">Struct</a>, <a href=\"#array\">Array</a>,\\n' +\n  '                       <a href=\"#memoryview\">Memory_View</a>, <a href=\"#deque\">Deque</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'6. Advanced\\'</span></strong>:    [<a href=\"#operator\">Operator</a>, <a href=\"#matchstatement\">Match_Statement</a>,\\n' +\n  '                       <a href=\"#logging\">Logging</a>, <a href=\"#introspection\">Introspection</a>,\\n' +\n  '                       <a href=\"#threading\">Threading</a>, <a href=\"#asyncio\">Asyncio</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'7. Libraries\\'</span></strong>:   [<a href=\"#progressbar\">Progress_Bar</a>, <a href=\"#plot\">Plot</a>, <a href=\"#table\">Table</a>,\\n' +\n  '                       <a href=\"#consoleapp\">Console_App</a>, <a href=\"#guiapp\">GUI_App</a>,\\n' +\n  '                       <a href=\"#scraping\">Scraping</a>, <a href=\"#webapp\">Web</a>, <a href=\"#profiling\">Profiling</a>],\\n' +\n  '    <strong><span class=\"hljs-string\">\\'8. Multimedia\\'</span></strong>:  [<a href=\"#numpy\">NumPy</a>, <a href=\"#image\">Image</a>, <a href=\"#animation\">Animation</a>,\\n' +\n  '                       <a href=\"#audio\">Audio</a>, <a href=\"#synthesizer\">Synthesizer</a>,\\n' +\n  '                       <a href=\"#pygame\">Pygame</a>, <a href=\"#pandas\">Pandas</a>, <a href=\"#plotly\">Plotly</a>]\\n' +\n  '}\\n';\n\n\nvar iOS = /iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n\nif (iOS) {\n  var viewport_meta = document.getElementById('viewport-meta');\n  viewport_meta.setAttribute('content', \"initial-scale=0.55\");\n}\n\nvar isMobile = false;\n// Device detection:\nif(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) \n    || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(navigator.userAgent.substr(0,4))) { \n  isMobile = true;\n}\n\nvar TOC_SCREEN_WIDTH_CUTOFF = 667\nvar TOC_EM = '2em'\nvar TOC_EM_DESKTOP = '1.327em'\nvar PLOTLY_WIDTH_DESKTOP = 914\n\n\nfunction switch_to_mobile_view() {\n  $(`code:contains(ToC)`).html(TOC_MOBILE).css(\"line-height\", TOC_EM);\n  const body = document.querySelector(\"body\");\n  body.style[\"width\"] = `${TOC_SCREEN_WIDTH_CUTOFF+9}px`;\n  const plotlyDivs = document.querySelectorAll(\".plotly-graph-div\");\n  plotlyDivs.forEach((div) => {\n    div.style[\"width\"] = `${TOC_SCREEN_WIDTH_CUTOFF}px`;\n  });\n}\n\n\nfunction switch_to_desktop_view() {\n  $(`code:contains(ToC)`).html(TOC).css(\"line-height\", TOC_EM_DESKTOP);\n  const body = document.querySelector(\"body\");\n  body.style[\"width\"] = \"\";\n  const plotlyDivs = document.querySelectorAll(\".plotly-graph-div\");\n  plotlyDivs.forEach((div) => {\n    div.style[\"width\"] = `${PLOTLY_WIDTH_DESKTOP}px`;\n  });\n}\n\nif (isMobile && window.screen.width < TOC_SCREEN_WIDTH_CUTOFF) {\n  switch_to_mobile_view()\n}\n\nfunction updateToc() {\n  if (isMobile && window.screen.width < TOC_SCREEN_WIDTH_CUTOFF) {\n    switch_to_mobile_view();\n  } else {\n    switch_to_desktop_view();\n  }\n}\nwindow.addEventListener(\"orientationchange\", updateToc, false);\n\n// ===== Scroll to Top ==== \n$(window).scroll(function() {\n  if (isMobile && $(this).scrollTop() >= 480) {  // If mobile device and page is scrolled more than 520px.\n    $('#return-to-top').fadeIn(200);    // Fade in the arrow\n  } else {\n    $('#return-to-top').fadeOut(200);   // Else fade out the arrow\n  }\n});\n\n$('#return-to-top').click(function() {  // When arrow is clicked\n  $('body,html').animate({\n    scrollTop : 0                       // Scroll to top of body\n  }, 500);\n});\n"
  },
  {
    "path": "web/style.css",
    "content": "/* Copyright 2013 Michael Bostock. All rights reserved. Do not copy. */\n\n@import url(https://fonts.googleapis.com/css?family=PT+Serif|PT+Serif:b|PT+Serif:i|PT+Serif:bolditalic|PT+Sans|PT+Sans:b);\n\n.ocks-org body {\n  background: #fcfcfa;\n  color: #333;\n  font-family: \"PT Serif\", serif;\n  margin: 1em auto 4em auto;\n  position: relative;\n  width: 960px;\n  padding: 1rem;\n}\n\n.ocks-org header,\n.ocks-org footer,\n.ocks-org aside,\n.ocks-org h1,\n.ocks-org h2,\n.ocks-org h3,\n.ocks-org h4 {\n  font-family: \"PT Sans\", sans-serif;\n}\n\n.ocks-org h1,\n.ocks-org h2,\n.ocks-org h3,\n.ocks-org h4 {\n  color: #000;\n}\n\n.ocks-org header,\n.ocks-org footer {\n  color: #636363;\n}\n\nh1 {\n  font-size: 64px;\n  font-weight: 300;\n  letter-spacing: -2px;\n  margin: 0.3em 0 0.1em 0;\n}\n\nh2 {\n  margin-top: 2em;\n}\n\nh1,\nh2 {\n  text-rendering: optimizeLegibility;\n}\n\nh2 a[name],\nh2 a[id] {\n  color: #ccc;\n  padding-right: 0.3em;\n}\n\nheader,\nfooter {\n  font-size: small;\n}\n\n.ocks-org header aside,\n.ocks-org footer aside {\n  float: left;\n  margin-right: 0.5em;\n}\n\n.ocks-org header aside:after,\n.ocks-org footer aside:after {\n  padding-left: 0.5em;\n  content: \"/\";\n}\n\nfooter {\n  margin-top: 6em;\n}\n\nh1 ~ aside {\n  font-size: small;\n  right: 0;\n  position: absolute;\n  width: 180px;\n}\n\n.attribution {\n  font-size: small;\n  margin-bottom: 2em;\n}\n\nbody > p,\nli > p,\ndiv > p {\n  line-height: 1.5em;\n}\n\nbody > p,\ndiv > p {\n  width: 720px;\n}\n\nbody > blockquote {\n  width: 640px;\n}\n\nblockquote q {\n  display: block;\n  font-style: oblique;\n}\n\nul {\n  padding: 0;\n}\n\nli {\n  width: 690px;\n  margin-left: 30px;\n}\n\na {\n  color: steelblue;\n}\n\na:not(:hover) {\n  text-decoration: none;\n}\n\npre,\ncode,\ntextarea {\n  font-family: \"Menlo\", \"Menlo Web\", \"Menlo Web ss\", monospace;\n}\n\ncode {\n  line-height: 1em;\n}\n\ntextarea {\n  font-size: 100%;\n}\n\npre {\n  border-left: solid 2px #ccc;\n  padding-left: 18px;\n  margin: 2em 0 2em 0;\n}\n\n.html .value,\n.javascript .string,\n.javascript .regexp {\n  color: #756bb1;\n}\n\n.html .tag,\n.css .tag,\n.javascript .keyword {\n  color: #3182bd;\n}\n\n.comment {\n  color: #636363;\n}\n\n.html .doctype,\n.javascript .number {\n  color: #31a354;\n}\n\n.html .attribute,\n.css .attribute,\n.javascript .class,\n.javascript .special {\n  color: #e6550d;\n}\n\nsvg {\n  font: 10px sans-serif;\n}\n\n.axis path,\n.axis line {\n  fill: none;\n  stroke: #000;\n  shape-rendering: crispEdges;\n}\n\nsup,\nsub {\n  line-height: 0;\n}\n\nq:before {\n  content: \"â€œ\";\n}\n\nq:after {\n  content: \"â€\";\n}\n\nblockquote q {\n  line-height: 1.5em;\n  display: inline;\n}\n\nblockquote q:before,\nblockquote q:after {\n  content: \"\";\n}\n\nh3,\nh4,\np,\nul {\n  padding-left: 1.2rem;\n}\n\n.banner {\n  padding: 0;\n}\n\n#toc {\n  margin-top: 0;\n}\n\n@media only screen and (max-device-width: 1023px) {\n  .ocks-org body {\n    font-size: 72%;\n    padding: 0.5rem;\n  }\n\n  body > p,\n  div > p {\n    width: 90vw !important;\n  }\n\n  li {\n    width: 82vw;\n  }\n\n  h3,\n  h4,\n  p,\n  ul {\n    padding-left: .7rem;\n    width: 90vw;\n  }\n\n  h1 {\n    font-size: 2rem;\n  }\n\n  pre {\n    padding-left: 0.5rem;\n  }\n\n  .banner,\n  h1,\n  img {\n    max-width: calc(100vw - 2em);\n    min-width: calc(100vw - 2em);\n  }\n}\n\n\n/*@import url(web/style.css);*/\n\n@font-face {font-family: \"Menlo web\";\n  src: url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01.woff2\") format(\"woff2\"), /* chrome、firefox */\n  url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01.woff\") format(\"woff\");\n  font-weight: normal;\n}\n\n@font-face {font-family: \"Menlo web\";\n  src: url(\"OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88\\\\Menlo Bold\\\\@font-face\\\\a6ffc5d72a96b65159e710ea6d258ba4.woff2\") format(\"woff2\"), /* chrome、firefox */\n  url(\"OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88\\\\Menlo Bold\\\\@font-face\\\\a6ffc5d72a96b65159e710ea6d258ba4.woff\") format(\"woff\");\n  font-weight: bold;\n}\n\n@font-face {font-family: \"Menlo web ss\";\n  src: url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01-ss2.woff\") format(\"woff\");\n  font-weight: normal;\n}\n\n@font-face {font-family: \"PT Serif\";\n  src: url(\"fonts\\\\EJRSQgYoZZY2vCFuvAnt66qSVys.woff2\") format(\"woff2\");\n  font-weight: bold;\n}\n\n.join,\n.link,\n.node rect {\n  fill: none;\n  stroke: #636363;\n  stroke-width: 1.5px;\n}\n\n.link {\n  stroke: #969696;\n}\n\n.node rect {\n  fill: white;\n}\n\n.link path,\n.node rect,\n.node text,\n.join {\n  -webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n}\n\n.node .element rect {\n  fill: #bdbdbd;\n  stroke: none;\n}\n\n.node .null rect {\n  fill: none;\n  stroke: none;\n}\n\n.node .null text {\n  fill: #636363;\n}\n\n.node .selection rect {\n  stroke: #e6550d;\n}\n\n.node .data rect {\n  stroke: #3182bd;\n}\n\n.node .datum rect {\n  fill: #d9d9d9;\n  stroke: none;\n}\n\n.node .code text {\n  font-family: monospace;\n}\n\n.node .key rect {\n  fill: #a1d99b;\n  stroke: none;\n}\n\n.link .to-key,\n.join {\n  stroke: #a1d99b;\n}\n\n.join {\n  stroke-dasharray: 2,2;\n}\n\n.link .to-null {\n  stroke-dasharray: .5,3.5;\n  stroke-linecap: round;\n}\n\n.link .from-data {\n  stroke: #3182bd;\n}\n\n.play circle {\n  fill: #fff;\n  stroke: #000;\n  stroke-width: 3px;\n}\n\n.play:hover path {\n  fill: #f00;\n}\n\n.play.mousedown circle {\n  fill: #f00;\n}\n\n.play.mousedown path {\n  fill: #fff;\n}\n\n.play rect {\n  fill: none;\n  pointer-events: all;\n  cursor: pointer;\n}\n\ncode span {\n  -webkit-transition: background 250ms linear;\n  -moz-transition: background 250ms linear;\n  -ms-transition: background 250ms linear;\n  -o-transition: background 250ms linear;\n  transition: background 250ms linear;\n}\n\npre.prettyprint, code.prettyprint {\n  background-color: #222;\n  border-radius: 8px;\n  font-size: 15px;\n}\n\npre.prettyprint {\n  width: 90%;\n  margin: 0.5em;\n  padding: 1em;\n  white-space: pre-wrap;\n}\n\n#return-to-top {\n  position: fixed;\n  bottom: 20px;\n  right: 20px;\n  background: rgb(0, 0, 0);\n  background: rgba(0, 0, 0, 0.2);\n  width: 50px;\n  height: 50px;\n  display: block;\n  text-decoration: none;\n  -webkit-border-radius: 35px;\n  -moz-border-radius: 35px;\n  border-radius: 35px;\n  display: none;\n  -webkit-transition: all 0.3s linear;\n  -moz-transition: all 0.3s ease;\n  -ms-transition: all 0.3s ease;\n  -o-transition: all 0.3s ease;\n  transition: all 0.3s ease;\n}\n\n#return-to-top i {\n  color: #fff;\n  margin: 0;\n  position: relative;\n  left: 16px;\n  top: 13px;\n  font-size: 19px;\n  -webkit-transition: all 0.3s ease;\n  -moz-transition: all 0.3s ease;\n  -ms-transition: all 0.3s ease;\n  -o-transition: all 0.3s ease;\n  transition: all 0.3s ease;\n}\n\n#return-to-top:hover {\n  background: rgba(0, 0, 0, 0.35);\n}\n\n#return-to-top:hover i {\n   color: #f0f0f0;\n}\n\n@media print {\n  .pagebreak { \n    page-break-before: always; \n  } \n  div {\n    page-break-inside: avoid;\n  }\n  pre {\n    page-break-inside: avoid;\n  }\n}\n\n.modebar{\n  display: none !important;\n}"
  },
  {
    "path": "web/style_dark.css",
    "content": "/* Copyright 2013 Michael Bostock. All rights reserved. Do not copy. */\n\n@import url(https://fonts.googleapis.com/css?family=PT+Serif|PT+Serif:b|PT+Serif:i|PT+Sans|PT+Sans:b);\n\n.ocks-org body {\n  background: hsl(206deg 47% 9%);\n  color: hsl(0deg 0% 72%);\n  font-family: \"PT Serif\", serif;\n  margin: 1em auto 4em auto;\n  position: relative;\n  width: 960px;\n  padding: 1rem;\n}\n\n.ocks-org header,\n.ocks-org footer,\n.ocks-org aside,\n.ocks-org h1,\n.ocks-org h2,\n.ocks-org h3,\n.ocks-org h4 {\n  font-family: \"PT Sans\", sans-serif;\n}\n\n.ocks-org h1,\n.ocks-org h2,\n.ocks-org h3,\n.ocks-org h4 {\n  color: hsl(0deg 1% 71%);\n}\n\n.ocks-org header,\n.ocks-org footer {\n  color: #636363;\n}\n\nh1 {\n  font-size: 67px;\n  font-weight: 300;\n  letter-spacing: -2px;\n  margin: 0.3em 0 0.1em 0;\n}\n\nh2 {\n  margin-top: 2em;\n}\n\nh1,\nh2 {\n  text-rendering: optimizeLegibility;\n}\n\nh2 a[name],\nh2 a[id] {\n  color: hsl(0deg 0% 63% / 49%);\n  padding-right: 0.3em;\n}\n\nheader,\nfooter {\n  font-size: small;\n}\n\n.ocks-org header aside,\n.ocks-org footer aside {\n  float: left;\n  margin-right: 0.5em;\n}\n\n.ocks-org header aside:after,\n.ocks-org footer aside:after {\n  padding-left: 0.5em;\n  content: \"/\";\n}\n\nfooter {\n  margin-top: 6em;\n}\n\nh1 ~ aside {\n  font-size: small;\n  right: 0;\n  position: absolute;\n  width: 180px;\n}\n\n.attribution {\n  font-size: small;\n  margin-bottom: 2em;\n}\n\nbody > p,\nli > p,\ndiv > p {\n  line-height: 1.5em;\n}\n\nbody > p,\ndiv > p {\n  width: 720px;\n}\n\nbody > blockquote {\n  width: 640px;\n}\n\nblockquote q {\n  display: block;\n  font-style: oblique;\n}\n\nul {\n  padding: 0;\n}\n\nli {\n  width: 690px;\n  margin-left: 30px;\n}\n\na {\n  color: steelblue;\n}\n\na:not(:hover) {\n  text-decoration: none;\n}\n\npre,\ncode,\ntextarea {\n  font-family: \"Menlo\", \"Menlo Web\", monospace;\n}\n\ncode {\n  line-height: 1em;\n}\n\ntextarea {\n  font-size: 100%;\n}\n\npre {\n  border-left: solid 2px hsl(206deg 34% 14%);\n  padding-left: 18px;\n  margin: 1em 0 1em 0;\n  background: hsl(206deg 34% 14%);\n  border-radius: 6px;\n  padding-top: 16px;\n  padding-bottom: 16px;\n}\n\n.html .value,\n.javascript .string,\n.javascript .regexp {\n  color: #756bb1;\n}\n\n.html .tag,\n.css .tag,\n.javascript .keyword {\n  color: #3182bd;\n}\n\n.comment {\n  color: #636363;\n}\n\n.html .doctype,\n.javascript .number {\n  color: #31a354;\n}\n\n.html .attribute,\n.css .attribute,\n.javascript .class,\n.javascript .special {\n  color: #e6550d;\n}\n\nsvg {\n  font: 10px sans-serif;\n}\n\n.axis path,\n.axis line {\n  fill: none;\n  stroke: #000;\n  shape-rendering: crispEdges;\n}\n\nsup,\nsub {\n  line-height: 0;\n}\n\nq:before {\n  content: \"â€œ\";\n}\n\nq:after {\n  content: \"â€\";\n}\n\nblockquote q {\n  line-height: 1.5em;\n  display: inline;\n}\n\nblockquote q:before,\nblockquote q:after {\n  content: \"\";\n}\n\nh3,\nh4,\np,\nul {\n  padding-left: 1.2rem;\n}\n\n.banner {\n  padding: 0;\n}\n\n#toc {\n  margin-top: 0;\n}\n\n@media only screen and (max-device-width: 1023px) {\n  .ocks-org body {\n    font-size: 72%;\n    padding: 0.5rem;\n  }\n\n  body > p,\n  div > p {\n    width: 90vw !important;\n  }\n\n  li {\n    width: 82vw;\n  }\n\n  h3,\n  h4,\n  p,\n  ul {\n    padding-left: .7rem;\n    width: 90vw;\n  }\n\n  h1 {\n    font-size: 2rem;\n  }\n\n  pre {\n    padding-left: 0.5rem;\n  }\n\n  .banner,\n  h1,\n  img {\n    max-width: calc(100vw - 2em);\n    min-width: calc(100vw - 2em);\n  }\n}\n\n\n\n\n\n/*@import url(web/style.css);*/\n\n@font-face {font-family: \"Menlo web\";\n  src: url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01.woff2\") format(\"woff2\"), /* chrome、firefox */\n  url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01.woff\") format(\"woff\");\n  font-weight: normal;\n}\n\n@font-face {font-family: \"Menlo web\";\n  src: url(\"OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88\\\\Menlo Bold\\\\@font-face\\\\a6ffc5d72a96b65159e710ea6d258ba4.woff2\") format(\"woff2\"), /* chrome、firefox */\n  url(\"OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88\\\\Menlo Bold\\\\@font-face\\\\a6ffc5d72a96b65159e710ea6d258ba4.woff\") format(\"woff\");\n  font-weight: bold;\n}\n\n.join,\n.link,\n.node rect {\n  fill: none;\n  stroke: #636363;\n  stroke-width: 1.5px;\n}\n\n.link {\n  stroke: #969696;\n}\n\n.node rect {\n  fill: white;\n}\n\n.link path,\n.node rect,\n.node text,\n.join {\n  -webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n}\n\n.node .element rect {\n  fill: #bdbdbd;\n  stroke: none;\n}\n\n.node .null rect {\n  fill: none;\n  stroke: none;\n}\n\n.node .null text {\n  fill: #636363;\n}\n\n.node .selection rect {\n  stroke: #e6550d;\n}\n\n.node .data rect {\n  stroke: #3182bd;\n}\n\n.node .datum rect {\n  fill: #d9d9d9;\n  stroke: none;\n}\n\n.node .code text {\n  font-family: monospace;\n  color: hsl(0deg 0% 74%)\n}\n\n.node .key rect {\n  fill: #a1d99b;\n  stroke: none;\n}\n\n.link .to-key,\n.join {\n  stroke: #a1d99b;\n}\n\n.join {\n  stroke-dasharray: 2,2;\n}\n\n.link .to-null {\n  stroke-dasharray: .5,3.5;\n  stroke-linecap: round;\n}\n\n.link .from-data {\n  stroke: #3182bd;\n}\n\n.play circle {\n  fill: #fff;\n  stroke: #000;\n  stroke-width: 3px;\n}\n\n.play:hover path {\n  fill: #f00;\n}\n\n.play.mousedown circle {\n  fill: #f00;\n}\n\n.play.mousedown path {\n  fill: #fff;\n}\n\n.play rect {\n  fill: none;\n  pointer-events: all;\n  cursor: pointer;\n}\n\ncode span {\n  -webkit-transition: background 250ms linear;\n  -moz-transition: background 250ms linear;\n  -ms-transition: background 250ms linear;\n  -o-transition: background 250ms linear;\n  transition: background 250ms linear;\n}\n\npre.prettyprint, code.prettyprint {\n  background-color: #222;\n  border-radius: 8px;\n  font-size: 15px;\n}\n\npre.prettyprint {\n  width: 90%;\n  margin: 0.5em;\n  padding: 1em;\n  white-space: pre-wrap;\n}\n\n#return-to-top {\n  position: fixed;\n  bottom: 20px;\n  right: 20px;\n  background: rgb(0, 0, 0);\n  background: rgba(0, 0, 0, 0.2);\n  width: 50px;\n  height: 50px;\n  display: block;\n  text-decoration: none;\n  -webkit-border-radius: 35px;\n  -moz-border-radius: 35px;\n  border-radius: 35px;\n  display: none;\n  -webkit-transition: all 0.3s linear;\n  -moz-transition: all 0.3s ease;\n  -ms-transition: all 0.3s ease;\n  -o-transition: all 0.3s ease;\n  transition: all 0.3s ease;\n}\n\n#return-to-top i {\n  color: #fff;\n  margin: 0;\n  position: relative;\n  left: 16px;\n  top: 13px;\n  font-size: 19px;\n  -webkit-transition: all 0.3s ease;\n  -moz-transition: all 0.3s ease;\n  -ms-transition: all 0.3s ease;\n  -o-transition: all 0.3s ease;\n  transition: all 0.3s ease;\n}\n\n#return-to-top:hover {\n  background: rgba(0, 0, 0, 0.35);\n}\n\n#return-to-top:hover i {\n   color: #f0f0f0;\n}\n\n@media print {\n  .pagebreak { \n    page-break-before: always; \n  } \n  div {\n    page-break-inside: avoid;\n  }\n  pre {\n    page-break-inside: avoid;\n  }\n}\n\n.modebar{\n  display: none !important;\n}"
  },
  {
    "path": "web/style_dark1.css",
    "content": "/* Copyright 2013 Michael Bostock. All rights reserved. Do not copy. */\n\n@import url(https://fonts.googleapis.com/css?family=PT+Serif|PT+Serif:b|PT+Serif:i|PT+Sans|PT+Sans:b);\n\n.ocks-org body {\n  background: hsl(206deg 47% 9%);\n  color: hsl(0deg 0% 72%);\n  font-family: \"PT Serif\", serif;\n  margin: 1em auto 4em auto;\n  position: relative;\n  width: 960px;\n  padding: 1rem;\n}\n\n.ocks-org header,\n.ocks-org footer,\n.ocks-org aside,\n.ocks-org h1,\n.ocks-org h2,\n.ocks-org h3,\n.ocks-org h4 {\n  font-family: \"PT Sans\", sans-serif;\n}\n\n.ocks-org h1,\n.ocks-org h2,\n.ocks-org h3,\n.ocks-org h4 {\n  color: hsl(0deg 1% 77%);\n}\n\n.ocks-org header,\n.ocks-org footer {\n  color: #636363;\n}\n\nh1 {\n  font-size: 67px;\n  font-weight: 300;\n  letter-spacing: -2px;\n  margin: 0.3em 0 0.1em 0;\n}\n\nh2 {\n  margin-top: 2em;\n}\n\nh1,\nh2 {\n  text-rendering: optimizeLegibility;\n}\n\nh2 a[name],\nh2 a[id] {\n  color: hsl(0deg 0% 75% / 49%);\n  padding-right: 0.3em;\n}\n\nheader,\nfooter {\n  font-size: small;\n}\n\n.ocks-org header aside,\n.ocks-org footer aside {\n  float: left;\n  margin-right: 0.5em;\n}\n\n.ocks-org header aside:after,\n.ocks-org footer aside:after {\n  padding-left: 0.5em;\n  content: \"/\";\n}\n\nfooter {\n  margin-top: 6em;\n}\n\nh1 ~ aside {\n  font-size: small;\n  right: 0;\n  position: absolute;\n  width: 180px;\n}\n\n.attribution {\n  font-size: small;\n  margin-bottom: 2em;\n}\n\nbody > p,\nli > p,\ndiv > p {\n  line-height: 1.5em;\n}\n\nbody > p,\ndiv > p {\n  width: 720px;\n}\n\nbody > blockquote {\n  width: 640px;\n}\n\nblockquote q {\n  display: block;\n  font-style: oblique;\n}\n\nul {\n  padding: 0;\n}\n\nli {\n  width: 690px;\n  margin-left: 30px;\n}\n\na {\n  color: steelblue;\n}\n\na:not(:hover) {\n  text-decoration: none;\n}\n\npre,\ncode,\ntextarea {\n  font-family: \"Menlo\", \"Menlo Web\", monospace;\n}\n\ncode {\n  line-height: 1em;\n  color: hsl(0deg 0% 96% / 65%);\n}\n\ntextarea {\n  font-size: 100%;\n}\n\npre {\n  border-left: solid 2px hsl(206deg 34% 14%);\n  padding-left: 18px;\n  margin: 1em 0 1em 0;\n  background: hsl(206deg 34% 14%);\n  border-radius: 6px;\n  padding-top: 16px;\n  padding-bottom: 16px;\n}\n\n.html .value,\n.javascript .string,\n.javascript .regexp {\n  color: #756bb1;\n}\n\n.html .tag,\n.css .tag,\n.javascript .keyword {\n  color: #3182bd;\n}\n\n.comment {\n  color: #636363;\n}\n\n.html .doctype,\n.javascript .number {\n  color: #31a354;\n}\n\n.html .attribute,\n.css .attribute,\n.javascript .class,\n.javascript .special {\n  color: #e6550d;\n}\n\nsvg {\n  font: 10px sans-serif;\n}\n\n.axis path,\n.axis line {\n  fill: none;\n  stroke: #000;\n  shape-rendering: crispEdges;\n}\n\nsup,\nsub {\n  line-height: 0;\n}\n\nq:before {\n  content: \"â€œ\";\n}\n\nq:after {\n  content: \"â€\";\n}\n\nblockquote q {\n  line-height: 1.5em;\n  display: inline;\n}\n\nblockquote q:before,\nblockquote q:after {\n  content: \"\";\n}\n\nh3,\nh4,\np,\nul {\n  padding-left: 1.2rem;\n}\n\n.banner {\n  padding: 0;\n}\n\n#toc {\n  margin-top: 0;\n}\n\n@media only screen and (max-device-width: 1023px) {\n  .ocks-org body {\n    font-size: 72%;\n    padding: 0.5rem;\n  }\n\n  body > p,\n  div > p {\n    width: 90vw !important;\n  }\n\n  li {\n    width: 82vw;\n  }\n\n  h3,\n  h4,\n  p,\n  ul {\n    padding-left: .7rem;\n    width: 90vw;\n  }\n\n  h1 {\n    font-size: 2rem;\n  }\n\n  pre {\n    padding-left: 0.5rem;\n  }\n\n  .banner,\n  h1,\n  img {\n    max-width: calc(100vw - 2em);\n    min-width: calc(100vw - 2em);\n  }\n}\n\n\n\n\n\n/*@import url(web/style.css);*/\n\n@font-face {font-family: \"Menlo web\";\n  src: url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01.woff2\") format(\"woff2\"), /* chrome、firefox */\n  url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01.woff\") format(\"woff\");\n  font-weight: normal;\n}\n\n@font-face {font-family: \"Menlo web\";\n  src: url(\"OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88\\\\Menlo Bold\\\\@font-face\\\\a6ffc5d72a96b65159e710ea6d258ba4.woff2\") format(\"woff2\"), /* chrome、firefox */\n  url(\"OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88\\\\Menlo Bold\\\\@font-face\\\\a6ffc5d72a96b65159e710ea6d258ba4.woff\") format(\"woff\");\n  font-weight: bold;\n}\n\n.join,\n.link,\n.node rect {\n  fill: none;\n  stroke: #636363;\n  stroke-width: 1.5px;\n}\n\n.link {\n  stroke: #969696;\n}\n\n.node rect {\n  fill: white;\n}\n\n.link path,\n.node rect,\n.node text,\n.join {\n  -webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n}\n\n.node .element rect {\n  fill: #bdbdbd;\n  stroke: none;\n}\n\n.node .null rect {\n  fill: none;\n  stroke: none;\n}\n\n.node .null text {\n  fill: #636363;\n}\n\n.node .selection rect {\n  stroke: #e6550d;\n}\n\n.node .data rect {\n  stroke: #3182bd;\n}\n\n.node .datum rect {\n  fill: #d9d9d9;\n  stroke: none;\n}\n\n.node .code text {\n  font-family: monospace;\n  color: hsl(0deg 0% 74%)\n}\n\n.node .key rect {\n  fill: #a1d99b;\n  stroke: none;\n}\n\n.link .to-key,\n.join {\n  stroke: #a1d99b;\n}\n\n.join {\n  stroke-dasharray: 2,2;\n}\n\n.link .to-null {\n  stroke-dasharray: .5,3.5;\n  stroke-linecap: round;\n}\n\n.link .from-data {\n  stroke: #3182bd;\n}\n\n.play circle {\n  fill: #fff;\n  stroke: #000;\n  stroke-width: 3px;\n}\n\n.play:hover path {\n  fill: #f00;\n}\n\n.play.mousedown circle {\n  fill: #f00;\n}\n\n.play.mousedown path {\n  fill: #fff;\n}\n\n.play rect {\n  fill: none;\n  pointer-events: all;\n  cursor: pointer;\n}\n\ncode span {\n  -webkit-transition: background 250ms linear;\n  -moz-transition: background 250ms linear;\n  -ms-transition: background 250ms linear;\n  -o-transition: background 250ms linear;\n  transition: background 250ms linear;\n}\n\npre.prettyprint, code.prettyprint {\n  background-color: #222;\n  border-radius: 8px;\n  font-size: 15px;\n}\n\npre.prettyprint {\n  width: 90%;\n  margin: 0.5em;\n  padding: 1em;\n  white-space: pre-wrap;\n}\n\n#return-to-top {\n  position: fixed;\n  bottom: 20px;\n  right: 20px;\n  background: rgb(0, 0, 0);\n  background: rgba(0, 0, 0, 0.2);\n  width: 50px;\n  height: 50px;\n  display: block;\n  text-decoration: none;\n  -webkit-border-radius: 35px;\n  -moz-border-radius: 35px;\n  border-radius: 35px;\n  display: none;\n  -webkit-transition: all 0.3s linear;\n  -moz-transition: all 0.3s ease;\n  -ms-transition: all 0.3s ease;\n  -o-transition: all 0.3s ease;\n  transition: all 0.3s ease;\n}\n\n#return-to-top i {\n  color: #fff;\n  margin: 0;\n  position: relative;\n  left: 16px;\n  top: 13px;\n  font-size: 19px;\n  -webkit-transition: all 0.3s ease;\n  -moz-transition: all 0.3s ease;\n  -ms-transition: all 0.3s ease;\n  -o-transition: all 0.3s ease;\n  transition: all 0.3s ease;\n}\n\n#return-to-top:hover {\n  background: rgba(0, 0, 0, 0.35);\n}\n\n#return-to-top:hover i {\n   color: #f0f0f0;\n}\n\n@media print {\n  .pagebreak { \n    page-break-before: always; \n  } \n  div {\n    page-break-inside: avoid;\n  }\n  pre {\n    page-break-inside: avoid;\n  }\n}\n\n.modebar{\n  display: none !important;\n}"
  },
  {
    "path": "web/style_dark2.css",
    "content": "/* Copyright 2013 Michael Bostock. All rights reserved. Do not copy. */\n\n@import url(https://fonts.googleapis.com/css?family=PT+Serif|PT+Serif:b|PT+Serif:i|PT+Sans|PT+Sans:b);\n\n.ocks-org body {\n  background: hsl(206deg 47% 9%);\n  color: hsl(0deg 0% 72%);\n  font-family: \"PT Serif\", serif;\n  margin: 1em auto 4em auto;\n  position: relative;\n  width: 960px;\n  padding: 1rem;\n}\n\n.ocks-org header,\n.ocks-org footer,\n.ocks-org aside,\n.ocks-org h1,\n.ocks-org h2,\n.ocks-org h3,\n.ocks-org h4 {\n  font-family: \"PT Sans\", sans-serif;\n}\n\n.ocks-org h1,\n.ocks-org h2,\n.ocks-org h3,\n.ocks-org h4 {\n  color: hsl(0deg 1% 71%);\n}\n\n.ocks-org header,\n.ocks-org footer {\n  color: #999999;\n}\n\nh1 {\n  font-size: 64px;\n  font-weight: 300;\n  letter-spacing: -2px;\n  margin: 0.3em 0 0.1em 0;\n}\n\nh2 {\n  margin-top: 2em;\n}\n\nh1,\nh2 {\n  text-rendering: optimizeLegibility;\n}\n\nh2 a[name],\nh2 a[id] {\n  color: #5f5c5c;\n  padding-right: 0.3em;\n}\n\nheader,\nfooter {\n  font-size: small;\n}\n\n.ocks-org header aside,\n.ocks-org footer aside {\n  float: left;\n  margin-right: 0.5em;\n}\n\n.ocks-org header aside:after,\n.ocks-org footer aside:after {\n  padding-left: 0.5em;\n  content: \"/\";\n}\n\nfooter {\n  margin-top: 6em;\n}\n\nh1 ~ aside {\n  font-size: small;\n  right: 0;\n  position: absolute;\n  width: 180px;\n}\n\n.attribution {\n  font-size: small;\n  margin-bottom: 2em;\n}\n\nbody > p,\nli > p,\ndiv > p {\n  line-height: 1.5em;\n}\n\nbody > p,\ndiv > p {\n  width: 720px;\n}\n\nbody > blockquote {\n  width: 640px;\n}\n\nblockquote q {\n  display: block;\n  font-style: oblique;\n}\n\nul {\n  padding: 0;\n}\n\nli {\n  width: 690px;\n  margin-left: 30px;\n}\n\na {\n  color: hsl(187deg 100% 33%);\n}\n\na:not(:hover) {\n  text-decoration: none;\n}\n\npre,\ncode,\ntextarea {\n  font-family: \"Menlo\", \"Menlo Web\", monospace;\n}\n\ncode {\n  line-height: 1em;\n  color: hsl(0deg 0% 74%);\n}\n\ntextarea {\n  font-size: 100%;\n}\n\npre {\n  border-left: solid 2px #424242;\n  padding-left: 18px;\n  margin: 2em 0 2em 0;\n}\n\n.html .value,\n.javascript .string,\n.javascript .regexp {\n  color: #756bb1;\n}\n\n.html .tag,\n.css .tag,\n.javascript .keyword {\n  color: #3182bd;\n}\n\n.comment {\n  color: #636363;\n}\n\n.html .doctype,\n.javascript .number {\n  color: #31a354;\n}\n\n.html .attribute,\n.css .attribute,\n.javascript .class,\n.javascript .special {\n  color: #e6550d;\n}\n\nsvg {\n  font: 10px sans-serif;\n}\n\n.axis path,\n.axis line {\n  fill: none;\n  stroke: #000;\n  shape-rendering: crispEdges;\n}\n\nsup,\nsub {\n  line-height: 0;\n}\n\nq:before {\n  content: \"â€œ\";\n}\n\nq:after {\n  content: \"â€\";\n}\n\nblockquote q {\n  line-height: 1.5em;\n  display: inline;\n}\n\nblockquote q:before,\nblockquote q:after {\n  content: \"\";\n}\n\nh3,\nh4,\np,\nul {\n  padding-left: 1.2rem;\n}\n\n.banner {\n  padding: 0;\n}\n\n#toc {\n  margin-top: 0;\n}\n\n@media only screen and (max-device-width: 1023px) {\n  .ocks-org body {\n    font-size: 72%;\n    padding: 0.5rem;\n  }\n\n  body > p,\n  div > p {\n    width: 90vw !important;\n  }\n\n  li {\n    width: 82vw;\n  }\n\n  h3,\n  h4,\n  p,\n  ul {\n    padding-left: .7rem;\n    width: 90vw;\n  }\n\n  h1 {\n    font-size: 2rem;\n  }\n\n  pre {\n    padding-left: 0.5rem;\n  }\n\n  .banner,\n  h1,\n  img {\n    max-width: calc(100vw - 2em);\n    min-width: calc(100vw - 2em);\n  }\n}\n\n\n\n\n\n/*@import url(web/style.css);*/\n\n@font-face {font-family: \"Menlo web\";\n  src: url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01.woff2\") format(\"woff2\"), /* chrome、firefox */\n  url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01.woff\") format(\"woff\");\n  font-weight: normal;\n}\n\n@font-face {font-family: \"Menlo web\";\n  src: url(\"OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88\\\\Menlo Bold\\\\@font-face\\\\a6ffc5d72a96b65159e710ea6d258ba4.woff2\") format(\"woff2\"), /* chrome、firefox */\n  url(\"OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88\\\\Menlo Bold\\\\@font-face\\\\a6ffc5d72a96b65159e710ea6d258ba4.woff\") format(\"woff\");\n  font-weight: bold;\n}\n\n.join,\n.link,\n.node rect {\n  fill: none;\n  stroke: #636363;\n  stroke-width: 1.5px;\n}\n\n.link {\n  stroke: #969696;\n}\n\n.node rect {\n  fill: white;\n}\n\n.link path,\n.node rect,\n.node text,\n.join {\n  -webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n}\n\n.node .element rect {\n  fill: #bdbdbd;\n  stroke: none;\n}\n\n.node .null rect {\n  fill: none;\n  stroke: none;\n}\n\n.node .null text {\n  fill: #636363;\n}\n\n.node .selection rect {\n  stroke: #e6550d;\n}\n\n.node .data rect {\n  stroke: #3182bd;\n}\n\n.node .datum rect {\n  fill: #d9d9d9;\n  stroke: none;\n}\n\n.node .code text {\n  font-family: monospace;\n  color: hsl(0deg 0% 74%)\n}\n\n.node .key rect {\n  fill: #a1d99b;\n  stroke: none;\n}\n\n.link .to-key,\n.join {\n  stroke: #a1d99b;\n}\n\n.join {\n  stroke-dasharray: 2,2;\n}\n\n.link .to-null {\n  stroke-dasharray: .5,3.5;\n  stroke-linecap: round;\n}\n\n.link .from-data {\n  stroke: #3182bd;\n}\n\n.play circle {\n  fill: #fff;\n  stroke: #000;\n  stroke-width: 3px;\n}\n\n.play:hover path {\n  fill: #f00;\n}\n\n.play.mousedown circle {\n  fill: #f00;\n}\n\n.play.mousedown path {\n  fill: #fff;\n}\n\n.play rect {\n  fill: none;\n  pointer-events: all;\n  cursor: pointer;\n}\n\ncode span {\n  -webkit-transition: background 250ms linear;\n  -moz-transition: background 250ms linear;\n  -ms-transition: background 250ms linear;\n  -o-transition: background 250ms linear;\n  transition: background 250ms linear;\n}\n\npre.prettyprint, code.prettyprint {\n  background-color: #222;\n  border-radius: 8px;\n  font-size: 15px;\n}\n\npre.prettyprint {\n  width: 90%;\n  margin: 0.5em;\n  padding: 1em;\n  white-space: pre-wrap;\n}\n\n#return-to-top {\n  position: fixed;\n  bottom: 20px;\n  right: 20px;\n  background: rgb(0, 0, 0);\n  background: rgba(0, 0, 0, 0.2);\n  width: 50px;\n  height: 50px;\n  display: block;\n  text-decoration: none;\n  -webkit-border-radius: 35px;\n  -moz-border-radius: 35px;\n  border-radius: 35px;\n  display: none;\n  -webkit-transition: all 0.3s linear;\n  -moz-transition: all 0.3s ease;\n  -ms-transition: all 0.3s ease;\n  -o-transition: all 0.3s ease;\n  transition: all 0.3s ease;\n}\n\n#return-to-top i {\n  color: #fff;\n  margin: 0;\n  position: relative;\n  left: 16px;\n  top: 13px;\n  font-size: 19px;\n  -webkit-transition: all 0.3s ease;\n  -moz-transition: all 0.3s ease;\n  -ms-transition: all 0.3s ease;\n  -o-transition: all 0.3s ease;\n  transition: all 0.3s ease;\n}\n\n#return-to-top:hover {\n  background: rgba(0, 0, 0, 0.35);\n}\n\n#return-to-top:hover i {\n   color: #f0f0f0;\n}\n\n@media print {\n  .pagebreak { \n    page-break-before: always; \n  } \n  div {\n    page-break-inside: avoid;\n  }\n  pre {\n    page-break-inside: avoid;\n  }\n}\n\n.modebar{\n  display: none !important;\n}"
  },
  {
    "path": "web/style_dark3.css",
    "content": "/* Copyright 2013 Michael Bostock. All rights reserved. Do not copy. */\n\n@import url(https://fonts.googleapis.com/css?family=PT+Serif|PT+Serif:b|PT+Serif:i|PT+Sans|PT+Sans:b);\n\n.ocks-org body {\n  background: hsl(206deg 47% 9%);\n  color: hsl(249deg 11% 76%);\n  font-family: \"PT Serif\", serif;\n  margin: 1em auto 4em auto;\n  position: relative;\n  width: 960px;\n  padding: 1rem;\n}\n\n.ocks-org header,\n.ocks-org footer,\n.ocks-org aside,\n.ocks-org h1,\n.ocks-org h2,\n.ocks-org h3,\n.ocks-org h4 {\n  font-family: \"PT Sans\", sans-serif;\n}\n\n.ocks-org h1,\n.ocks-org h2,\n.ocks-org h3,\n.ocks-org h4 {\n  color: hsl(249deg 11% 75%);\n}\n\n.ocks-org header,\n.ocks-org footer {\n  color: #999999;\n}\n\nh1 {\n  font-size: 64px;\n  font-weight: 300;\n  letter-spacing: -2px;\n  margin: 0.3em 0 0.1em 0;\n}\n\nh2 {\n  margin-top: 2em;\n}\n\nh1,\nh2 {\n  text-rendering: optimizeLegibility;\n}\n\nh2 a[name],\nh2 a[id] {\n  color: hsl(249deg 3% 31%);\n  padding-right: 0.3em;\n}\n\nheader,\nfooter {\n  font-size: small;\n}\n\n.ocks-org header aside,\n.ocks-org footer aside {\n  float: left;\n  margin-right: 0.5em;\n}\n\n.ocks-org header aside:after,\n.ocks-org footer aside:after {\n  padding-left: 0.5em;\n  content: \"/\";\n}\n\nfooter {\n  margin-top: 6em;\n}\n\nh1 ~ aside {\n  font-size: small;\n  right: 0;\n  position: absolute;\n  width: 180px;\n}\n\n.attribution {\n  font-size: small;\n  margin-bottom: 2em;\n}\n\nbody > p,\nli > p,\ndiv > p {\n  line-height: 1.5em;\n}\n\nbody > p,\ndiv > p {\n  width: 720px;\n}\n\nbody > blockquote {\n  width: 640px;\n}\n\nblockquote q {\n  display: block;\n  font-style: oblique;\n}\n\nul {\n  padding: 0;\n}\n\nli {\n  width: 690px;\n  margin-left: 30px;\n}\n\na {\n  color: hsl(187deg 100% 33%);\n}\n\na:not(:hover) {\n  text-decoration: none;\n}\n\npre,\ncode,\ntextarea {\n  font-family: \"Menlo\", \"Menlo Web\", \"Menlo Web ss\", monospace;\n}\n\ncode {\n  line-height: 1em;\n  color: hsl(249deg 11% 78%);\n}\n\ntextarea {\n  font-size: 100%;\n}\n\npre {\n  border-left: solid 2px hsl(0deg 0% 26%);\n  padding-left: 18px;\n  margin: 2em 0 2em 0;\n}\n\n.html .value,\n.javascript .string,\n.javascript .regexp {\n  color: #756bb1;\n}\n\n.html .tag,\n.css .tag,\n.javascript .keyword {\n  color: #3182bd;\n}\n\n.comment {\n  color: #636363;\n}\n\n.html .doctype,\n.javascript .number {\n  color: #31a354;\n}\n\n.html .attribute,\n.css .attribute,\n.javascript .class,\n.javascript .special {\n  color: #e6550d;\n}\n\nsvg {\n  font: 10px sans-serif;\n}\n\n.axis path,\n.axis line {\n  fill: none;\n  stroke: #000;\n  shape-rendering: crispEdges;\n}\n\nsup,\nsub {\n  line-height: 0;\n}\n\nq:before {\n  content: \"â€œ\";\n}\n\nq:after {\n  content: \"â€\";\n}\n\nblockquote q {\n  line-height: 1.5em;\n  display: inline;\n}\n\nblockquote q:before,\nblockquote q:after {\n  content: \"\";\n}\n\nh3,\nh4,\np,\nul {\n  padding-left: 1.2rem;\n}\n\n.banner {\n  padding: 0;\n}\n\n#toc {\n  margin-top: 0;\n}\n\n@media only screen and (max-device-width: 1023px) {\n  .ocks-org body {\n    font-size: 72%;\n    padding: 0.5rem;\n  }\n\n  body > p,\n  div > p {\n    width: 90vw !important;\n  }\n\n  li {\n    width: 82vw;\n  }\n\n  h3,\n  h4,\n  p,\n  ul {\n    padding-left: .7rem;\n    width: 90vw;\n  }\n\n  h1 {\n    font-size: 2rem;\n  }\n\n  pre {\n    padding-left: 0.5rem;\n  }\n\n  .banner,\n  h1,\n  img {\n    max-width: calc(100vw - 2em);\n    min-width: calc(100vw - 2em);\n  }\n}\n\n\n\n\n\n/*@import url(web/style.css);*/\n\n@font-face {font-family: \"Menlo web\";\n  src: url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01.woff2\") format(\"woff2\"), /* chrome、firefox */\n  url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01.woff\") format(\"woff\");\n  font-weight: normal;\n}\n\n@font-face {font-family: \"Menlo web\";\n  src: url(\"OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88\\\\Menlo Bold\\\\@font-face\\\\a6ffc5d72a96b65159e710ea6d258ba4.woff2\") format(\"woff2\"), /* chrome、firefox */\n  url(\"OnlineWebFonts_COM_d6ba633f6ea4cafe1a39ab736fe55e88\\\\Menlo Bold\\\\@font-face\\\\a6ffc5d72a96b65159e710ea6d258ba4.woff\") format(\"woff\");\n  font-weight: bold;\n}\n\n@font-face {font-family: \"Menlo web ss\";\n  src: url(\"OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\\\@font-face\\\\9f94dc20bb2a09c15241d3a880b7ad01-ss2.woff\") format(\"woff\");\n  font-weight: normal;\n}\n\n\n.join,\n.link,\n.node rect {\n  fill: none;\n  stroke: #636363;\n  stroke-width: 1.5px;\n}\n\n.link {\n  stroke: #969696;\n}\n\n.node rect {\n  fill: white;\n}\n\n.link path,\n.node rect,\n.node text,\n.join {\n  -webkit-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -moz-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -ms-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  -o-transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n  transition: stroke-opacity 500ms linear, fill-opacity 500ms linear;\n}\n\n.node .element rect {\n  fill: #bdbdbd;\n  stroke: none;\n}\n\n.node .null rect {\n  fill: none;\n  stroke: none;\n}\n\n.node .null text {\n  fill: #636363;\n}\n\n.node .selection rect {\n  stroke: #e6550d;\n}\n\n.node .data rect {\n  stroke: #3182bd;\n}\n\n.node .datum rect {\n  fill: #d9d9d9;\n  stroke: none;\n}\n\n.node .code text {\n  font-family: monospace;\n  color: hsl(0deg 0% 74%)\n}\n\n.node .key rect {\n  fill: #a1d99b;\n  stroke: none;\n}\n\n.link .to-key,\n.join {\n  stroke: #a1d99b;\n}\n\n.join {\n  stroke-dasharray: 2,2;\n}\n\n.link .to-null {\n  stroke-dasharray: .5,3.5;\n  stroke-linecap: round;\n}\n\n.link .from-data {\n  stroke: #3182bd;\n}\n\n.play circle {\n  fill: #fff;\n  stroke: #000;\n  stroke-width: 3px;\n}\n\n.play:hover path {\n  fill: #f00;\n}\n\n.play.mousedown circle {\n  fill: #f00;\n}\n\n.play.mousedown path {\n  fill: #fff;\n}\n\n.play rect {\n  fill: none;\n  pointer-events: all;\n  cursor: pointer;\n}\n\ncode span {\n  -webkit-transition: background 250ms linear;\n  -moz-transition: background 250ms linear;\n  -ms-transition: background 250ms linear;\n  -o-transition: background 250ms linear;\n  transition: background 250ms linear;\n}\n\npre.prettyprint, code.prettyprint {\n  background-color: #222;\n  border-radius: 8px;\n  font-size: 15px;\n}\n\npre.prettyprint {\n  width: 90%;\n  margin: 0.5em;\n  padding: 1em;\n  white-space: pre-wrap;\n}\n\n#return-to-top {\n  position: fixed;\n  bottom: 20px;\n  right: 20px;\n  background: rgb(0, 0, 0);\n  background: rgba(0, 0, 0, 0.2);\n  width: 50px;\n  height: 50px;\n  display: block;\n  text-decoration: none;\n  -webkit-border-radius: 35px;\n  -moz-border-radius: 35px;\n  border-radius: 35px;\n  display: none;\n  -webkit-transition: all 0.3s linear;\n  -moz-transition: all 0.3s ease;\n  -ms-transition: all 0.3s ease;\n  -o-transition: all 0.3s ease;\n  transition: all 0.3s ease;\n}\n\n#return-to-top i {\n  color: #fff;\n  margin: 0;\n  position: relative;\n  left: 16px;\n  top: 13px;\n  font-size: 19px;\n  -webkit-transition: all 0.3s ease;\n  -moz-transition: all 0.3s ease;\n  -ms-transition: all 0.3s ease;\n  -o-transition: all 0.3s ease;\n  transition: all 0.3s ease;\n}\n\n#return-to-top:hover {\n  background: rgba(0, 0, 0, 0.35);\n}\n\n#return-to-top:hover i {\n   color: #f0f0f0;\n}\n\n@media print {\n  .pagebreak { \n    page-break-before: always; \n  } \n  div {\n    page-break-inside: avoid;\n  }\n  pre {\n    page-break-inside: avoid;\n  }\n}\n\n.modebar{\n  display: none !important;\n}"
  },
  {
    "path": "web/template.html",
    "content": "<!DOCTYPE html>\n<html class=\"ocks-org do-not-copy\" lang=\"en\">\n\n<head>\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1\" />\n  <title>Comprehensive Python Cheatsheet</title>\n  <meta name=\"description\" content=\"Exhaustive, simple, beautiful and concise. A truly Pythonic cheat sheet about Python programming language.\">\n  <link rel=\"icon\" href=\"web/favicon.png\">\n\n  <link rel=\"stylesheet\" href=\"web/default.min.css\">\n  <link rel=\"stylesheet\" href=\"https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css\">\n  <link rel=\"stylesheet\" href=\"web/style.css\">\n\n  <script>\n    // Uses dark theme 3 if it's specified in query string orbrowser prefers dark mode and \n    // theme is not explicitly set.\n    if ((window.location.search.search(/[?&]theme=dark3/) !== -1) || ((window.location.search.search(/[?&]theme=/) == -1) && (window.matchMedia('(prefers-color-scheme: dark)').matches))) {\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/default_dark3.min.css\\\">\");\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/style_dark3.css\\\">\");\n    }\n    else if (window.location.search.search(/[?&]theme=dark2/) !== -1) {\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/default_dark2.min.css\\\">\");\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/style_dark2.css\\\">\");\n    }\n    else if (window.location.search.search(/[?&]theme=dark1/) !== -1) {\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/default_dark1.min.css\\\">\");\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/style_dark1.css\\\">\");\n    }    \n    else if (window.location.search.search(/[?&]theme=dark/) !== -1) {\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/default_dark.min.css\\\">\");\n      document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"web/style_dark.css\\\">\");\n    }\n  </script>\n\n  <meta name=\"twitter:card\" content=\"summary_large_image\">\n  <meta name=\"twitter:title\" content=\"Comprehensive Python Cheatsheet\">\n  <meta name=\"twitter:description\" content=\"Exhaustive, simple, beautiful and concise. A truly Pythonic cheat sheet about Python programming language.\">\n  <meta name=\"twitter:image\" content=\"https://gto76.github.io/python-cheatsheet/web/image_social_4.png\">\n\n  <meta property=\"og:url\" content=\"https://gto76.github.io/python-cheatsheet/\">\n  <meta property=\"og:title\" content=\"Comprehensive Python Cheatsheet\">\n  <meta property=\"og:description\" content=\"Exhaustive, simple, beautiful and concise. A truly Pythonic cheat sheet about Python programming language.\">\n  <meta property=\"og:site_name\" content=\"gto76.github.io\">\n  <meta property=\"og:image\" content=\"https://gto76.github.io/python-cheatsheet/web/image_social_4.png\">\n  <meta property=\"og:type\" content=\"article\">\n\n  <meta itemprop=\"url\" content=\"https://gto76.github.io/python-cheatsheet/\">\n  <meta itemprop=\"name\" content=\"Comprehensive Python Cheatsheet\">\n  <meta itemprop=\"description\" content=\"Exhaustive, simple, beautiful and concise. A truly Pythonic cheat sheet about Python programming language.\">\n  <meta itemprop=\"image\" content=\"https://gto76.github.io/python-cheatsheet/web/image_social_4.png\">\n\n  <meta name=\"google-site-verification\" content=\"w3rvuG0D1kUm_w20qsJecSEZh59Am8jK4eSPVU83e_M\">\n  <meta name=\"viewport\" id=\"viewport-meta\">\n</head>\n\n<body>\n  <header>\n    <aside>May 20, 2021</aside>\n    <a href=\"https://gto76.github.io\" rel=\"author\">Jure Šorn</a>\n  </header>\n\n  <div id=main_container></div>\n\n  <footer>\n    <aside>May 20, 2021</aside>\n    <a href=\"https://gto76.github.io\" rel=\"author\">Jure Šorn</a>\n  </footer>\n\n  <a href=\"javascript:\" id=\"return-to-top\"><i class=\"icon-chevron-up\"></i></a>\n\n  <script src=\"web/jquery-3.4.0.min.js\"></script>\n  <script src=\"web/script_2.js\"></script>\n  <script type=\"text/javascript\" src=\"https://transactions.sendowl.com/assets/sendowl.js\" ></script>\n  <script src=\"web/plotly.min.js\"></script>\n  <script src=\"web/covid_deaths.js\"></script>\n  <script src=\"web/covid_cases.js\"></script>\n</body>\n\n</html>\n"
  },
  {
    "path": "web/update_plots.py",
    "content": "#!/usr/bin/env python3\n#\n# Usage: ./update_plots.py\n# Updates plots from the Plotly section so they show the latest data.\n\nfrom pathlib import Path\nimport datetime\nimport pandas as pd\nfrom plotly.express import line\nimport plotly.graph_objects as go\nimport re\n\n\ndef main():\n    print('Updating covid deaths...')\n    update_covid_deaths()\n    print('Updating covid cases...')\n    update_confirmed_cases()\n\n\ndef update_covid_deaths():\n    covid = pd.read_csv('https://covid.ourworldindata.org/data/owid-covid-data.csv', \n                        usecols=['iso_code', 'date', 'total_deaths', 'population'])\n    continents = pd.read_csv('https://gist.githubusercontent.com/stevewithington/20a69c0b6d2ff'\n                             '846ea5d35e5fc47f26c/raw/country-and-continent-codes-list-csv.csv',\n                             usecols=['Three_Letter_Country_Code', 'Continent_Name'])\n    df = pd.merge(covid, continents, left_on='iso_code', right_on='Three_Letter_Country_Code')\n    df = df.groupby(['Continent_Name', 'date']).sum().reset_index()\n    df['Total Deaths per Million'] = round(df.total_deaths * 1e6 / df.population)\n    today = str(datetime.date.today())\n    df = df[('2020-02-22' < df.date) & (df.date < today)]\n    df = df.rename({'date': 'Date', 'Continent_Name': 'Continent'}, axis='columns')\n    gb = df.groupby('Continent')\n    df['Max Total Deaths'] = gb[['Total Deaths per Million']].transform('max')\n    df = df.sort_values(['Max Total Deaths', 'Date'], ascending=[False, True])\n    f = line(df, x='Date', y='Total Deaths per Million', color='Continent')\n    f.update_layout(margin=dict(t=24, b=0), paper_bgcolor='rgba(0, 0, 0, 0)')\n    update_file('covid_deaths.js', f)\n    f.layout.paper_bgcolor = 'rgb(255, 255, 255)'\n    write_to_png_file('covid_deaths.png', f, width=960, height=340)\n\n\ndef update_confirmed_cases():\n    def main():\n        df = wrangle_data(*scrape_data())\n        f = get_figure(df)\n        update_file('covid_cases.js', f)\n        f.layout.paper_bgcolor = 'rgb(255, 255, 255)'\n        write_to_png_file('covid_cases.png', f, width=960, height=315)\n\n    def scrape_data():\n        def scrape_covid():\n            url = 'https://covid.ourworldindata.org/data/owid-covid-data.csv'\n            df = pd.read_csv(url, usecols=['location', 'date', 'total_cases'])\n            return df[df.location == 'World'].set_index('date').total_cases\n        def scrape_yahoo(slug):\n            url = f'https://query1.finance.yahoo.com/v7/finance/download/{slug}' + \\\n                  '?period1=1579651200&period2=9999999999&interval=1d&events=history'\n            df = pd.read_csv(url, usecols=['Date', 'Close'])\n            return df.set_index('Date').Close\n        out = [scrape_covid(), scrape_yahoo('BTC-USD'), scrape_yahoo('GC=F'), \n               scrape_yahoo('^DJI')]\n        return map(pd.Series.rename, out, ['Total Cases', 'Bitcoin', 'Gold', 'Dow Jones'])\n\n    def wrangle_data(covid, bitcoin, gold, dow):\n        df = pd.concat([dow, gold, bitcoin], axis=1)  # Joins columns on dates.\n        df = df.sort_index().interpolate()            # Sorts by date and interpolates NaN-s.\n        yesterday = str(datetime.date.today() - datetime.timedelta(1))\n        df = df.loc['2020-02-23':yesterday]           # Discards rows before '2020-02-23'.\n        df = round((df / df.iloc[0]) * 100, 2)        # Calculates percentages relative to day 1\n        df = df.join(covid)                           # Adds column with covid cases.\n        return df.sort_values(df.index[-1], axis=1)   # Sorts columns by last day's value.\n\n    def get_figure(df):\n        figure = go.Figure()\n        for col_name in reversed(df.columns):            \n            yaxis = 'y1' if col_name == 'Total Cases' else 'y2'\n            colors = {'Total Cases': '#EF553B', 'Bitcoin': '#636efa', 'Gold': '#FFA15A', \n                      'Dow Jones': '#00cc96'}\n            trace = go.Scatter(x=df.index, y=df[col_name], name=col_name, yaxis=yaxis,\n                               line=dict(color=colors[col_name]))\n            figure.add_trace(trace)\n        figure.update_layout(\n            yaxis1=dict(title='Total Cases', rangemode='tozero'),\n            yaxis2=dict(title='%', rangemode='tozero', overlaying='y', side='right'),\n            legend=dict(x=1.1),\n            margin=dict(t=24, b=0),\n            paper_bgcolor='rgba(0, 0, 0, 0)'\n        )\n        return figure\n\n    main()\n\n\n###\n##  UTIL\n#\n\ndef update_file(filename, figure):\n    lines = read_file(filename)\n    f_json = figure.to_json(pretty=True).replace('\\n', '\\n        ')\n    out = lines[:6] + [f'        {f_json}\\n', '    )\\n', '};\\n']\n    write_to_file(filename, out)\n\n\ndef read_file(filename):\n    p = Path(__file__).resolve().parent / filename\n    with open(p, encoding='utf-8') as file:\n        return file.readlines()\n\n\ndef write_to_file(filename, lines):\n    p = Path(__file__).resolve().parent / filename\n    with open(p, 'w', encoding='utf-8') as file:\n        file.writelines(lines)\n\n\ndef write_to_png_file(filename, figure, width, height):\n    p = Path(__file__).resolve().parent / filename\n    figure.write_image(str(p), width=width, height=height)\n\n\nif __name__ == '__main__':\n    main()\n"
  }
]