Если запустить REPL с модулем asyncio, то вы входите в особый асинхронный REPL.
user@host:~$ python -m asyncio
asyncio REPL 3.12.7 ...
Use "await" directly instead of "asyncio.run()".
>>> import asyncio
>>>
В этом режиме
- создаётся и настраивается event loop
- уже импортирован asyncio
- работает await на верхнем уровне
То есть такая команда сработает без ошибок!
await asyncio.sleep(3)
Удобно для тестирования асинхронных функций без создания ивентлупов и остальной обвязки.
Работает в: 3.8+
#tricks#async
🔈Most Common Smart Speaker Usage
People are doing plenty of things with voice commands on their #SmartSpeakers, but shopping isn’t really one of them. Only about a quarter to a third of U.S. smart speaker owners have ever purchased something using voice. Very few do so on a regular basis. An Information article this summer said just 2 percent of #Alexa owners had made a purchase via Alexa in 2018.
🚀@PerspectiveIX via Recode.
❓Do you own a Smart Speaker, like Apple HomePod, Google Home, Amazon Echo, etc?
🗣The State of Chinese Voice Assistants
China is the second-largest consumer market in the world, hitting $4.3T in consumer expenditure in 2016 alone (for reference, the US ranked first with $12.5T, and Japan third with $2.7T).
The Chinese smart home market will reach nearly $23B in 2018, according to Juniper Research. #SmartSpeakers and #AI voice assistants are becoming an integral part of that.
Now that smart speakers are becoming commonplace, the early entrant, #Amazon, is losing its market share — and not just to its rival #Google, but to newer players emerging in China.
🚀@PerspectiveIX via CBInsights.
❓ Do you own a smart speaker?