Если запустить 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
🤖 Aqlni shubha ostiga qo‘yadigan kapcha!
Bir dasturchi “I’m Not a Robot” nomli sayt ishga tushirdi. Bu yerda odatdagi kapcha emas, balki inson ekanligingizni isbotlash uchun 48 ta sinovdan o‘tishingiz kerak bo‘ladi.
🔹 Boshlanishida oddiy — yo‘l belgilarini topish kabi topshiriqlar.
🔹 Keyin esa mantiqiy boshqotirmalar, hatto “X va O” o‘yinigacha boradi.
🔹 Har bir keyingi kapcha avvalgisidan qiyinroq.
Jarayon ancha vaqt oladi, diqqat va topqirlikni talab qiladi. Oddiy botlar bunga dosh berolmaydi. Lekin odam ham oxiriga yetgach, o‘zidan so‘raydi: “Buni men qildimmi?” 😄
👉Bizning barcha loyihalar | #captcha
https://altcha.org/
Free, open-source #Captcha alternative
ALTCHA uses a proof-of-work mechanism to protect your website, APIs, and online services from spam and unwanted content.
Unlike other solutions, ALTCHA is free, open-source and self-hosted, does not use cookies nor fingerprinting, does not track users, and is compliant with data-privacy regulations and accessible.