Skip to content

Commit 747899a

Browse files
committed
Libraries
1 parent 987eb50 commit 747899a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ import csv
15011501
from tabulate import tabulate
15021502
with open(<filename>, encoding='utf-8', newline='') as file:
15031503
lines = csv.reader(file, delimiter=';')
1504-
headers = [a.title() for a in next(lines)]
1504+
headers = [header.title() for header in next(lines)]
15051505
table = tabulate(lines, headers)
15061506
print(table)
15071507
```
@@ -1644,7 +1644,7 @@ def send_page(sport):
16441644
def odds_handler(sport):
16451645
team = request.forms.get('team')
16461646
home_odds, away_odds = 2.44, 3.29
1647-
response.headers['Content-Type'] = 'application/json'
1647+
response.headers['Content-Type'] ='application/json'
16481648
response.headers['Cache-Control'] = 'no-cache'
16491649
return json.dumps([team, home_odds, away_odds])
16501650
```
@@ -1653,8 +1653,8 @@ def odds_handler(sport):
16531653
```python
16541654
# $ pip3 install requests
16551655
>>> import requests
1656-
>>> url = 'http://localhost:8080/odds/football'
1657-
>>> data = {'team': 'arsenal f.c.'}
1656+
>>> url = 'http://localhost:8080/odds/football'
1657+
>>> data = {'team': 'arsenal f.c.'}
16581658
>>> response = requests.post(url, data=data)
16591659
>>> response.json()
16601660
['arsenal f.c.', 2.44, 3.29]
@@ -1716,7 +1716,7 @@ from pycallgraph import output, PyCallGraph
17161716
from datetime import datetime
17171717
time_str = datetime.now().strftime('%Y%m%d%H%M%S')
17181718
filename = f'profile-{time_str}.png'
1719-
drawer = output.GraphvizOutput(output_file=filename)
1719+
drawer = output.GraphvizOutput(output_file=filename)
17201720
with PyCallGraph(output=drawer):
17211721
<code_to_be_profiled>
17221722
```

0 commit comments

Comments
 (0)