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

Резултати

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

Пребарај: #bees

当前筛选 #bees清除筛选
Interesting Planet 🌍

@interesting_planet_facts · Post #949 · 22.10.2025 г., 15:11

🌎 Honeybees use a "waggle dance" to share the location of food sources with their hive mates. The direction and duration of the dance on the vertical honeycomb indicate the direction and distance to the flowers from the hive. Each bee can decode this dance to find the same spot, even kilometers away. ✨ #animalbehavior⚡#communication⚡#bees 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #417 · 25.07.2025 г., 17:22

🌎 A single honeybee visits up to 5,000 flowers in one day, gathering nectar to make honey and pollinate plants—crucial for global food crops! ✨ #bees⚡#pollination⚡#nature 👉subscribe Interesting Planet

科技&趣闻&杂记

@kejiqu · Post #4097 · 25.01.2026 г., 05:14

我们能否将蜜蜂作为智能外星生命的模型,以发展星际通信? 科学家们正在探索利用蜜蜂作为智能外星生命模型的可能性,以促进星际通信的研究。这一设想源于对宇宙中是否存在其他生命形式的长期疑问。研究人员希望通过分析蜜蜂的复杂社会行为和通信方式,为理解潜在的外星智慧提供新的视角,这一方向引发了科学界的广泛关注。Space.com 🏷#bees#interstellar#communication#AI 📢频道👥群组📝投稿

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #41002 · 02.05.2026 г., 14:04

Ruan Liangming set a Guinness World Record for the heaviest mantle of bees. He covered his entire body with approximately 637,000 bees, including 60 queen bees, weighing a total of 63.7 kg (140 lb 6.95 oz). The attempt took place in Fengxin County, Jiangxi Province, China, with official adjudicators present to verify the record. The feat was featured on the Guinness World Records Italian show. 🐝🦸‍♂️🌍 [Read more] The added video is in English and Italian. @googlefactss #GuinnessWorldRecords#Bees#China#RecordBreaker#IncredibleFeats

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40257 · 05.12.2025 г., 15:00

California trucks 1.5 million to 2.6 million bee hives each spring to pollinate almond farms. Pesticides and fungicides used on almonds hurt bees’ health and make it hard for them to find food. Bees also get stressed from long trips and losing their honey. These problems cause many bees to die or disappear. Almonds are pasteurized, which lowers their natural quality. Reducing almond farming could help protect bees and the environment by making almonds rarer. 🐝🌰🚛🌱 [Read more] [Read more] @googlefactss #Bees#Almonds#Pollination#Pesticides#ColonyCollapseDisorder#SaveTheBees#Sustainability

Ну что, с коровами почти покончили, возьмёмся за пчёл: Лабораторно выращенные медоносные пчелы, созданные лишь для того, чтобы быть рабами и умирать рано. Генеральный директор ForgeBee Адам Гамильтон говорит, что компания использует ИИ и робототехнику для выращивания партий одноразовых пчел, которые будут отправляться пчеловодам и фермерам. Он говорит: "Их поведение будет манипулироваться с помощью комбинации химических веществ, которые по сути заставят пчел чаще собирать пыльцу". Эти "единицы", как они их называют, будут иметь срок жизни от двух до трех недель, посвященных опылению сельскохозяйственных культур. Кто-нибудь еще обеспокоен этим? А если эти измененные, лабораторно выращенные пчелы окажутся в дикой природе... что может пойти не так? Читайте: https://www.brownfieldagnews.com/news/lab-grown-honeybees-could-be-future-of-food-production/ #LabGrownHoneybees#honeybees#bees#pollinators#pollination#beekeepers#food#health#healthy#holistic#holistichealth#gmofreecanada#gmofreeusa#toxinfreeusa https://t.me/VseWeda/88080