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 слични објави

Пребарај: #contact

当前筛选 #contact清除筛选

😄Contact ➖➖➖➖➖➖ 🔘Contact is a verb and means 'speak or write to someone' - often when someone wants to give or receive information. 🔜The doctor contacted me this morning to tell me the results of my tests. 🔜Please don't contact me with any more offers. 🔘Contact can also be used as a noun to talk about speaking or writing to someone. 🔘In contact with means 'speak or meet regularly'. 🔘Make contact means 'try to speak or write to someone after finding where someone is'. 🔘Lose contact means 'no longer communicate'. 🔜Stay in contact when you go away. 🔜After he left the city, I lost contact with him, but I'll try to make contact again if I find out his new address. 🔘Contact refers to a person who can help or give you information in work or socially. 🔜I have a contact at the company. Her name is Debbie. 🔜My contacts told me there's a job opening at the business. 🔘Contact as a noun refers to people whose names, numbers, and/or email addresses you have stored on your mobile phone. The list on your phone where you find this information is called contacts. 🔜I'll add you as a new contact on my phone. 🔜Look in my contacts. My brother's number is there. #Contact👨‍🏫@America ➖➖➖➖➖➖➖➖➖➖➖➖ 🆕 Crypto News @Money 😁 Crypto Game @Egame 🇺🇸 US News @America 🇯🇵 Japan News @Japan 🇦🇪 UAE News @Dubai ▶️ Popular Movies @Videos 😜 Best Funny Video @Funnys

Hashtags

dopingpong

@dopingram · Post #3162 · 03.08.2024 г., 06:58

«Лёгкий контакт», digital art, Doping Pong, 2001 Этот образ без преувеличения можно назвать классикой российского цифрового искусства. Предлагаем проследить преображение и эволюционные изменения, которые применили Doping Pong к этому сюжету на разных этапах творчества – от digital art до академической живописи. Легкий контакт - digital art, 2001 Легкий контакт (новая версия), digital art, 2005 Легкий контакт, бумага, пастель, 2015 год Легкий контакт, холст, акрил, 2018 год #dopingpong#ufo#space#love#alien#kiss#digitalart#russianart#light#contact