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

Резултати

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

Пребарај: #wireguard

当前筛选 #wireguard清除筛选
机场鉴赏 _(:з)∠)_

@AirportAnalysis · Post #349 · 24.08.2022 г., 03:36

#Glados 机场协议: #Trojan#Vmess#Wireguard 有无审计: 有,屏蔽轮子等大部分具有政治色彩的网站。 机场套餐: https://t.me/AirportRoster/16 描述: 一个很神奇的机场,经常送30天Basic套餐的抵扣码,提供edu优惠,免费使用一年。pro套餐提供 #Wireguard 类型节点

Libreware

@libreware · Post #1429 · 06.03.2025 г., 22:42

A post from the developer of #WireGuard on the severe #security flaws and lack of trustworthiness of #FDroid: https://bsky.app/profile/grapheneos.org/post/3lgq7wqwzpk26 The Bluesky link has GrapheneOS posts explaining https://gitlab.com/fdroid/fdroiddata/-/issues/3110#note_1613430404 Stuff here but not to the point like the Bluesky link https://discuss.grapheneos.org/d/18731-f-droid-vulnerability-allows-bypassing-certificate-pinning/

GitHub Trends

@githubtrending · Post #14902 · 03.07.2025 г., 00:00

#go#tailscale#tailscale_control_server#tailscale_server#wireguard Headscale is an open-source, self-hosted alternative to the Tailscale control server, letting you create your own private VPN network using Wireguard technology. It supports key Tailscale features like node registration, DNS, file sharing (Taildrop), access control lists (ACLs), and more, making it ideal for personal or small group use. By running Headscale yourself, you gain full control over your network without relying on Tailscale’s servers, enhancing privacy and customization. You can manage access precisely with ACLs, tag devices for group policies, and use modern VPN benefits like NAT traversal and secure connections between your devices[1][3][5]. This helps you securely connect and control your devices in a private network tailored to your needs. https://github.com/juanfont/headscale

Cool Scripts

@cool_scripts · Post #843 · 08.06.2025 г., 01:52

🔗Sub-Store 中各种 WireGuard 输入/输出格式的说明 🆕 更新了部分格式的示例 但是具体实操还是以相关的规范为准 ⚠ 不要使用 Shadowrocket 来导出 URI 然后作为输入导入。这样导出的 WireGuard URI 不是标准的 URI 😭原消息 🤭Sub-Store 合集 🥰#Sub-Store #SubStore#节点#订阅#本地节点#本地订阅#示例#WireGuard

GitHub Trends

@githubtrending · Post #14789 · 05.06.2025 г., 11:30

#go#golang#mesh#mesh_networks#nat_traversal#netbird#vpn#wireguard#wireguard_vpn#wiretrustee#zero_trust_network_access NetBird lets you quickly set up a secure private network for your organization or home without needing to configure complex firewall rules, open ports, or manage VPN gateways. It uses direct peer-to-peer connections based on WireGuard, so your devices connect to each other securely and efficiently, bypassing the need for a central server. You get strong security with features like access control, activity logging, and support for single sign-on, all managed from a simple web interface. This means you can connect and protect your devices anywhere, with minimal setup and maintenance, making remote access and network management much easier[2][1][5]. https://github.com/netbirdio/netbird

12
ПретходнаСтраница 1 од 2Следна