@@ -1644,7 +1644,7 @@ def send_page(sport):
16441644def 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,7 +1653,7 @@ def odds_handler(sport):
16531653``` python
16541654# $ pip3 install requests
16551655>> > import requests
1656- >> > url = ' http://localhost:8080/odds/football'
1656+ >> > url = ' http://localhost:8080/odds/football'
16571657>> > data = {' team' : ' arsenal f.c.' }
16581658>> > response = requests.post(url, data = data)
16591659>> > response.json()
@@ -1713,7 +1713,7 @@ Line # Hits Time Per Hit % Time Line Contents
17131713``` python
17141714# $ pip3 install pycallgraph
17151715from pycallgraph import output, PyCallGraph
1716- from datetime import datetime
1716+ from datetime import datetime
17171717time_str = datetime.now().strftime(' %Y%m%d %H%M%S' )
17181718filename = f ' profile- { time_str} .png '
17191719drawer = output.GraphvizOutput(output_file = filename)
0 commit comments