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

Резултати

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

Пребарај: #marshal

当前筛选 #marshal清除筛选
白丝雪糕anime(表频道)

@white_pantyhose_anime · Post #1026 · 23.11.2025 г., 16:27

title:爱丽丝的里面有符合勇者的资质吗~? painter:#marshal tag:#天童アリス#碧蓝档案#白タイツ#白裤袜#雪糕#白丝#ソックス足裏#着袜足底 https://www.pixiv.net/artworks/124350206

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40717 · 01.03.2026 г., 07:02

Georgy Zhukov was a Soviet military leader and Marshal of the Soviet Union. He was born to a poor peasant family in Strelkovka, Kaluga Province, Russia. He served in the Imperial Russian Army in World War I. After the Russian Revolution, he joined the Red Army and rose quickly through the ranks. He commanded Soviet forces at major battles, including Khalkhin Gol, Moscow, Stalingrad, Kursk, and the final assault on Berlin. He became Marshal of the Soviet Union in January 1943. After World War II, he was the first military governor of the Soviet occupation zone in Germany. He later served as Chief of the General Staff and Minister of Defence. He was removed from top posts because Soviet political leaders feared his popularity and power. Zhukov is remembered as one of the most celebrated Soviet commanders of the 20th century. 🪖⚔️🇷🇺 [Read more] @googlefactss #GeorgyZhukov#SovietUnion#WorldWarII#Marshal#MilitaryHistory#EasternFront