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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #65 · 8 апр.

Небольшой трик с регулярными выражениями который редко вижу в чужом коде. Допустим, вам нужно распарсить простой текст и вытащить оттуда пары имя+телефон. Вернуть всё это надо в виде списка словарей. Возьмем очень простой пример текста. >>> text = ''' >>> Alex:8999123456 >>> Mike:+799987654 >>> Oleg:+344456789 >>> ''' Соответственно, для выделения нужных элементов будем использовать группы. Получится такой паттерн: (\w+):([\d+]+) Как мы будем формировать словарь из найденных групп? >>> import re >>> results = [] >>> for match in re.finditer(r"(\w+):([\d+]+)", text): >>> results.append({ >>> "name": match.group(1), >>> "phone": match.group(2) >>> }) >>> print(results) [{'name': 'Alex', 'phone': '8999123456'}, ...] Можно немного сократить запись используя zip >>> results = [] >>> for match in re.finditer(r"(\w+):([\d+]+)", text): >>> results.append(dict(zip(['name', 'phone'], match.groups()))) Но есть способ лучше! Это именованные группы в regex. Можно в паттерне указать имя группы и результат сразу забрать в виде словаря. >>> for match in re.finditer(r"(?P<name>\w+):(?P<phone>[\d+]+)", text): >>> results.append(match.groupdict()) То есть всё что я сделал, это добавил в начале группы (внутри сбокочек) такую запись: (?P<group-name>...) Теперь найденная группа имеет имя и можно обратиться к ней как к элементу списка >>> name = match['name'] Либо забрать сразу весь словарь методом groupdict() >>> match.groupdict() #tricks#regex

Резултати

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

Пребарај: #mvrv

当前筛选 #mvrv清除筛选
Crypto Australia🇭🇲🇭🇲

@CryptoAustralia · Post #15801 · 13.02.2024 г., 10:21

We can use Short-Term Holder MVRV to monitor the unrealized profit or loss of new market participants. Comparing the STH cost-basis to the spot price reveals the pressure they face to sell at a loss or take profit. #MVRV is already above the 1.0 Mark, which shows strong bullishness in the market and #MVRV tested the Moving Average as Resistance already, and more momentum yet to come if it crosses the 155D Moving Average with MVRV By Crypto Australia

Hashtags

Crypto Australia🇭🇲🇭🇲

@CryptoAustralia · Post #15790 · 12.02.2024 г., 13:02

#MVRV started flipping bullish as #MVRV Ratio flipping above the 1Y MRVR Moving Average. Historically, we've seen this indicating some good mid-term and long-term trends successfully, so this could be another indication to us. By Crypto Australia

Hashtags

Crypto M - Crypto News

@CryptoM · Post #65021 · 10.04.2026 г., 14:11

🚀 Bitcoin's Potential Bear-Market 'Iron Bottom' Predicted by Analyst A CryptoQuant analyst has projected that Bitcoin might establish a bear-market 'iron bottom' within the $55,000–$60,000 range by the end of 2026. According to NS3.AI, this prediction is grounded in on-chain indicators, notably the MVRV Z-score, which has moderated but remains above negative levels. #Bitcoin#Crypto#BearMarket#CryptoAnalysis#MVRV#OnChainData#CryptoPredictions#BTC

🤣 以太區塊鏈新聞 🗓 2025-10-14 EthereumGlobalNews 💵#鏈上數據觀察 📊【 #BTC穩站135日均線,鏈上指標顯示投機降溫、結構穩固 】同時 #MVRV回落至 1.0 附近,顯示市場正從過度投機中冷卻,但整體結構依然穩健。 #技術走勢#BTC趨勢觀察#市場情緒#區塊鏈數據

以太坊区块链新闻| ETH 以太币圈热瓜

@ethereumglobalnews · Post #1050 · 18.10.2025 г., 12:58

#Santiment:主流币种 #MVRV 转为负值,显示潜在抄底时机浮现 —————————————————— 🔻 各資產的 30 日平均回報如下: • #BTC:-5.8% • #ETH:-8.4% • #XRP:-15.3% —————————————————— #鏈上情緒分析#數據回調#逢低買入訊號 🤣 以太區塊鏈新聞 🗓 2025-10-18 EthereumGlobalNews 💵#鏈上數據分析