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 слични објави

Пребарај: #compound

当前筛选 #compound清除筛选
Michaël Van de Poppe Official

@michaelvandepoppeanalyst · Post #4781 · 07.09.2024 г., 08:24

A whale is facing potential liquidations of 488.45 $WBTC($26.47M) on #Compound, with a health rate as low as 1.07 and a liquidation price of $50,429. This whale was liquidated 3 times during the 2022 price crash, with a total of 74,426 $cWBTC($32.82M) being liquidated. Address: 0xceef57f6c40a7cb2392eaad101ee0440aa43ba42

Hashtags

Lookonchain | ꘜ Whales are accumulating $LINK. Whale 0x3c9E withdrew 510,000 $LINK($11.13M) from #Binance over the past 2 days and deposited it into #Compound. 0x42A1 spent $1.34M to buy 59,560 $LINK 4 hours ago. 0x848a spent $1M to buy 44,846 $LINK 5 hours ago. https://intel.arkm.com/explorer/address/0x3c9Ea5C4Fec2A77E23Dd82539f4414266Fe8f757 https://intel.arkm.com/explorer/address/0x42A1Cf900c55EC4eBC885eB870A8E1d2E2FA1727 https://intel.arkm.com/explorer/address/0x848aA08a594a14664685e7bbB3a00E38Faba4F2f

币圈每日新闻播报

@USDT178888 · Post #1022 · 29.07.2022 г., 09:17

分析 六大蓝筹 DeFi 协议在熊市收益情况,发现竟仅有一个实现盈利 ! 它是谁?又是如何做到的? 在这篇文章中,Bankless 分析师 Ben Giove 通过深入研究 #Uniswap、#Aave、#Compound、#Maker、#Lido#Maple 来回答这个问题 https://www.defidaonews.com/article/6768196 Z8哈希简介Z8哈希玩法Z8哈希官网纸飞机中文语言 👉🏼Z8哈希官方招商 👉🏼Z8哈希招商助理 👉🏼Z8哈希官方注册