Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 138ef28

Browse files
committed
Small fixes
1 parent 8f2d715 commit 138ef28

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@ Plot
22102210
```python
22112211
# $ pip3 install matplotlib
22122212
from matplotlib import pyplot
2213-
pyplot.plot(<data_1> [, <data_2>, ...]) # Or: hist(<data>).
2213+
pyplot.plot(<data_1> [, <data_2>, ...]) # Or: pyplot.hist(<data>)
22142214
pyplot.savefig(<filename>)
22152215
pyplot.show()
22162216
pyplot.clf() # Clears figure.
@@ -2225,9 +2225,9 @@ Table
22252225
from tabulate import tabulate
22262226
import csv
22272227
with open(<filename>, encoding='utf-8', newline='') as file:
2228-
lines = csv.reader(file)
2229-
headers = [header.title() for header in next(lines)]
2230-
table = tabulate(lines, headers)
2228+
rows = csv.reader(file)
2229+
header = [a.title() for a in next(rows)]
2230+
table = tabulate(rows, header)
22312231
print(table)
22322232
```
22332233

@@ -2272,7 +2272,7 @@ logger.<level>('A logging message.')
22722272
* **Levels: `'debug'`, `'info'`, `'success'`, `'warning'`, `'error'`, `'critical'`.**
22732273

22742274
### Exceptions
2275-
**Error description, stack trace and values of variables are appended automatically.**
2275+
**Exception description, stack trace and values of variables are appended automatically.**
22762276

22772277
```python
22782278
try:
@@ -2379,7 +2379,7 @@ Profile
23792379
### Basic
23802380
```python
23812381
from time import time
2382-
start_time = time() # Seconds since Epoch.
2382+
start_time = time() # Seconds since the Epoch.
23832383
...
23842384
duration = time() - start_time
23852385
```

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@
19131913

19141914
<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>
19151915
<span class="hljs-keyword">from</span> matplotlib <span class="hljs-keyword">import</span> pyplot
1916-
pyplot.plot(&lt;data_1&gt; [, &lt;data_2&gt;, ...]) <span class="hljs-comment"># Or: hist(&lt;data&gt;).</span>
1916+
pyplot.plot(&lt;data_1&gt; [, &lt;data_2&gt;, ...]) <span class="hljs-comment"># Or: pyplot.hist(&lt;data&gt;)</span>
19171917
pyplot.savefig(&lt;filename&gt;)
19181918
pyplot.show()
19191919
pyplot.clf() <span class="hljs-comment"># Clears figure.</span>
@@ -1923,9 +1923,9 @@
19231923
<span class="hljs-keyword">from</span> tabulate <span class="hljs-keyword">import</span> tabulate
19241924
<span class="hljs-keyword">import</span> csv
19251925
<span class="hljs-keyword">with</span> open(&lt;filename&gt;, encoding=<span class="hljs-string">'utf-8'</span>, newline=<span class="hljs-string">''</span>) <span class="hljs-keyword">as</span> file:
1926-
lines = csv.reader(file)
1927-
headers = [header.title() <span class="hljs-keyword">for</span> header <span class="hljs-keyword">in</span> next(lines)]
1928-
table = tabulate(lines, headers)
1926+
rows = csv.reader(file)
1927+
header = [a.title() <span class="hljs-keyword">for</span> a <span class="hljs-keyword">in</span> next(rows)]
1928+
table = tabulate(rows, header)
19291929
print(table)
19301930
</code></pre></div></div>
19311931

@@ -1962,7 +1962,7 @@
19621962
<ul>
19631963
<li><strong>Levels: <code class="python hljs"><span class="hljs-string">'debug'</span></code>, <code class="python hljs"><span class="hljs-string">'info'</span></code>, <code class="python hljs"><span class="hljs-string">'success'</span></code>, <code class="python hljs"><span class="hljs-string">'warning'</span></code>, <code class="python hljs"><span class="hljs-string">'error'</span></code>, <code class="python hljs"><span class="hljs-string">'critical'</span></code>.</strong></li>
19641964
</ul>
1965-
<div><h3 id="exceptions-2">Exceptions</h3><p><strong>Error description, stack trace and values of variables are appended automatically.</strong></p><pre><code class="python language-python hljs"><span class="hljs-keyword">try</span>:
1965+
<div><h3 id="exceptions-2">Exceptions</h3><p><strong>Exception description, stack trace and values of variables are appended automatically.</strong></p><pre><code class="python language-python hljs"><span class="hljs-keyword">try</span>:
19661966
...
19671967
<span class="hljs-keyword">except</span> &lt;exception&gt;:
19681968
logger.exception(<span class="hljs-string">'An error happened.'</span>)
@@ -2044,7 +2044,7 @@
20442044
</code></pre></div>
20452045

20462046
<div><h2 id="profile"><a href="#profile" name="profile">#</a>Profile</h2><div><h3 id="basic">Basic</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> time <span class="hljs-keyword">import</span> time
2047-
start_time = time() <span class="hljs-comment"># Seconds since Epoch.</span>
2047+
start_time = time() <span class="hljs-comment"># Seconds since the Epoch.</span>
20482048
...
20492049
duration = time() - start_time
20502050
</code></pre></div></div>

0 commit comments

Comments
 (0)