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

Резултати

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

Пребарај: #mlsa

当前筛选 #mlsa清除筛选
MDC Uzbekistan

@mdcuzbekistan · Post #903 · 03.11.2024 г., 13:31

💻 We just wrapped up an incredible event, “How to Become an MLSA” and it was a huge success! A big thank you to everyone who joined us. 🚀 Our MLSA, Dilafruz Joraboyeva, shared her inspiring journey and valuable insights on becoming a successful Microsoft Ambassador. We were also honored to have Mukhammadkarim Tukhtaboyev, lead of the Microsoft Developers Community Uzbekistan, share important information about our vibrant community and opportunities for growth.⚡ Check out the highlights in our amazing video recap! Together, we’re building a stronger tech community. Stay tuned for more events! 🙃 #MLSA#StudentAmbassador#Event @mdcuzbekistan

MDC Uzbekistan

@mdcuzbekistan · Post #902 · 29.10.2024 г., 05:00

💻 Join Us for "Way to Become an MLSA"! Are you interested in becoming a Microsoft Learn Student Ambassador? Curious about how to kickstart your journey in tech? Join us for an inspiring event featuring Uzbekistan’s youngest and first female Microsoft Student Ambassador. She will share her unique experiences and insights into the MLSA program.⚡ 📍Date & Time: November 2, 2:00 pm ⏰Location: C-Space, Yunusabad Branch This is your opportunity to ask questions, network with peers, and learn how you can become a part of this exciting community. Don’t miss out—mark your calendars!🙃 Register here! Spots are limited. #Microsoft#MLSA#StudentAmbassadors#Leadership#MicrosoftDevelopersUzbekistan @mdcuzbekistan

MDC Uzbekistan

@mdcuzbekistan · Post #900 · 22.10.2024 г., 10:32

Our Core Team Member, Dilafruz Joraboyeva, Achieved Microsoft Learn Student Ambassador Status! We are thrilled to share that our very own core team member, Dilafruz Joraboyeva, has achieved a remarkable milestone by becoming the first and youngest female Microsoft Learn Student Ambassador (MLSA) in Uzbekistan. Dilafruz, who has long been an active and dedicated part of our community, now stands as the only MLSA in the country. In her new role, Dilafruz will be leading the MLSA program across universities in Uzbekistan, bringing Microsoft technologies and opportunities closer to students. Her efforts will help build a vibrant community of learners and innovators, inspiring others to take on leadership roles in tech. Keep an eye on our official platforms for upcoming events related to the MLSA program, where you can discover how to join this exciting initiative and make an impact at your university. #Microsoft#MLSA#StudentAmbassadors#UzbekistanTech#MicrosoftDevelopersUzbekistan#Leadership#Innovation @mdcuzbekistan