Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CH_02_01_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def main():
fetch_coroutines = []
for url in urls:
fetch_coroutines.append(fetch_args(session, url))
# waik up coroutines with gather
# wake up coroutines with gather
data = await asyncio.gather(*fetch_coroutines)
pprint(data)

Expand Down
2 changes: 1 addition & 1 deletion CH_02_03/create_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def main():
TODO
1. use 'await asyncio.gather' and 'fetch' to get repo names and avatar_urls
2. use 'write_to_file' to create a json file with the results
3. text your code
3. test your code
a. 'cd CH_02_03'
b. 'python -m http.server'
NOTE: Feel free to use CH_02_01_end.py for reference.
Expand Down
2 changes: 1 addition & 1 deletion CH_03_02.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def main():
chat_db = Chat("messages")
await chat_db.start_db()
await chat_db.save_message({"handle": "first_user", "message": "hey"})
await chat_db.save_message({"handle": "first_user", "message": "hey"})
await chat_db.save_message({"handle": "second_user", "message": "hey"})
await chat_db.save_message({"handle": "second_user", "message": "What's up?"})
await chat_db.save_message({"handle": "first_user", "message": "all good!"})

Expand Down
4 changes: 2 additions & 2 deletions CH_03_03.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async def main():
chat_db = Chat("messages")
await chat_db.start_db()
await chat_db.save_message({"handle": "first_user", "message": "hey"})
await chat_db.save_message({"handle": "first_user", "message": "hey"})
await chat_db.save_message({"handle": "second_user", "message": "hey"})
await chat_db.save_message({"handle": "second_user", "message": "What's up?"})
await chat_db.save_message({"handle": "first_user", "message": "all good!"})

Expand All @@ -48,4 +48,4 @@ async def main():
click.secho(f' {message["handle"]} | {message["message"]} ', fg="cyan")
await chat_db.clear_db()

asyncio.run(main())
asyncio.run(main())
2 changes: 1 addition & 1 deletion CH_03_04.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async def main():
chat_db = Chat("messages")
await chat_db.start_db()
await chat_db.save_message({"handle": "first_user", "message": "hey"})
await chat_db.save_message({"handle": "first_user", "message": "hey"})
await chat_db.save_message({"handle": "second_user", "message": "hey"})
await chat_db.save_message({"handle": "second_user", "message": "What's up?"})
await chat_db.save_message({"handle": "first_user", "message": "all good!"})

Expand Down