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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #146 · 16 сеп.

Функция sub в regex может принимать функцию в качестве аргумента repl. 📄 Из документации: If repl is a function, it is called for every non-overlapping occurrence of pattern. The function takes a single match object argument, and returns the replacement string. То есть для каждого совпадения будет вызвана функция для вычисления замены вместо замены на одну и ту же строку для всех совпадений. Иными словами, для замены разных совпадений на разные строки не потребуется запускать re.sub() много раз для каждой строки замены. Достаточно определить функцию, которая вернёт строку для каждого из совпадений. Описание слишком запутанное🤔, давайте лучше рассмотрим на простом примере: Создаем карту замены. То есть какие строки на какие требуется менять. remap = { 'раз': '1', 'два': '2', 'три': '3', 'четыре': '4', 'пять': '5', } Пишем функцию поиска строки для замены. Единственным аргументом будет объект re.Match. Используя данные этого объекта мы вычисляем замену on-the-fly! def get_str(match: re.Match): word = match.group(1) return remap.get(word.lower()) or word Пример текста. text = '''Раз Два Три Четыре Пять Вместе будем мы считать Пять Четыре Три Два Раз Мы считать научим вас ''' Теперь запускаем re.sub и вместо строки замены (repl) подаём имя функции. (Данный паттерн ищет отдельные слова в тексте) >>> print(re.sub(r'(\w+)', get_str, text)) 1 2 3 4 5 Вместе будем мы считать 5 4 3 2 1 Мы считать научим вас Думаю, достаточно наглядно 🤓 #libs#regex

Hashtags

Резултати

Пронајдени 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 💵#鏈上數據分析