TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #400 · 8 дек.

Три способа выполнить множество задач с asyncio Функция для примера: async def do_it(n): await asyncio.sleep(random.uniform(0.5, 1)) return n 1. Последовательный вызов async def main(): for i in range(100): result = await do_it(i) Такой вызов имеет смысл только тогда, когда результат одной задачи требуется для вызова следующей. Если они независимы, то это антипаттерн, так как аналогичен простому синхронному вызову по очереди. 2. Упорядоченный результат async def main(): tasks = [do_it(i) for i in range(100)] results = await asyncio.gather(*tasks) Выполняет корутины конкурентно и возвращает результат в виде списка. Полезен когда требуется получить результаты в том же порядке в котором задачи отправлены. 3. Результат по мере готовности tasks = [asyncio.create_task(do_it(i)) for i in range(100)] for cor in asyncio.as_completed(tasks): result = await cor Так же выполняет корутины конкурентно, но не гарантирует порядок. Результат возвращается по мере готовности, каждый отдельно. Полезен когда нужно обработать любой ответ как можно скорее. #async

Hashtags

Резултати

Пронајдени 51 слични објави

Пребарај: #clouds

当前筛选 #clouds清除筛选
Amazing Geography 🌍

@amazingeo · Post #587 · 22.01.2026 г., 20:31

🌍 Polar stratospheric clouds, also known as nacreous clouds, shimmer with pastel colors and only form in extremely cold conditions. They set the stage for both rare atmospheric optics and ozone loss. ✨ #aurora⚡#clouds⚡#atmosphere⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #511 · 13.12.2025 г., 12:31

🌍 The highest clouds on Earth are called noctilucent clouds. They glow at twilight and form up to 85 kilometers above ground, in the edge of space—far higher than any weather clouds. ✨ #meteorology⚡#clouds⚡#atmosphere⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #519 · 08.08.2025 г., 00:22

🌎 The horseshoe vortex, or “smoke ring” in the sky, is a rare weather phenomenon where winds sculpt swirling, donut-shaped clouds. These dramatic rings form after volcanic eruptions, industrial blasts, or even lightning, showcasing nature’s surprising ability to twist air into geometric shapes. ✨ #atmosphere⚡#clouds⚡#weather 👉subscribe Interesting Planet

Universe Mysteries 🪐

@cosmomyst · Post #84 · 05.08.2025 г., 13:11

🪐 In the atmosphere of the giant planet Neptune, astronomers have discovered clouds of methane ice drifting in bands, creating ghostly streaks against the blue background. These shimmering clouds form when sunlight breaks apart methane gas and turns it into icy crystals high above the planet’s swirling, windy storms. ✨ #Neptune⚡#planets⚡#clouds⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

ПретходнаСтраница 1 од 5Следна