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

Резултати

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

Пребарај: #dgb

当前筛选 #dgb清除筛选
Pro Analysis

@proanalysistrader · Post #28475 · 17.02.2025 г., 13:13

#DGB/USDT analysis : #DGB is expected to retest the 200 EMA before continuing its bearish trend. This creates a potential buying opportunity on lower time frames (LTF), and the current level is a good point for long trades. TF : 4H Entry : $0.00865 Target : $0.00970 SL : $0.00797

Hashtags

Pro Analysis

@proanalysistrader · Post #28157 · 11.11.2024 г., 07:49

#DGB/USDT analysis : #DGB is currently in a downtrend, consistently making new lows while trading below the 200 EMA. The price is now showing a retracement towards the 200 EMA and the resistance zone. It is expected to reverse and continue its bearish momentum. It is recommended to wait for the price to retest this zone and demonstrate rejection before considering a short entry. TF : 1D Entry : $0.00703 Target : $0.00541 SL : $0.00814

Hashtags

Pro Analysis

@proanalysistrader · Post #28036 · 18.10.2024 г., 12:48

#DGB/USDT analysis : #DGB has broken the support levels and has retested the zone, which is now acting as resistance for the price. The price is expected to decline from this level and test the previous swing low. TF : 4H Entry : $0.00662 Target : $0.00634 SL : $0.00681

Hashtags

Pro Analysis

@proanalysistrader · Post #27741 · 07.07.2024 г., 05:18

#DGB/USDT analysis - The current price movement of #DGB shows a rejection from the resistance zone after establishing a lower low. There is an anticipation of further decline from this point with a potential retest of the previous low. To effectively manage risk, it is advisable to set a stop loss above the rejection zone. TF : 1h Entry : $0.00716 Target : $0.00616 SL : $0.00757

Hashtags

American Crypto©

@americancryptotrading · Post #27438 · 14.11.2025 г., 09:55

🇺🇸#DGB/USDT is on the verge of a breakout from the fallingwedge on the weekly chart🧐 A rise is on the way✈️ American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27034 · 31.10.2024 г., 09:19

🇺🇸#DGB/USDT produced the descendingtriangle on weekly timeframe🧐 Down we go if we break below the one📉 American Crypto©

Hashtags

Coinlegs Cryptocurrency Signals

@coinlegs · Post #9474 · 03.12.2023 г., 08:41

#DGB👀 The second chart fully and automatically generated by our algorithm 🤖 All drawings are based on only mathematical values and calculations instead of emotions. Interested? Check out www.coinlegs.com

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #8992 · 01.04.2024 г., 18:52

#DGB hit 34 today 🔼 Trade opened on 24 March ✨ In both spot n future Join team @CryptoProfitCoach🔝 ⭐⭐ Lifetime Membership opened for a limited time⭐👈👇👇 🟥Multiply your wealth into multiple folds and Get Unique opportunity to trade with @CryptoProfitCoach ✨Buy when he buy sell when he sell...Know what Gem he holding✨ Join team @CryptoProfitCoach🟥 for mega gains and multiply your wealth ✅ Get personalized attention in every trade ✅More trades and Mega profits. ✨ Inside info/Secret info of Coin ✅No.1 Pump Tracking Services. ✅ High End Profit Targets ✅ 24x7 Support in all trades ✅ Get Entry n High end profit Exit with Team in every trade ✨Discounted price -500$ for a year with 24x7 chat support ✅ ✨Today's decision can change your tommorrow✨ https://forms.gle/U519Ye8sCmvVE2Pv9 🟥Click here 👆👆✨✨

Hashtags

Coinlegs Cryptocurrency Signals

@coinlegs · Post #9743 · 17.01.2024 г., 14:01

🐬DOLPHIN | AI PREDICTIONS 17.01.2024 14:00 GMT Expected 5% Profit/Loss in 24 Hours #BOND | 3.493 | PP: 1% | LP: 100% #CVX | 3.002 | PP: 0% | LP: 90% #POND | 0.01511 | PP: 0% | LP: 90% #KMD | 0.2581 | PP: 0% | LP: 91% #ETC | 26.36 | PP: 0% | LP: 92% #JOE | 0.5105 | PP: 0% | LP: 93% #PROS | 0.4579 | PP: 0% | LP: 93% #VGX | 0.1258 | PP: 0% | LP: 93% #ATA | 0.0949 | PP: 0% | LP: 94% #BETA | 0.07108 | PP: 0% | LP: 94% #DEGO | 2.261 | PP: 0% | LP: 94% #AST | 0.124 | PP: 0% | LP: 95% #AVAX | 35.97 | PP: 0% | LP: 95% #CELR | 0.01949 | PP: 0% | LP: 95% #WAXP | 0.0619 | PP: 0% | LP: 95% #AXS | 8.05 | PP: 0% | LP: 96% #BEL | 0.6378 | PP: 0% | LP: 96% #GTC | 1.231 | PP: 0% | LP: 96% #UMA | 2.004 | PP: 0% | LP: 96% #WBTC | 42686.15 | PP: 0% | LP: 96% #BTC | 42609.84 | PP: 0% | LP: 97% #GRT | 0.1666 | PP: 0% | LP: 97% #MATIC | 0.8322 | PP: 0% | LP: 97% #PEPE | 0.00000121 | PP: 0% | LP: 97% #UTK | 0.0731 | PP: 0% | LP: 97% #MOB | 0.354 | PP: 0% | LP: 98% #OCEAN | 0.4489 | PP: 0% | LP: 98% #AAVE | 101.35 | PP: 0% | LP: 99% #ATOM | 10.097 | PP: 0% | LP: 99% #BSW | 0.0941 | PP: 0% | LP: 99% #BTTC | 0.00000104 | PP: 0% | LP: 99% #DGB | 0.00839 | PP: 0% | LP: 99% #FLM | 0.084 | PP: 0% | LP: 99% #FOR | 0.02193 | PP: 0% | LP: 99% #LOOM | 0.09158 | PP: 0% | LP: 99% #LTO | 0.0814 | PP: 0% | LP: 99% #MBOX | 0.3093 | PP: 0% | LP: 99% #PUNDIX | 0.4558 | PP: 0% | LP: 99% #QTUM | 3.113 | PP: 0% | LP: 99% #RPL | 34.09 | PP: 0% | LP: 99% #SCRT | 0.4198 | PP: 0% | LP: 99% #STX | 1.5891 | PP: 0% | LP: 99% #ACA | 0.1001 | PP: 0% | LP: 100% #ADA | 0.5293 | PP: 0% | LP: 100% #ADX | 0.1875 | PP: 0% | LP: 100% #AKRO | 0.00532 | PP: 0% | LP: 100% #ALCX | 25.88 | PP: 0% | LP: 100% #ALPHA | 0.1075 | PP: 0% | LP: 100% #AMP | 0.003404 | PP: 0% | LP: 100% #ARDR | 0.0916 | PP: 0% | LP: 100% #BADGER | 3.471 | PP: 0% | LP: 100% ... ——————————————————————— Total Predictions: 367 PP > 50%: 2 LP > 50%: 163 PP > 60%: 0 LP > 60%: 157 PP > 70%: 0 LP > 70%: 147 PP > 80%: 0 LP > 80%: 140 PP > 90%: 0 LP > 90%: 130 ——————————————————————— PP: Profit Probability | LP: Loss Probability