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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #418 · 9 мар.

Оператор pipe позволяет писать более компактный код, реализуя логику объединения данных (Union). Важно помнить, что его поведение зависит от контекста. Побитовые операции (логическое OR) result = 5 | 3 # 5 (0101) | 3 (0011) = 7 (0111) Самое главное - не путать с оператором or, это другое! Объединение множеств set_a = {1, 2, 3} set_b = {3, 4, 5} set_c = set_a | set_b # {1, 2, 3, 4, 5} set_c |= {5, 6} # {1, 2, 3, 4, 5, 6} Слияние словарей dict_1 = {"a": 1, "b": 2} dict_2 = {"b": 3, "c": 4} merged = dict_1 | dict_2 # {'a': 1, 'b': 3, 'c': 4} merged |= {"d": 5} # {'a': 1, 'b': 3, 'c': 4, 'd': 5} Аннотации типов, заменяет Union def process_data(value: int | str) -> None: print(value) Допустимо использовать в isinstance или issubclass isinstance(3, int | float) # True Паттерн-матчинг status_code = 404 match status_code: case 200 | 201 | 204: print("OK") case 400 | 404 | 500: print("ERROR") Для использования в своих классах требуется переопределить метод __or__ Так же нашел библиотеку pipe которая добавляет еще много возможностей. Рекомендую ознакомиться ;) #basic

Hashtags

Резултати

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

Пребарај: #quiet

当前筛选 #quiet清除筛选
Libreware

@libreware · Post #1463 · 10.06.2025 г., 18:31

Quiet v5.1.2 => https://tryquiet.org/ Quiet is an alternative to team chat apps like Slack, Discord, and Element that does not require trusting a central server or running one's own. In Quiet, all data syncs directly between a team's devices over Tor with no server required. NOTE: #Quietis not audited and should not be used when privacy and security are critical. It lacks basic features and probably won't replace your Slack or Discord yet. That said, it works surprisingly well and we use it daily as a Slack replacement. => https://github.com/TryQuiet/quiet/releases/tag/%40quiet/desktop%405.1.2 => https://github.com/TryQuiet/quiet/releases/tag/%40quiet/mobile%405.1.2 via @dcntr #Tor#IPFS

Libreware

@libreware · Post #1232 · 22.02.2024 г., 11:58

Quiet Encrypted p2p team chat with no servers, just Tor. https://tryquiet.org/index.html https://github.com/TryQuiet/quiet Currently in developpement stage so be cautious of your data Quiet is an alternative to team chat apps like Slack, Discord, and Element that does not require trusting a central server or running one's own. In Quiet, all data syncs directly between a team's devices over Tor with no server required. No email or phone number required, Unlike #Slack, #Discord, #WhatsApp, #Telegram, and #Signal, no email or phone number is required to create or join a #community. End-to-end encryption, All data is #encrypted end-to-end between member devices, using Tor. Channels, Organize chats in Slack-like channels, so conversations don't get messy. Images, Send and receive images, with copy/paste, drag & drop, and image previews. Files, Send and receive files of unlimited size! Notifications, Invite links, Keyboard controls, Desktop apps Android, Quiet works on Android, and F-Droid support is on the way. #E2E#Chat#Quiet#Tor