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

Резултати

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

Пребарај: #doublezero

当前筛选 #doublezero清除筛选
Crypto M - Crypto News

@CryptoM · Post #65441 · 13.04.2026 г., 08:34

🚀 Japanese Game Company WIZE Expands Solana Holdings Japanese game company WIZE, formerly known as Mobcast Holdings, has announced that its cumulative purchase of SOL has reached approximately $3.13 million (500 million yen) as of April 10, 2026. According to Foresight News, the company currently holds over 24,597 SOL, with an average purchase price of around $127 (20,327 yen) per SOL, ranking 15th globally on CoinGecko's 'Solana Treasury Holdings' list. Over the past six months, WIZE has earned more than 400 SOL in staking rewards. The company's 'WIZE Validator Node' has officially joined the Solana Foundation's SFDP program and has received delegations from projects like DoubleZero. Including external delegations, WIZE's total treasury amounts to approximately 152,000 SOL. The company aims to further increase its holdings to enter the top 10 globally as soon as possible. #JapaneseGameCompany#WIZE#Solana#SOL#ForesightNews#SolanaTreasuryHoldings#StakingRewards#WIZEValidatorNode#SFDP#DoubleZero#Crypto#Blockchain#Cryptocurrency#GameIndustry

Venture Village Wall 🦄

@venturevillagewall · Post #4317 · 06.03.2025 г., 01:00

Notable Updates on Crypto Events and Funding White House source confirms Cardano's Charles Hoskinson excluded from the March 8 Crypto Summit. Cardano hasn't engaged with the administration in policy talks. Additionally, DoubleZero Foundation raises $28M at $400M valuation, plans expansion. CANARY files S-1 for AXL ETF, focusing on blockchain interoperability. #Cardano#Crypto#Hoskinson#DoubleZero#Blockchain#Funding#AXLETF#Web3#Investing#Valuation#Solana#XRP#Hedera#Stellar#TON#Sui#Bitcoin#VC#Testnet

Venture Village Wall 🦄

@venturevillagewall · Post #4324 · 06.03.2025 г., 19:00

$28M Raised for DoubleZero as Blockchain News DoubleZero secures $28M in funding from Multicoin Capital and others to enhance its network protocol. Tensorplex Labs also gains investment from YZi Labs to develop decentralized AI tools. Texas Senate passes Bitcoin Reserve Bill SB21. TON Core implements "Accelerator" update, boosting throughput to 100,000 TPS. World Liberty Financial partners with Sui, causing SUI price surge. Medusa Ransomware targets over 40 victims in 2025, demanding hefty ransoms. Kraken to begin next round of FTX creditor repayments on May 30. Seismic raises $7M led by a16z for a privacy blockchain. More on Bitcoin, blockchain, and crypto developments can be found at the relevant links. #Funding#Blockchain#Bitcoin#TexasSenate#Crypto#AI#Tensorplex#Web3#DoubleZero#SUI#Seismic#Ransomware#Medusa#A16z#DeFi#DecentralizedAI#TON#Kraken#VentureCapital