Browse Source

Added Menlo font to webpage

pull/57/head
Jure Šorn 4 years ago
parent
commit
dfd438294a
18 changed files with 16415 additions and 364 deletions
  1. 266
      index.html
  2. 240
      parse.js
  3. BIN
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/9f94dc20bb2a09c15241d3a880b7ad01.eot
  4. 7947
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/9f94dc20bb2a09c15241d3a880b7ad01.svg
  5. BIN
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/9f94dc20bb2a09c15241d3a880b7ad01.ttf
  6. BIN
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/9f94dc20bb2a09c15241d3a880b7ad01.woff
  7. BIN
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/9f94dc20bb2a09c15241d3a880b7ad01.woff2
  8. 95
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/Demo.html
  9. 37
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/License.txt
  10. BIN
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Menlo Regular/Menlo Regular.eot
  11. 7947
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Menlo Regular/Menlo Regular.svg
  12. BIN
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Menlo Regular/Menlo Regular.ttf
  13. BIN
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Menlo Regular/Menlo Regular.woff
  14. BIN
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Menlo Regular/Menlo Regular.woff2
  15. 8
      web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Online_Web_Fonts.url
  16. 227
      web/script_2.js
  17. 2
      web/style.css
  18. 10
      web/template.html

266
index.html

@ -14,11 +14,21 @@
<meta name="twitter:description" content="Exhaustive, simple, beautiful and concise. A truly pythonic cheat sheet about Python programming language.">
<meta name="twitter:image" content="https://gto76.github.io/python-cheatsheet/web/image_twitter_card_2.jpeg">
<meta name="google-site-verification" content="w3rvuG0D1kUm_w20qsJecSEZh59Am8jK4eSPVU83e_M" />
<meta name="viewport" content="initial-scale=0.5">
</head>
<style>
@import url(web/style.css);
@font-face {font-family: "Menlo Regular";
src: url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.eot"); /* IE9*/
src: url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff2") format("woff2"), /* chrome、firefox */
url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff") format("woff"), /* chrome、firefox */
url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.svg#Menlo Regular") format("svg"); /* iOS 4.1- */
}
.join,
.link,
.node rect {
@ -398,27 +408,27 @@ to_exclusive = &lt;range&gt;.stop
</code></pre></div>
<pre><code class="text language-text">+------------------+------------+------------+------------+
| | Sequence | Collection | Iterable |
+------------------+------------+------------+------------+
| list, range, str | yes | yes | yes |
| dict, set | | yes | yes |
| iter | | | yes |
+------------------+------------+------------+------------+
<pre><code class="text language-text">┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┓
┃ │ Sequence │ Collection │ Iterable ┃
┠──────────────────┼────────────┼────────────┼────────────┨
┃ list, range, str │ ✓ │ ✓ │ ✓ ┃
┃ dict, set │ │ ✓ │ ✓ ┃
┃ iter │ │ │ ✓ ┃
┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┛
</code></pre>
<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> Integral, Rational, Real, Complex, Number
<span class="hljs-meta">&gt;&gt;&gt; </span>isinstance(<span class="hljs-number">123</span>, Number)
<span class="hljs-keyword">True</span>
</code></pre>
<pre><code class="text language-text">+--------------------+----------+----------+----------+----------+----------+
| | Integral | Rational | Real | Complex | Number |
+--------------------+----------+----------+----------+----------+----------+
| int | yes | yes | yes | yes | yes |
| fractions.Fraction | | yes | yes | yes | yes |
| float | | | yes | yes | yes |
| complex | | | | yes | yes |
| decimal.Decimal | | | | | yes |
+--------------------+----------+----------+----------+----------+----------+
<pre><code class="text language-text">┏━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓
┃ │ Integral │ Rational │ Real │ Complex │ Number ┃
┠────────────────────┼──────────┼──────────┼──────────┼──────────┼──────────┨
┃ int │ ✓ │ ✓ │ ✓ │ ✓ │ ✓ ┃
┃ fractions.Fraction │ │ ✓ │ ✓ │ ✓ │ ✓ ┃
┃ float │ │ │ ✓ │ ✓ │ ✓ ┃
┃ complex │ │ │ │ ✓ │ ✓ ┃
┃ decimal.Decimal │ │ │ │ │ ✓ ┃
┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛
</code></pre>
<div><h2 id="string"><a href="#string" name="string">#</a>String</h2><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>
&lt;str&gt; = &lt;str&gt;.strip(<span class="hljs-string">'&lt;chars&gt;'</span>) <span class="hljs-comment"># Strips all passed characters from both ends.</span>
@ -445,15 +455,15 @@ to_exclusive = &lt;range&gt;.stop
<li><strong>Also: <code class="python hljs"><span class="hljs-string">'lstrip()'</span></code>, <code class="python hljs"><span class="hljs-string">'rstrip()'</span></code>.</strong></li>
<li><strong>Also: <code class="python hljs"><span class="hljs-string">'lower()'</span></code>, <code class="python hljs"><span class="hljs-string">'upper()'</span></code>, <code class="python hljs"><span class="hljs-string">'capitalize()'</span></code> and <code class="python hljs"><span class="hljs-string">'title()'</span></code>.</strong></li>
</ul>
<div><h3 id="propertymethods">Property Methods</h3><pre><code class="text language-text">+---------------+----------+----------+----------+----------+----------+
| | [ !#$%…] | [a-zA-Z] | [¼½¾] | [²³¹] | [0-9] |
+---------------+----------+----------+----------+----------+----------+
| isprintable() | yes | yes | yes | yes | yes |
| isalnum() | | yes | yes | yes | yes |
| isnumeric() | | | yes | yes | yes |
| isdigit() | | | | yes | yes |
| isdecimal() | | | | | yes |
+---------------+----------+----------+----------+----------+----------+
<div><h3 id="propertymethods">Property Methods</h3><pre><code class="text language-text">┏━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓
┃ │ [ !#$%…] │ [a-zA-Z] │ [¼½¾] │ [²³¹] │ [0-9] ┃
┠───────────────┼──────────┼──────────┼──────────┼──────────┼──────────┨
┃ isprintable() │ ✓ │ ✓ │ ✓ │ ✓ │ ✓ ┃
┃ isalnum() │ │ ✓ │ ✓ │ ✓ │ ✓ ┃
┃ isnumeric() │ │ │ ✓ │ ✓ │ ✓ ┃
┃ isdigit() │ │ │ │ ✓ │ ✓ ┃
┃ isdecimal() │ │ │ │ │ ✓ ┃
┗━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛
</code></pre></div>
<ul>
@ -532,32 +542,32 @@ to_exclusive = &lt;range&gt;.stop
{<span class="hljs-number">1.23456</span>:<span class="hljs-number">10.3</span>%} <span class="hljs-comment"># ' 123.456%'</span>
</code></pre></div>
<div><h4 id="comparisonofpresentationtypes">Comparison of presentation types:</h4><pre><code class="text language-text">+---------------+-----------------+-----------------+-----------------+-----------------+
| | {&lt;float&gt;} | {&lt;float&gt;:f} | {&lt;float&gt;:e} | {&lt;float&gt;:%} |
+---------------+-----------------+-----------------+-----------------+-----------------+
| 0.000056789 | '5.6789e-05' | '0.000057' | '5.678900e-05' | '0.005679%' |
| 0.00056789 | '0.00056789' | '0.000568' | '5.678900e-04' | '0.056789%' |
| 0.0056789 | '0.0056789' | '0.005679' | '5.678900e-03' | '0.567890%' |
| 0.056789 | '0.056789' | '0.056789' | '5.678900e-02' | '5.678900%' |
| 0.56789 | '0.56789' | '0.567890' | '5.678900e-01' | '56.789000%' |
| 5.6789 | '5.6789' | '5.678900' | '5.678900e+00' | '567.890000%' |
| 56.789 | '56.789' | '56.789000' | '5.678900e+01' | '5678.900000%' |
| 567.89 | '567.89' | '567.890000' | '5.678900e+02' | '56789.000000%' |
+---------------+-----------------+-----------------+-----------------+-----------------+
</code></pre></div>
<pre><code class="text language-text">+---------------+-----------------+-----------------+-----------------+-----------------+
| | {&lt;float&gt;:.2} | {&lt;float&gt;:.2f} | {&lt;float&gt;:.2e} | {&lt;float&gt;:.2%} |
+---------------+-----------------+-----------------+-----------------+-----------------+
| 0.000056789 | '5.7e-05' | '0.00' | '5.68e-05' | '0.01%' |
| 0.00056789 | '0.00057' | '0.00' | '5.68e-04' | '0.06%' |
| 0.0056789 | '0.0057' | '0.01' | '5.68e-03' | '0.57%' |
| 0.056789 | '0.057' | '0.06' | '5.68e-02' | '5.68%' |
| 0.56789 | '0.57' | '0.57' | '5.68e-01' | '56.79%' |
| 5.6789 | '5.7' | '5.68' | '5.68e+00' | '567.89%' |
| 56.789 | '5.7e+01' | '56.79' | '5.68e+01' | '5678.90%' |
| 567.89 | '5.7e+02' | '567.89' | '5.68e+02' | '56789.00%' |
+---------------+-----------------+-----------------+-----------------+-----------------+
<div><h4 id="comparisonofpresentationtypes">Comparison of presentation types:</h4><pre><code class="text language-text">┏━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┓
┃ │ {&lt;float&gt;} │ {&lt;float&gt;:f} │ {&lt;float&gt;:e} │ {&lt;float&gt;:%} ┃
┠───────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┨
┃ 0.000056789 │ '5.6789e-05' │ '0.000057' │ '5.678900e-05' │ '0.005679%' ┃
┃ 0.00056789 │ '0.00056789' │ '0.000568' │ '5.678900e-04' │ '0.056789%' ┃
┃ 0.0056789 │ '0.0056789' │ '0.005679' │ '5.678900e-03' │ '0.567890%' ┃
┃ 0.056789 │ '0.056789' │ '0.056789' │ '5.678900e-02' │ '5.678900%' ┃
┃ 0.56789 │ '0.56789' │ '0.567890' │ '5.678900e-01' │ '56.789000%' ┃
┃ 5.6789 │ '5.6789' │ '5.678900' │ '5.678900e+00' │ '567.890000%' ┃
┃ 56.789 │ '56.789' │ '56.789000' │ '5.678900e+01' │ '5678.900000%' ┃
┃ 567.89 │ '567.89' │ '567.890000' │ '5.678900e+02' │ '56789.000000%' ┃
┗━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┛
</code></pre></div>
<pre><code class="text language-text">┏━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┓
┃ │ {&lt;float&gt;:.2} │ {&lt;float&gt;:.2f} │ {&lt;float&gt;:.2e} │ {&lt;float&gt;:.2%} ┃
┠───────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┨
┃ 0.000056789 │ '5.7e-05' │ '0.00' │ '5.68e-05' │ '0.01%' ┃
┃ 0.00056789 │ '0.00057' │ '0.00' │ '5.68e-04' │ '0.06%' ┃
┃ 0.0056789 │ '0.0057' │ '0.01' │ '5.68e-03' │ '0.57%' ┃
┃ 0.056789 │ '0.057' │ '0.06' │ '5.68e-02' │ '5.68%' ┃
┃ 0.56789 │ '0.57' │ '0.57' │ '5.68e-01' │ '56.79%' ┃
┃ 5.6789 │ '5.7' │ '5.68' │ '5.68e+00' │ '567.89%' ┃
┃ 56.789 │ '5.7e+01' │ '56.79' │ '5.68e+01' │ '5678.90%' ┃
┃ 567.89 │ '5.7e+02' │ '567.89' │ '5.68e+02' │ '56789.00%' ┃
┗━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┛
</code></pre>
<div><h3 id="ints">Ints</h3><pre><code class="python language-python hljs">{<span class="hljs-number">90</span>:c} <span class="hljs-comment"># 'Z'</span>
{<span class="hljs-number">90</span>:b} <span class="hljs-comment"># '1011010'</span>
@ -1210,17 +1220,17 @@ Hello World!
</code></pre></div>
<div><h4 id="tableofrequiredandautomaticallyavailablespecialmethods">Table of required and automatically available special methods:</h4><pre><code class="text language-text">+------------+------------+------------+------------+--------------+
| | Iterable | Collection | Sequence | abc.Sequence |
+------------+------------+------------+------------+--------------+
| iter() | REQ | REQ | Yes | Yes |
| contains() | Yes | Yes | Yes | Yes |
| len() | | REQ | REQ | REQ |
| getitem() | | | REQ | REQ |
| reversed() | | | Yes | Yes |
| index() | | | | Yes |
| count() | | | | Yes |
+------------+------------+------------+------------+--------------+
<div><h4 id="tableofrequiredandautomaticallyavailablespecialmethods">Table of required and automatically available special methods:</h4><pre><code class="text language-text">┏━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓
┃ │ Iterable │ Collection │ Sequence │ abc.Sequence ┃
┠────────────┼────────────┼────────────┼────────────┼──────────────┨
┃ iter() │ ! │ ! │ ✓ │ ✓ ┃
┃ contains() │ ✓ │ ✓ │ ✓ │ ✓ ┃
┃ len() │ │ ! │ ! │ ! ┃
┃ getitem() │ │ │ ! │ ! ┃
┃ reversed() │ │ │ ✓ │ ✓ ┃
┃ index() │ │ │ │ ✓ ┃
┃ count() │ │ │ │ ✓ ┃
┗━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛
</code></pre></div>
<ul>
@ -1316,35 +1326,35 @@ error_msg = traceback.format_exception(exc_type, &lt;name&gt;, &lt;name&gt;.__tr
</code></pre></div>
<div><h3 id="builtinexceptions">Built-in Exceptions</h3><pre><code class="text language-text">BaseException
+-- SystemExit # Raised by the sys.exit() function.
+-- KeyboardInterrupt # Raised when the user hits the interrupt key (ctrl-c).
+-- Exception # User-defined exceptions should be derived from this class.
+-- ArithmeticError # Base class for arithmetic errors.
| +-- ZeroDivisionError # Raised when dividing by zero.
+-- AttributeError # Raised when an attribute is missing.
+-- EOFError # Raised by input() when it hits end-of-file condition.
+-- LookupError # Raised when a look-up on a collection fails.
| +-- IndexError # Raised when a sequence index is out of range.
| +-- KeyError # Raised when a dictionary key or set element is not found.
+-- NameError # Raised when a variable name is not found.
+-- OSError # Failures such as “file not found” or “disk full”.
| +-- FileNotFoundError # When a file or directory is requested but doesn't exist.
+-- RuntimeError # Raised by errors that don't fall into other categories.
| +-- RecursionError # Raised when the maximum recursion depth is exceeded.
+-- StopIteration # Raised by next() when run on an empty iterator.
+-- TypeError # Raised when an argument is of wrong type.
+-- ValueError # When an argument is of right type but inappropriate value.
+-- UnicodeError # Raised when encoding/decoding strings to/from bytes fails.
</code></pre></div>
<div><h4 id="collectionsandtheirexceptions">Collections and their exceptions:</h4><pre><code class="text language-text">+-----------+------------+------------+------------+
| | list | dict | set |
+-----------+------------+------------+------------+
| getitem() | IndexError | KeyError | |
| pop() | IndexError | KeyError | KeyError |
| remove() | ValueError | | KeyError |
| index() | ValueError | | |
+-----------+------------+------------+------------+
├── SystemExit <span class="hljs-comment"># Raised by the sys.exit() function.</span>
├── KeyboardInterrupt <span class="hljs-comment"># Raised when the user hits the interrupt key (ctrl-c).</span>
└── Exception <span class="hljs-comment"># User-defined exceptions should be derived from this class.</span>
├── ArithmeticError <span class="hljs-comment"># Base class for arithmetic errors.</span>
│ └── ZeroDivisionError <span class="hljs-comment"># Raised when dividing by zero.</span>
├── AttributeError <span class="hljs-comment"># Raised when an attribute is missing.</span>
├── EOFError <span class="hljs-comment"># Raised by input() when it hits end-of-file condition.</span>
├── LookupError <span class="hljs-comment"># Raised when a look-up on a collection fails.</span>
│ ├── IndexError <span class="hljs-comment"># Raised when a sequence index is out of range.</span>
│ └── KeyError <span class="hljs-comment"># Raised when a dictionary key or set element is not found.</span>
├── NameError <span class="hljs-comment"># Raised when a variable name is not found.</span>
├── OSError <span class="hljs-comment"># Failures such as “file not found” or “disk full”.</span>
│ └── FileNotFoundError <span class="hljs-comment"># When a file or directory is requested but doesn't exist.</span>
├── RuntimeError <span class="hljs-comment"># Raised by errors that don't fall in other categories.</span>
│ └── RecursionError <span class="hljs-comment"># Raised when the maximum recursion depth is exceeded.</span>
├── StopIteration <span class="hljs-comment"># Raised by next() when run on an empty iterator.</span>
├── TypeError <span class="hljs-comment"># Raised when an argument is of wrong type.</span>
└── ValueError <span class="hljs-comment"># When an argument is of right type but inappropriate value.</span>
└── UnicodeError <span class="hljs-comment"># Raised when encoding/decoding strings to/from bytes fails.</span>
</code></pre></div>
<div><h4 id="collectionsandtheirexceptions">Collections and their exceptions:</h4><pre><code class="text language-text">┏━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┓
┃ │ list │ dict │ set ┃
┠───────────┼────────────┼────────────┼────────────┨
┃ getitem() │ IndexError │ KeyError │ ┃
┃ pop() │ IndexError │ KeyError │ KeyError ┃
┃ remove() │ ValueError │ │ KeyError ┃
┃ index() │ ValueError │ │ ┃
┗━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┛
</code></pre></div>
<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">'Argument is of wrong type!'</span>)
@ -1615,17 +1625,17 @@ CompletedProcess(args=[<span class="hljs-string">'bc'</span>, <span class="hljs-
<li><strong><code class="python hljs"><span class="hljs-string">'lineterminator'</span></code> - Specifies how writer terminates rows.</strong></li>
<li><strong><code class="python hljs"><span class="hljs-string">'quoting'</span></code> - Controls the amount of quoting: 0 - as necessary, 1 - all.</strong></li>
<li><strong><code class="python hljs"><span class="hljs-string">'escapechar'</span></code> - Character for escaping 'quotechar' if 'doublequote' is False.</strong></li>
</ul><div><h3 id="dialects">Dialects</h3><pre><code class="text language-text">+------------------+--------------+--------------+--------------+
| | excel | excel-tab | unix |
+------------------+--------------+--------------+--------------+
| delimiter | ',' | '\t' | ',' |
| quotechar | '"' | '"' | '"' |
| doublequote | True | True | True |
| skipinitialspace | False | False | False |
| lineterminator | '\r\n' | '\r\n' | '\n' |
| quoting | 0 | 0 | 1 |
| escapechar | None | None | None |
+------------------+--------------+--------------+--------------+
</ul><div><h3 id="dialects">Dialects</h3><pre><code class="text language-text">┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓
┃ │ excel │ excel-tab │ unix ┃
┠──────────────────┼──────────────┼──────────────┼──────────────┨
┃ delimiter │ ',' │ '\t' │ ',' ┃
┃ quotechar │ '"' │ '"' │ '"' ┃
┃ doublequote │ True │ True │ True ┃
┃ skipinitialspace │ False │ False │ False ┃
┃ lineterminator │ '\r\n' │ '\r\n' │ '\n' ┃
┃ quoting │ 0 │ 0 │ 1 ┃
┃ escapechar │ None │ None │ None ┃
┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛
</code></pre></div></div>
@ -1926,29 +1936,29 @@ param_kinds = [a.kind <span class="hljs-keyword">for</span> a <span class="hljs
type(MyMetaClass) == type <span class="hljs-comment"># MyMetaClass is an instance of type.</span>
</code></pre></div>
<pre><code class="text language-text">+-------------+-------------+
| Classes | Metaclasses |
+-------------+-------------|
| MyClass --&gt; MyMetaClass |
| | v |
| object -----&gt; type &lt;+ |
| | ^ +--+ |
| str ----------+ |
+-------------+-------------+
<pre><code class="text language-text">┏━━━━━━━━━━━━━┯━━━━━━━━━━━━━┓
┃ Classes │ Metaclasses ┃
┠─────────────┼─────────────┨
┃ MyClass ──→ MyMetaClass ┃
┃ │ ↓ ┃
┃ object ─────→ type ←╮ ┃
┃ │ ↑ ╰──╯ ┃
┃ str ──────────╯ ┃
┗━━━━━━━━━━━━━┷━━━━━━━━━━━━━┛
</code></pre>
<div><h3 id="inheritancediagram">Inheritance Diagram</h3><pre><code class="python language-python hljs">MyClass.__base__ == object <span class="hljs-comment"># MyClass is a subclass of object.</span>
MyMetaClass.__base__ == type <span class="hljs-comment"># MyMetaClass is a subclass of type.</span>
</code></pre></div>
<pre><code class="text language-text">+-------------+-------------+
| Classes | Metaclasses |
+-------------+-------------|
| MyClass | MyMetaClass |
| v | v |
| object &lt;----- type |
| ^ | |
| str | |
+-------------+-------------+
<pre><code class="text language-text">┏━━━━━━━━━━━━━┯━━━━━━━━━━━━━┓
┃ Classes │ Metaclasses ┃
┠─────────────┼─────────────┨
┃ MyClass │ MyMetaClass ┃
┃ ↓ │ ↓ ┃
┃ object ←───── type ┃
┃ ↑ │ ┃
┃ str │ ┃
┗━━━━━━━━━━━━━┷━━━━━━━━━━━━━┛
</code></pre>
<div><h2 id="eval"><a href="#eval" name="eval">#</a>Eval</h2><pre><code class="python language-python hljs"><span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> ast <span class="hljs-keyword">import</span> literal_eval
<span class="hljs-meta">&gt;&gt;&gt; </span>literal_eval(<span class="hljs-string">'1 + 2'</span>)
@ -2397,14 +2407,14 @@ nframes = &lt;Wave_read&gt;.getnframes() <span class="hljs-comment"
<li><strong>If sample width is one, then the integer should be encoded unsigned.</strong></li>
<li><strong>For all other sizes, the integer should be encoded signed with little-endian byte order.</strong></li>
</ul>
<div><h3 id="samplevalues">Sample Values</h3><pre><code class="text language-text">+-----------+-------------+------+-------------+
| sampwidth | min | zero | max |
+-----------+-------------+------+-------------+
| 1 | 0 | 128 | 255 |
| 2 | -32768 | 0 | 32767 |
| 3 | -8388608 | 0 | 8388607 |
| 4 | -2147483648 | 0 | 2147483647 |
+-----------+-------------+------+-------------+
<div><h3 id="samplevalues">Sample Values</h3><pre><code class="text language-text">┏━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━━━━┓
┃ sampwidth │ min │ zero │ max ┃
┠───────────┼─────────────┼──────┼─────────────┨
┃ 1 │ 0 │ 128 │ 255 ┃
┃ 2 │ -32768 │ 0 │ 32767 ┃
┃ 3 │ -8388608 │ 0 │ 8388607 ┃
┃ 4 │ -2147483648 │ 0 │ 2147483647 ┃
┗━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━━━━┛
</code></pre></div>
<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>

240
parse.js

@ -66,6 +66,214 @@ const DATACLASS =
const DATETIME =
'<code class="python language-python hljs"><span class="hljs-string">\'&lt;DT&gt; = resolve_imaginary(&lt;DT&gt;)\'</span></code>';
const DIAGRAM_1_A =
'+-------------+-------------+\n' +
'| Classes | Metaclasses |\n' +
'+-------------+-------------|\n' +
'| MyClass --> MyMetaClass |\n';
const DIAGRAM_1_B =
'┏━━━━━━━━━━━━━┯━━━━━━━━━━━━━┓\n' +
'┃ Classes │ Metaclasses ┃\n' +
'┠─────────────┼─────────────┨\n' +
'┃ MyClass ──→ MyMetaClass ┃\n' +
'┃ │ ↓ ┃\n' +
'┃ object ─────→ type ←╮ ┃\n' +
'┃ │ ↑ ╰──╯ ┃\n' +
'┃ str ──────────╯ ┃\n' +
'┗━━━━━━━━━━━━━┷━━━━━━━━━━━━━┛\n';
const DIAGRAM_2_A =
'+-------------+-------------+\n' +
'| Classes | Metaclasses |\n' +
'+-------------+-------------|\n' +
'| MyClass | MyMetaClass |\n';
const DIAGRAM_2_B =
'┏━━━━━━━━━━━━━┯━━━━━━━━━━━━━┓\n' +
'┃ Classes │ Metaclasses ┃\n' +
'┠─────────────┼─────────────┨\n' +
'┃ MyClass │ MyMetaClass ┃\n' +
'┃ ↓ │ ↓ ┃\n' +
'┃ object ←───── type ┃\n' +
'┃ ↑ │ ┃\n' +
'┃ str │ ┃\n' +
'┗━━━━━━━━━━━━━┷━━━━━━━━━━━━━┛\n';
const DIAGRAM_3_A =
'+------------------+------------+------------+------------+\n' +
'| | Sequence | Collection | Iterable |\n' +
'+------------------+------------+------------+------------+\n';
const DIAGRAM_3_B =
'┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┓\n' +
'┃ │ Sequence │ Collection │ Iterable ┃\n' +
'┠──────────────────┼────────────┼────────────┼────────────┨\n' +
'┃ list, range, str │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ dict, set │ │ ✓ │ ✓ ┃\n' +
'┃ iter │ │ │ ✓ ┃\n' +
'┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┛\n';
const DIAGRAM_4_A =
'+--------------------+----------+----------+----------+----------+----------+\n' +
'| | Integral | Rational | Real | Complex | Number |\n' +
'+--------------------+----------+----------+----------+----------+----------+\n';
const DIAGRAM_4_B =
'┏━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n' +
'┃ │ Integral │ Rational │ Real │ Complex │ Number ┃\n' +
'┠────────────────────┼──────────┼──────────┼──────────┼──────────┼──────────┨\n' +
'┃ int │ ✓ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ fractions.Fraction │ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ float │ │ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ complex │ │ │ │ ✓ │ ✓ ┃\n' +
'┃ decimal.Decimal │ │ │ │ │ ✓ ┃\n' +
'┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\n';
const DIAGRAM_5_A =
"+---------------+-----------------+-----------------+-----------------+-----------------+\n" +
"| | {<float>} | {<float>:f} | {<float>:e} | {<float>:%} |\n" +
"+---------------+-----------------+-----------------+-----------------+-----------------+\n";
const DIAGRAM_5_B =
"┏━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┓\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" +
"┃ 567.89 │ '567.89' │ '567.890000' │ '5.678900e+02' │ '56789.000000%' ┃\n" +
"┗━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┛\n";
const DIAGRAM_6_A =
"+---------------+-----------------+-----------------+-----------------+-----------------+\n" +
"| | {<float>:.2} | {<float>:.2f} | {<float>:.2e} | {<float>:.2%} |\n" +
"+---------------+-----------------+-----------------+-----------------+-----------------+\n";
const DIAGRAM_6_B =
"┏━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┓\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" +
"┃ 567.89 │ '5.7e+02' │ '567.89' │ '5.68e+02' │ '56789.00%' ┃\n" +
"┗━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┛\n";
const DIAGRAM_7_A =
'+------------+------------+------------+------------+--------------+\n' +
'| | Iterable | Collection | Sequence | abc.Sequence |\n' +
'+------------+------------+------------+------------+--------------+\n';
const DIAGRAM_7_B =
'┏━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\n' +
'┃ │ Iterable │ Collection │ Sequence │ abc.Sequence ┃\n' +
'┠────────────┼────────────┼────────────┼────────────┼──────────────┨\n' +
'┃ iter() │ ! │ ! │ ✓ │ ✓ ┃\n' +
'┃ contains() │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ len() │ │ ! │ ! │ ! ┃\n' +
'┃ getitem() │ │ │ ! │ ! ┃\n' +
'┃ reversed() │ │ │ ✓ │ ✓ ┃\n' +
'┃ index() │ │ │ │ ✓ ┃\n' +
'┃ count() │ │ │ │ ✓ ┃\n' +
'┗━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n';
const DIAGRAM_8_A =
'BaseException\n' +
' +-- SystemExit';
const DIAGRAM_8_B =
"BaseException\n" +
" ├── SystemExit <span class='hljs-comment'># Raised by the sys.exit() function.</span>\n" +
" ├── KeyboardInterrupt <span class='hljs-comment'># Raised when the user hits the interrupt key (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.</span>\n" +
" │ └── ZeroDivisionError <span class='hljs-comment'># Raised when dividing by zero.</span>\n" +
" ├── AttributeError <span class='hljs-comment'># Raised when an attribute is missing.</span>\n" +
" ├── EOFError <span class='hljs-comment'># Raised by input() when it hits end-of-file condition.</span>\n" +
" ├── LookupError <span class='hljs-comment'># Raised when a look-up on a collection fails.</span>\n" +
" │ ├── IndexError <span class='hljs-comment'># Raised when a sequence index is out of range.</span>\n" +
" │ └── KeyError <span class='hljs-comment'># Raised when a dictionary key or set element is not found.</span>\n" +
" ├── NameError <span class='hljs-comment'># Raised when a variable name is not found.</span>\n" +
" ├── OSError <span class='hljs-comment'># Failures such as “file not found” or “disk full”.</span>\n" +
" │ └── FileNotFoundError <span class='hljs-comment'># When a file or directory is requested but doesn't exist.</span>\n" +
" ├── RuntimeError <span class='hljs-comment'># Raised by errors that don't fall in other categories.</span>\n" +
" │ └── RecursionError <span class='hljs-comment'># Raised when the maximum recursion depth is exceeded.</span>\n" +
" ├── StopIteration <span class='hljs-comment'># Raised by next() when run on an empty iterator.</span>\n" +
" ├── TypeError <span class='hljs-comment'># Raised when an argument is of wrong type.</span>\n" +
" └── ValueError <span class='hljs-comment'># When an argument is of right type but inappropriate value.</span>\n" +
" └── UnicodeError <span class='hljs-comment'># Raised when encoding/decoding strings to/from bytes fails.</span>\n";
const DIAGRAM_9_A =
'+------------------+--------------+--------------+--------------+\n' +
'| | excel | excel-tab | unix |\n' +
'+------------------+--------------+--------------+--------------+\n';
const DIAGRAM_9_B =
"┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\n" +
"┃ │ excel │ excel-tab │ unix ┃\n" +
"┠──────────────────┼──────────────┼──────────────┼──────────────┨\n" +
"┃ delimiter │ ',' │ '\\t' │ ',' ┃\n" +
"┃ quotechar │ '\"' │ '\"' │ '\"' ┃\n" +
"┃ doublequote │ True │ True │ True ┃\n" +
"┃ skipinitialspace │ False │ False │ False ┃\n" +
"┃ lineterminator │ '\\r\\n' │ '\\r\\n' │ '\\n' ┃\n" +
"┃ quoting │ 0 │ 0 │ 1 ┃\n" +
"┃ escapechar │ None │ None │ None ┃\n" +
"┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n";
const DIAGRAM_10_A =
'+-----------+------------+------------+------------+\n' +
'| | list | dict | set |\n' +
'+-----------+------------+------------+------------+\n';
const DIAGRAM_10_B =
'┏━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┓\n' +
'┃ │ list │ dict │ set ┃\n' +
'┠───────────┼────────────┼────────────┼────────────┨\n' +
'┃ getitem() │ IndexError │ KeyError │ ┃\n' +
'┃ pop() │ IndexError │ KeyError │ KeyError ┃\n' +
'┃ remove() │ ValueError │ │ KeyError ┃\n' +
'┃ index() │ ValueError │ │ ┃\n' +
'┗━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┛\n';
const DIAGRAM_11_A =
'+-----------+-------------+------+-------------+\n' +
'| sampwidth | min | zero | max |\n' +
'+-----------+-------------+------+-------------+\n';
const DIAGRAM_11_B =
'┏━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━━━━┓\n' +
'┃ sampwidth │ min │ zero │ max ┃\n' +
'┠───────────┼─────────────┼──────┼─────────────┨\n' +
'┃ 1 │ 0 │ 128 │ 255 ┃\n' +
'┃ 2 │ -32768 │ 0 │ 32767 ┃\n' +
'┃ 3 │ -8388608 │ 0 │ 8388607 ┃\n' +
'┃ 4 │ -2147483648 │ 0 │ 2147483647 ┃\n' +
'┗━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━━━━┛\n';
const DIAGRAM_12_A =
'+---------------+----------+----------+----------+----------+----------+\n';
const DIAGRAM_12_B =
'┏━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n' +
'┃ │ [ !#$%…] │ [a-zA-Z] │ [¼½¾] │ [²³¹] │ [0-9] ┃\n' +
'┠───────────────┼──────────┼──────────┼──────────┼──────────┼──────────┨\n' +
'┃ isprintable() │ ✓ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ isalnum() │ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ isnumeric() │ │ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ isdigit() │ │ │ │ ✓ │ ✓ ┃\n' +
'┃ isdecimal() │ │ │ │ │ ✓ ┃\n' +
'┗━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\n';
function main() {
const html = getMd();
@ -77,6 +285,13 @@ function main() {
writeToFile('index.html', text);
}
function getMd() {
var readme = readFile('README.md');
var readme = readme.replace("#semaphore-event-barrier", "#semaphoreeventbarrier");
const converter = new showdown.Converter();
return converter.makeHtml(readme);
}
function initDom(html) {
const { JSDOM } = jsdom;
const dom = new JSDOM(html);
@ -85,19 +300,13 @@ function initDom(html) {
global.document = dom.window.document;
}
function getMd() {
var readme = readFile('README.md');
var readme = readme.replace("#semaphore-event-barrier", "#semaphoreeventbarrier");
const converter = new showdown.Converter();
return converter.makeHtml(readme);
}
function modifyPage() {
removeOrigToc();
addToc();
insertLinks();
unindentBanner();
highlightCode();
highlightCode();
updateDiagrams();
}
function removeOrigToc() {
@ -202,6 +411,21 @@ function insertPageBreakBefore(an_id) {
$('<div class="pagebreak"></div>').insertBefore($(an_id).parent())
}
function updateDiagrams() {
$(`code:contains(${DIAGRAM_1_A})`).html(DIAGRAM_1_B);
$(`code:contains(${DIAGRAM_2_A})`).html(DIAGRAM_2_B);
$(`code:contains(${DIAGRAM_3_A})`).html(DIAGRAM_3_B);
$(`code:contains(${DIAGRAM_4_A})`).html(DIAGRAM_4_B);
$(`code:contains(${DIAGRAM_5_A})`).html(DIAGRAM_5_B);
$(`code:contains(${DIAGRAM_6_A})`).html(DIAGRAM_6_B);
$(`code:contains(${DIAGRAM_7_A})`).html(DIAGRAM_7_B);
$(`code:contains(${DIAGRAM_8_A})`).html(DIAGRAM_8_B);
$(`code:contains(${DIAGRAM_9_A})`).html(DIAGRAM_9_B);
$(`code:contains(${DIAGRAM_10_A})`).html(DIAGRAM_10_B);
$(`code:contains(${DIAGRAM_11_A})`).html(DIAGRAM_11_B);
$(`code:contains(${DIAGRAM_12_A})`).html(DIAGRAM_12_B);
}
function readFile(filename) {
try {
return fs.readFileSync(filename, 'utf8');

BIN
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/9f94dc20bb2a09c15241d3a880b7ad01.eot

7947
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/9f94dc20bb2a09c15241d3a880b7ad01.svg
File diff suppressed because it is too large
View File

BIN
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/9f94dc20bb2a09c15241d3a880b7ad01.ttf

BIN
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/9f94dc20bb2a09c15241d3a880b7ad01.woff

BIN
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/9f94dc20bb2a09c15241d3a880b7ad01.woff2

95
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/@font-face/Demo.html

@ -0,0 +1,95 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Menlo Regular Font - OnlineWebFonts.COM</title>
<style type="text/css">
@font-face {font-family: "Menlo Regular";
src: url("9f94dc20bb2a09c15241d3a880b7ad01.eot"); /* IE9*/
src: url("9f94dc20bb2a09c15241d3a880b7ad01.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
url("9f94dc20bb2a09c15241d3a880b7ad01.woff2") format("woff2"), /* chrome、firefox */
url("9f94dc20bb2a09c15241d3a880b7ad01.woff") format("woff"), /* chrome、firefox */
url("9f94dc20bb2a09c15241d3a880b7ad01.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url("9f94dc20bb2a09c15241d3a880b7ad01.svg#Menlo Regular") format("svg"); /* iOS 4.1- */
}
*{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;}
</style>
</head>
<body>
<h1 class="logo"> <a href="http://www.onlinewebfonts.com/"> <span>Online</span><small>Web</small>Fonts</a> <strong>Font Demo</strong></h1>
<h2>
Menlo Regular Font <a style="font-size:14px;" href="http://www.onlinewebfonts.com/download/9f94dc20bb2a09c15241d3a880b7ad01" target="_blank">More Format Downloads</a></h2>
<div class="info">
<div class="inst">Instructions:</div>
<ul>
<li>
<p> <span class="numno">1</span>Use font-face declaration Fonts.<br />
<span class="exs">
<pre>
@font-face {font-family: "Menlo Regular";
src: url("9f94dc20bb2a09c15241d3a880b7ad01.eot"); /* IE9*/
src: url("9f94dc20bb2a09c15241d3a880b7ad01.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
url("9f94dc20bb2a09c15241d3a880b7ad01.woff2") format("woff2"), /* chrome、firefox */
url("9f94dc20bb2a09c15241d3a880b7ad01.woff") format("woff"), /* chrome、firefox */
url("9f94dc20bb2a09c15241d3a880b7ad01.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url("9f94dc20bb2a09c15241d3a880b7ad01.svg#Menlo Regular") format("svg"); /* iOS 4.1- */
}
</pre>
</span>
</li>
<li>
<p> <span class="numno">2</span>Settings font css style <br />
<span class="exs">
<pre>
.demo{
font-family:"Menlo Regular" !important;
font-size:16px;font-style:normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;}
</pre>
</span>
</li>
<li>
<p> <span class="numno">3</span>View DEMO <br />
<span class="exs"><pre>
&lt;div class="demo"&gt; www.OnlineWebFonts.Com &lt;/div&gt;
</pre></span>
</li>
<li>
<p> <span class="numno">OR</span>Or add to the head section of page. <br />
<span class="exs"><pre>
&lt;link href="//db.onlinewebfonts.com/c/9f94dc20bb2a09c15241d3a880b7ad01?family=Menlo+Regular" rel="stylesheet" type="text/css"/&gt;
</pre></span>
</li>
</ul>
</div>
<div class="demo">
<pre>
OnlineWebFonts.Com features an amazing collection of free fonts,
premium fonts and free dingbats. With over 8,000,000 freeware fonts,
you've come to the best place to download fonts!
OnlineWebFonts.Com Some fonts provided are trial versions of full versions and may not allow embedding
unless a commercial license is purchased or may contain a limited character set.
Please review any files included with your download,
which will usually include information on the usage and licenses of the fonts.
If no information is provided,
please use at your own discretion or contact the author directly.
0123456789 /*-+~!@#$%^&*()-=_+{}[]:;"'|\<>.?
</pre>
</div>
<div class="by">
<div class="by_title">License and attribution:</div>
<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>
<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>
</div>
<div id="footer">
<div>Generated by <a href="http://www.onlinewebfonts.com" target="_blank">oNlineWebFonts.Com</a></div>
</div>
</body>
</html>

37
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/License.txt

@ -0,0 +1,37 @@
¨X------------------------------------------------------¨[
©ª ©ª
©ª FREE FONT : http://www.OnlineWebFonts.Com ©ª
©ª ©ª
¨^------------------------------------------------------¨a
You must credit the author
Copy this link on your web
<div>Font made from <a href="http://www.onlinewebfonts.com">oNline Web Fonts</a> is licensed by CC BY 3.0</div>
OR
<a href="http://www.onlinewebfonts.com">oNline Web Fonts</a>
=======================================================================================================
OnlineWebFonts.Com features an amazing collection of free fonts,
premium fonts and free dingbats. With over 8,000,000 freeware fonts,
you've come to the best place to download fonts!
=======================================================================================================
OnlineWebFonts.Com Some fonts provided are trial versions of full versions and may not allow embedding
unless a commercial license is purchased or may contain a limited character set.
Please review any files included with your download,
which will usually include information on the usage and licenses of the fonts.
If no information is provided,
please use at your own discretion or contact the author directly.
=======================================================================================================

BIN
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Menlo Regular/Menlo Regular.eot

7947
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Menlo Regular/Menlo Regular.svg
File diff suppressed because it is too large
View File

BIN
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Menlo Regular/Menlo Regular.ttf

BIN
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Menlo Regular/Menlo Regular.woff

BIN
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Menlo Regular/Menlo Regular.woff2

8
web/OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1/Online_Web_Fonts.url

@ -0,0 +1,8 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=http://www.onlinewebfonts.com/
IDList=
IconFile=http://www.fontfree.org/favicon.ico
IconIndex=1
HotKey=0

227
web/script_2.js

@ -38,233 +38,6 @@ const TOC_MOBILE =
' <a href="#image">Image</a>, <a href="#audio">Audio</a>, <a href="#pygame">Pygame</a>]\n' +
'}\n';
const DIAGRAM_1_A =
'+-------------+-------------+\n' +
'| Classes | Metaclasses |\n' +
'+-------------+-------------|\n' +
'| MyClass --> MyMetaClass |\n';
const DIAGRAM_1_B =
'┏━━━━━━━━━━━━━┯━━━━━━━━━━━━━┓\n' +
'┃ Classes │ Metaclasses ┃\n' +
'┠─────────────┼─────────────┨\n' +
'┃ MyClass ──→ MyMetaClass ┃\n' +
'┃ │ ↓ ┃\n' +
'┃ object ─────→ type ←╮ ┃\n' +
'┃ │ ↑ ╰──╯ ┃\n' +
'┃ str ──────────╯ ┃\n' +
'┗━━━━━━━━━━━━━┷━━━━━━━━━━━━━┛\n';
const DIAGRAM_2_A =
'+-------------+-------------+\n' +
'| Classes | Metaclasses |\n' +
'+-------------+-------------|\n' +
'| MyClass | MyMetaClass |\n';
const DIAGRAM_2_B =
'┏━━━━━━━━━━━━━┯━━━━━━━━━━━━━┓\n' +
'┃ Classes │ Metaclasses ┃\n' +
'┠─────────────┼─────────────┨\n' +
'┃ MyClass │ MyMetaClass ┃\n' +
'┃ ↓ │ ↓ ┃\n' +
'┃ object ←───── type ┃\n' +
'┃ ↑ │ ┃\n' +
'┃ str │ ┃\n' +
'┗━━━━━━━━━━━━━┷━━━━━━━━━━━━━┛\n';
const DIAGRAM_3_A =
'+------------------+------------+------------+------------+\n' +
'| | Sequence | Collection | Iterable |\n' +
'+------------------+------------+------------+------------+\n';
const DIAGRAM_3_B =
'┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┓\n' +
'┃ │ Sequence │ Collection │ Iterable ┃\n' +
'┠──────────────────┼────────────┼────────────┼────────────┨\n' +
'┃ list, range, str │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ dict, set │ │ ✓ │ ✓ ┃\n' +
'┃ iter │ │ │ ✓ ┃\n' +
'┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┛\n';
const DIAGRAM_4_A =
'+--------------------+----------+----------+----------+----------+----------+\n' +
'| | Integral | Rational | Real | Complex | Number |\n' +
'+--------------------+----------+----------+----------+----------+----------+\n';
const DIAGRAM_4_B =
'┏━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n' +
'┃ │ Integral │ Rational │ Real │ Complex │ Number ┃\n' +
'┠────────────────────┼──────────┼──────────┼──────────┼──────────┼──────────┨\n' +
'┃ int │ ✓ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ fractions.Fraction │ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ float │ │ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ complex │ │ │ │ ✓ │ ✓ ┃\n' +
'┃ decimal.Decimal │ │ │ │ │ ✓ ┃\n' +
'┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\n';
const DIAGRAM_5_A =
"+---------------+-----------------+-----------------+-----------------+-----------------+\n" +
"| | {<float>} | {<float>:f} | {<float>:e} | {<float>:%} |\n" +
"+---------------+-----------------+-----------------+-----------------+-----------------+\n";
const DIAGRAM_5_B =
"┏━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┓\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" +
"┃ 567.89 │ '567.89' │ '567.890000' │ '5.678900e+02' │ '56789.000000%' ┃\n" +
"┗━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┛\n";
const DIAGRAM_6_A =
"+---------------+-----------------+-----------------+-----------------+-----------------+\n" +
"| | {<float>:.2} | {<float>:.2f} | {<float>:.2e} | {<float>:.2%} |\n" +
"+---------------+-----------------+-----------------+-----------------+-----------------+\n";
const DIAGRAM_6_B =
"┏━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┓\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" +
"┃ 567.89 │ '5.7e+02' │ '567.89' │ '5.68e+02' │ '56789.00%' ┃\n" +
"┗━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┛\n";
const DIAGRAM_7_A =
'+------------+------------+------------+------------+--------------+\n' +
'| | Iterable | Collection | Sequence | abc.Sequence |\n' +
'+------------+------------+------------+------------+--------------+\n';
const DIAGRAM_7_B =
'┏━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\n' +
'┃ │ Iterable │ Collection │ Sequence │ abc.Sequence ┃\n' +
'┠────────────┼────────────┼────────────┼────────────┼──────────────┨\n' +
'┃ iter() │ ! │ ! │ ✓ │ ✓ ┃\n' +
'┃ contains() │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ len() │ │ ! │ ! │ ! ┃\n' +
'┃ getitem() │ │ │ ! │ ! ┃\n' +
'┃ reversed() │ │ │ ✓ │ ✓ ┃\n' +
'┃ index() │ │ │ │ ✓ ┃\n' +
'┃ count() │ │ │ │ ✓ ┃\n' +
'┗━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n';
const DIAGRAM_8_A =
'BaseException\n' +
' +-- SystemExit';
const DIAGRAM_8_B =
"BaseException\n" +
" ├── SystemExit <span class='hljs-comment'># Raised by the sys.exit() function.</span>\n" +
" ├── KeyboardInterrupt <span class='hljs-comment'># Raised when the user hits the interrupt key (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.</span>\n" +
" │ └── ZeroDivisionError <span class='hljs-comment'># Raised when dividing by zero.</span>\n" +
" ├── AttributeError <span class='hljs-comment'># Raised when an attribute is missing.</span>\n" +
" ├── EOFError <span class='hljs-comment'># Raised by input() when it hits end-of-file condition.</span>\n" +
" ├── LookupError <span class='hljs-comment'># Raised when a look-up on a collection fails.</span>\n" +
" │ ├── IndexError <span class='hljs-comment'># Raised when a sequence index is out of range.</span>\n" +
" │ └── KeyError <span class='hljs-comment'># Raised when a dictionary key or set element is not found.</span>\n" +
" ├── NameError <span class='hljs-comment'># Raised when a variable name is not found.</span>\n" +
" ├── OSError <span class='hljs-comment'># Failures such as “file not found” or “disk full”.</span>\n" +
" │ └── FileNotFoundError <span class='hljs-comment'># When a file or directory is requested but doesn't exist.</span>\n" +
" ├── RuntimeError <span class='hljs-comment'># Raised by errors that don't fall in other categories.</span>\n" +
" │ └── RecursionError <span class='hljs-comment'># Raised when the maximum recursion depth is exceeded.</span>\n" +
" ├── StopIteration <span class='hljs-comment'># Raised by next() when run on an empty iterator.</span>\n" +
" ├── TypeError <span class='hljs-comment'># Raised when an argument is of wrong type.</span>\n" +
" └── ValueError <span class='hljs-comment'># When an argument is of right type but inappropriate value.</span>\n" +
" └── UnicodeError <span class='hljs-comment'># Raised when encoding/decoding strings to/from bytes fails.</span>\n";
const DIAGRAM_9_A =
'+------------------+--------------+--------------+--------------+\n' +
'| | excel | excel-tab | unix |\n' +
'+------------------+--------------+--------------+--------------+\n';
const DIAGRAM_9_B =
"┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\n" +
"┃ │ excel │ excel-tab │ unix ┃\n" +
"┠──────────────────┼──────────────┼──────────────┼──────────────┨\n" +
"┃ delimiter │ ',' │ '\\t' │ ',' ┃\n" +
"┃ quotechar │ '\"' │ '\"' │ '\"' ┃\n" +
"┃ doublequote │ True │ True │ True ┃\n" +
"┃ skipinitialspace │ False │ False │ False ┃\n" +
"┃ lineterminator │ '\\r\\n' │ '\\r\\n' │ '\\n' ┃\n" +
"┃ quoting │ 0 │ 0 │ 1 ┃\n" +
"┃ escapechar │ None │ None │ None ┃\n" +
"┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n";
const DIAGRAM_10_A =
'+-----------+------------+------------+------------+\n' +
'| | list | dict | set |\n' +
'+-----------+------------+------------+------------+\n';
const DIAGRAM_10_B =
'┏━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┓\n' +
'┃ │ list │ dict │ set ┃\n' +
'┠───────────┼────────────┼────────────┼────────────┨\n' +
'┃ getitem() │ IndexError │ KeyError │ ┃\n' +
'┃ pop() │ IndexError │ KeyError │ KeyError ┃\n' +
'┃ remove() │ ValueError │ │ KeyError ┃\n' +
'┃ index() │ ValueError │ │ ┃\n' +
'┗━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┛\n';
const DIAGRAM_11_A =
'+-----------+-------------+------+-------------+\n' +
'| sampwidth | min | zero | max |\n' +
'+-----------+-------------+------+-------------+\n';
const DIAGRAM_11_B =
'┏━━━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━┯━━━━━━━━━━━━━┓\n' +
'┃ sampwidth │ min │ zero │ max ┃\n' +
'┠───────────┼─────────────┼──────┼─────────────┨\n' +
'┃ 1 │ 0 │ 128 │ 255 ┃\n' +
'┃ 2 │ -32768 │ 0 │ 32767 ┃\n' +
'┃ 3 │ -8388608 │ 0 │ 8388607 ┃\n' +
'┃ 4 │ -2147483648 │ 0 │ 2147483647 ┃\n' +
'┗━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━━━━┛\n';
const DIAGRAM_12_A =
'+---------------+----------+----------+----------+----------+----------+\n';
const DIAGRAM_12_B =
'┏━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n' +
'┃ │ [ !#$%…] │ [a-zA-Z] │ [¼½¾] │ [²³¹] │ [0-9] ┃\n' +
'┠───────────────┼──────────┼──────────┼──────────┼──────────┼──────────┨\n' +
'┃ isprintable() │ ✓ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ isalnum() │ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ isnumeric() │ │ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ isdigit() │ │ │ │ ✓ │ ✓ ┃\n' +
'┃ isdecimal() │ │ │ │ │ ✓ ┃\n' +
'┗━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\n';
// isFontAvailable:
(function(d){function c(c){b.style.fontFamily=c;e.appendChild(b);f=b.clientWidth;e.removeChild(b);return f}var f,e=d.body,b=d.createElement("span");b.innerHTML=Array(100).join("wi");b.style.cssText=["position:absolute","width:auto","font-size:128px","left:-99999px"].join(" !important;");var g=c("monospace"),h=c("serif"),k=c("sans-serif");window.isFontAvailable=function(b){return g!==c(b+",monospace")||k!==c(b+",sans-serif")||h!==c(b+",serif")}})(document);
if (isFontAvailable('Menlo')) {
$(`code:contains(${DIAGRAM_1_A})`).html(DIAGRAM_1_B);
$(`code:contains(${DIAGRAM_2_A})`).html(DIAGRAM_2_B);
$(`code:contains(${DIAGRAM_3_A})`).html(DIAGRAM_3_B);
$(`code:contains(${DIAGRAM_4_A})`).html(DIAGRAM_4_B);
$(`code:contains(${DIAGRAM_5_A})`).html(DIAGRAM_5_B);
$(`code:contains(${DIAGRAM_6_A})`).html(DIAGRAM_6_B);
$(`code:contains(${DIAGRAM_7_A})`).html(DIAGRAM_7_B);
$(`code:contains(${DIAGRAM_8_A})`).html(DIAGRAM_8_B);
$(`code:contains(${DIAGRAM_9_A})`).html(DIAGRAM_9_B);
$(`code:contains(${DIAGRAM_10_A})`).html(DIAGRAM_10_B);
$(`code:contains(${DIAGRAM_11_A})`).html(DIAGRAM_11_B);
$(`code:contains(${DIAGRAM_12_A})`).html(DIAGRAM_12_B);
}
var isMobile = false;
// Device detection:
if(/(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)

2
web/style.css

@ -129,7 +129,7 @@ a:not(:hover) {
pre,
code,
textarea {
font-family: "Menlo", monospace;
font-family: "Menlo", "Menlo Regular", monospace;
}
code {

10
web/template.html

@ -14,11 +14,21 @@
<meta name="twitter:description" content="Exhaustive, simple, beautiful and concise. A truly pythonic cheat sheet about Python programming language.">
<meta name="twitter:image" content="https://gto76.github.io/python-cheatsheet/web/image_twitter_card_2.jpeg">
<meta name="google-site-verification" content="w3rvuG0D1kUm_w20qsJecSEZh59Am8jK4eSPVU83e_M" />
<meta name="viewport" content="initial-scale=0.5">
</head>
<style>
@import url(web/style.css);
@font-face {font-family: "Menlo Regular";
src: url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.eot"); /* IE9*/
src: url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff2") format("woff2"), /* chrome、firefox */
url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.woff") format("woff"), /* chrome、firefox */
url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url("web\\OnlineWebFonts_COM_cb7eb796ae7de7195a34c485cacebad1\\@font-face\\9f94dc20bb2a09c15241d3a880b7ad01.svg#Menlo Regular") format("svg"); /* iOS 4.1- */
}
.join,
.link,
.node rect {

Loading…
Cancel
Save