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

TGINSIGHT SIMILAR POSTS

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

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

Функция asyncio.wait() это еще один способ вызвать множество асинхронных задач. Она работает в нескольких режимах. 1. Самый простой - ждем завершения всех задач async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(10)] done, pending = await asyncio.wait( tasks, return_when=asyncio.ALL_COMPLETED ) for task in done: try: print(task.result()) except Exception as e: print(e) Очень похоже на gather, но работает не так. ▫️возвращает не результаты, а два сета с объектами Task у которых можно забрать результат через task.result() если они в списке done ▫️не гарантирует порядок результатов так как оба объекта это set ▫️не выбрасывает исключение когда оно появляется, а сохраняет его в Task. Исключение появится когда попробуете забрать резултьтат. 2. Ждем завершения первой задачи, даже если там ошибка. async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(3)] done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_COMPLETED ) # в done может быть несколько задач! for task in done: try: print(task.result()) except Exception as e: print(f"Fail: {e}") # Оставшиеся задачи в pending, как правило, нужно отменить, иначе они будут продолжать работать for task in pending: task.cancel() В сете done будут таски которые успели завершится, причем как успешно так и нет. 3. До первой ошибки. Тоже самое, но с аргументом FIRST_EXCEPTION done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_EXCEPTION ) Функция завершается как только первая задача упадет с ошибкой. Учтите, что в любом случае done вы можете обранужить несколько задач, как с ошибками так и успешные. ↗️ Полный листинг примеров здесь #async

Hashtags

Резултати

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

Пребарај: #techfraud

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

@ai_and_law · Post #430 · 29.10.2024 г., 08:04

SEC Reaches Settlement with Destiny Robotics Over AI-Powered Vaporware The SEC has reached a settlement with Destiny Robotics after the startup's promises of AI-powered holographic assistants and humanoid robots failed to materialize, leading investors to lose their entire $141,455 investment. Founded in 2021, Destiny Robotics claimed it would launch a groundbreaking AI holographic assistant by 2022 and a humanoid robot the following year. However, according to the SEC, the company never developed a viable product. Instead, the startup used off-the-shelf software for staged demos, while internally abandoning its development efforts. The SEC also highlighted transparency issues, including CEO Megi Kavtaradze's failure to disclose her personal relationship with a lead investor during the crowdfunding round. The Commission's investigation revealed that Kavtaradze misappropriated $13,000 of company funds for personal expenses, such as MBA application fees. Despite promoting an impressive resume on the company’s website, the SEC found that Kavtaradze lacked substantial tech industry experience. Destiny Robotics serves as a cautionary tale about the importance of transparency, accountability, and due diligence in the AI startup space. #SEC#AIRegulation#TechFraud#Crowdfunding#AICompliance