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

TGINSIGHT SIMILAR POSTS

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

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

Ранее я делал серию постов про битовые операторы. Вот вам ещё один наглядный пример как это используется в Python в модуле re. Чтобы указать флаг для компилятора нам надо указать его после передаваемой строки. Например, добавляем флаг для игнорирования переноса строки. pattern = re.compile(r"(\w+)+") words = pattern.search(text, re.DOTALL) А как указать несколько флагов? Ведь явно будут ситуации когда нам потребуется больше одного. Кто читал посты по битовые операторы уже понял как. pattern.search(text, re.DOTALL | re.VERBOSE) А теперь смотрим исходники, что находится в этих атрибутах? Не удивительно, степени двойки. Почему? Потому что каждое следующее значение это сдвиг единицы влево. >>> for n in [1, 2, 4, 8, 16, 32, 64, 128, 256]: >>> print(bin(n)) 0b1 0b10 0b100 0b1000 0b10000 0b100000 0b1000000 0b10000000 0b100000000 Чтобы было понятней, давайте напишем тоже самое но иначе, добавим ведущие нули: 000000001 000000010 000000100 000001000 000010000 000100000 001000000 010000000 100000000 Не понятно что тут происходит? Читай три поста про битовые операторы начиная с этого ➡️https://t.me/pythonotes/45 В общем, это пример применения побитовых операций в самом Python. Теперь вы знаете Python еще немного лучше) #tricks#regex#libs

Резултати

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

Пребарај: #jvault

当前筛选 #jvault清除筛选

SettleTON v2.0 Major Release, WEB3 Collaboration, and instructions how to get SBT 🔄 The "v2.0" trend continues — after the recent Ston.Fi v2.0 update, we have the SettleTON project next in line. Below, we'll look at what's been added and updated in the new version: ➖ Improved MID-Risk index: Critical errors were fixed, increasing protocol stability. New #MetaVault system, which optimizes asset storage and makes the reinvestment process more efficient. ➖ Improved reliability: All asset contracts (vaults) now use their own database and infrastructure😊#SettleTON, therefore the balance and quality of reinvestment increases. ➖ A new section has appeared in the bot, in which you can earn RewardPoints (RP) for completing missions from SettleTON and their partners. 🫡SettleTON x WEB3 partnership and increased farming rewards: Team #WEB3 gave a good boost to their pool, you can see and touch it in the bot , in the "Vaults" tab. Also, soon Ston.fi pools will appear in SettleTON (ST), in their post they described the advantages of ST compared to direct deposits through #DEX. 🙏#SBT Hunting, featuring SettleTON: The popular staking project #JVault has launched a campaign in connection with the resumption of The Open League. For simple actions in Quest Bot and DeFi projects — providing liquidity, staking, swaps, subscribing to a channel, we have the opportunity to get an exclusive SBT. Plus, for all these shenanigans, we get additional points and rise in the #OpenLeague ranking, and then 🍔#TON itself. SettleTON | GitBook | Chat EN | X

SettleTon and Portfel Collaboration 🔥SettleTon has recently partnered with #TorchFinance, this time by adding a new project to the list – #Portfel. 💼 Portfel's goal is to become the main application for tracking our assets: all tokens, staking on multiple #DEX, provided liquidity, rewards, and using all the necessary #DeFi applications. The team shared their immediate plans and roadmap: 🟡#NFTs and their valuation 🟡Support for multiple addresses 🟡Staking platforms - #Tonstakers and #jVault 🟡Vaults by Storm.tg 🟡Token swaps via the best Dex Aggregator 🟡Token details page 🪅DeFiLlama also included#SettleTon on their platform, adding transparency and value for users. SettleTON | GitBook | Chat EN | X