@@ -1644,7 +1644,7 @@ def send_page(sport):
1644
1644
def odds_handler (sport ):
1645
1645
team = request.forms.get(' team' )
1646
1646
home_odds, away_odds = 2.44 , 3.29
1647
- response.headers[' Content-Type' ] = ' application/json'
1647
+ response.headers[' Content-Type' ] = ' application/json'
1648
1648
response.headers[' Cache-Control' ] = ' no-cache'
1649
1649
return json.dumps([team, home_odds, away_odds])
1650
1650
```
@@ -1653,7 +1653,7 @@ def odds_handler(sport):
1653
1653
``` python
1654
1654
# $ pip3 install requests
1655
1655
>> > import requests
1656
- >> > url = ' http://localhost:8080/odds/football'
1656
+ >> > url = ' http://localhost:8080/odds/football'
1657
1657
>> > data = {' team' : ' arsenal f.c.' }
1658
1658
>> > response = requests.post(url, data = data)
1659
1659
>> > response.json()
@@ -1713,7 +1713,7 @@ Line # Hits Time Per Hit % Time Line Contents
1713
1713
``` python
1714
1714
# $ pip3 install pycallgraph
1715
1715
from pycallgraph import output, PyCallGraph
1716
- from datetime import datetime
1716
+ from datetime import datetime
1717
1717
time_str = datetime.now().strftime(' %Y%m%d %H%M%S' )
1718
1718
filename = f ' profile- { time_str} .png '
1719
1719
drawer = output.GraphvizOutput(output_file = filename)
0 commit comments