From 69744c88de8c417c327a31e9bb693037e5458559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Fri, 1 Feb 2019 18:25:22 +0100 Subject: [PATCH] Libraries --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index acf75d8..1c59ed2 100644 --- a/README.md +++ b/README.md @@ -1644,7 +1644,7 @@ def send_page(sport): def odds_handler(sport): team = request.forms.get('team') home_odds, away_odds = 2.44, 3.29 - response.headers['Content-Type'] ='application/json' + response.headers['Content-Type'] = 'application/json' response.headers['Cache-Control'] = 'no-cache' return json.dumps([team, home_odds, away_odds]) ``` @@ -1653,7 +1653,7 @@ def odds_handler(sport): ```python # $ pip3 install requests >>> import requests ->>> url = 'http://localhost:8080/odds/football' +>>> url = 'http://localhost:8080/odds/football' >>> data = {'team': 'arsenal f.c.'} >>> response = requests.post(url, data=data) >>> response.json() @@ -1713,7 +1713,7 @@ Line # Hits Time Per Hit % Time Line Contents ```python # $ pip3 install pycallgraph from pycallgraph import output, PyCallGraph -from datetime import datetime +from datetime import datetime time_str = datetime.now().strftime('%Y%m%d%H%M%S') filename = f'profile-{time_str}.png' drawer = output.GraphvizOutput(output_file=filename)