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

TGINSIGHT SIMILAR POSTS

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

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

Отдельно разберём TaskGroup, который пришел на замену gather в Python 3.11. Ключевые отличия ▫️create_task() возвращает объект asyncio.Task, у которого есть соответствюущие методы управления. То есть у нас больше контроля ▫️это контекстный менеджер, который гарантирует что все таски будут остановлены по выходу из контекста ▫️ошибка автоматически отменяет незавершенные задачи, ▫️except* передает нам ExceptionGroup, в котором каждую ошибку можно обработать отдельно import asyncio import random async def do_it() -> str: if random.random() < 0.1: raise ValueError('Oops') delay = random.uniform(0.5, 1.5) await asyncio.sleep(delay) return delay async def main(): try: async with asyncio.TaskGroup() as tg: for _ in range(10): tasks.append(tg.create_task(do_it())) for t in tasks: print(t.result()) except *ValueError as e: for err in e.exceptions: print(err) asyncio.run(main()) Рекомендую изучить страницу Coroutines and Tasks из документации, где представлено больше интересных примеров и механизмов - таймауты - отмена задач - создание задач из другого потока #async

Hashtags

Резултати

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

Пребарај: #aigovernment

当前筛选 #aigovernment清除筛选
AI & Law

@ai_and_law · Post #817 · 30.04.2026 г., 07:04

🇦🇪UAE Targets 50% of Government Operations for Agentic AI The United Arab Emirates announced a plan to move 50% of government sectors, services, and operations to agentic AI within two years. The initiative presents AI not as a support tool, but as a system capable of analyzing, deciding, executing, and improving in real time. Sheikh Mohammed bin Rashid Al Maktoum described AI as an “executive partner” intended to enhance services, accelerate decisions, and increase efficiency. The strategy builds on prior UAE investments in digital identity infrastructure, smart government services, sovereign cloud capacity, data strategies, and national AI programs. Experts noted that infrastructure readiness is comparatively strong, but implementation will depend on redesigning workflows, policies, and administrative processes across government institutions. Analysts also pointed to legal and governance constraints. While AI-assisted services for high-volume, low-complexity tasks may enable the 50% target, fully autonomous decision-making in complex public sector functions remains limited by trust, accountability, fragmented legacy systems, and uneven data readiness. #AIRegulation#AIGovernment#AgenticAI#PublicSector#UAE