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

Резултати

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

Пребарај: #contacts

当前筛选 #contacts清除筛选
Libreware

@libreware · Post #908 · 28.02.2021 г., 14:25

Fake Contacts Android phone app that creates fake contacts, which will be stored on your smartphone along with your real contacts. This feeds fake data to any apps or companies who are copying our private data to use or sell it. This is called "data-poisoning". Nothing about these fake contacts will interfere with your normal use of your phone or your real contacts. https://github.com/BillDietrich/fake_contacts https://f-droid.org/en/packages/me.billdietrich.fake_contacts/ #fakecontacts#contacts#data#poisoning

GitHub Trends

@githubtrending · Post #14712 · 16.05.2025 г., 11:30

#php#calendar#contacts#crm#crm_platform#crm_system#customer_portal#customer_support#customizable#documents#email_marketing#kanban#leads#open_source#php#platform#sales_automation#single_page_application#support EspoCRM is a free, open-source CRM tool that helps you manage customer relationships by organizing leads, contacts, sales, marketing, and support in one easy-to-use web app. It has a clean interface, customizable features, and a REST API for integration, making it flexible for startups, small businesses, and developers. It automates repetitive tasks, saving time and reducing errors, while providing detailed reports to improve decision-making. Being open-source, it’s cost-effective with no licensing fees, and supported by a helpful community. This means you get a powerful, adaptable CRM that boosts productivity and customer management without high costs[1][3][5]. https://github.com/espocrm/espocrm