Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
#CeFi
BlockFills приостановил ввод и вывод средств на фоне турбулентности рынка
Криптокредитор BlockFills временно остановил клиентские депозиты и выводы, сославшись на высокую волатильность. Компания из Чикаго обслуживает около 2 000 институциональных клиентов и в 2025 году провела операций на $60 млрд.
Торговля для части клиентов продолжается, но ликвидность ограничена.
🚀 New Listing: $CREDI Is Now Listed on the HEXN.IO Smart Exchange! 🚀
Another one has landed in our Smart Exchange! Explore Credefi (CREDI) with HEXN.IO, an all-in-one crypto platform that unites habitual and advanced approaches to money management.
What is Credefi?
Credefi Finance is a hybrid fin-tech solution that provides a state-of-the-art platform offering crypto lending and fiat borrowing collateralized with real-world assets. #RWA
💰 Credefi's mission is to bridge the gap in debt financing in the European Union and facilitate real-world impact by providing fair and accessible lending solutions to small and medium-sized enterprises (SMEs) in the region.
🏦 With Credefi, users can access reliable loans backed by a range of real-world assets, including real estate, future receivables, and more. The lending platform offers lenders stable and predictable returns generated from the real economy.
📈 Credefi works towards revolutionizing the alternative lending industry and making a positive difference in the world of #DeFi and #CeFi.
Ready to explore CREDI?
👉 Start trading Credefi ($CREDI) on HEXN.IO now!
From #CeFi to #DeFi in one picture.
The amount of fees on #Ethereum spent on $ETH deposits to centralized exchanges has fallen from ~25% in 2017 to less than 1% today.
Almost all fees spent on txs involving centralized exchanges in the past months were used for ETH withdrawals.
Scary bonuses from Electra!❤️
🚀Electra , the newest multi-chain DEX that combines the best features of #CeFi and #DeFi, one of the best startups at the Blockchain Life 2024 conference, has transformed its mini-app in honor of the main holiday of UPtober — Halloween!👁
Electra Spooky SeasonEvent😏started!
Take advantage of holiday special:
🔼 Catch special Halloween boosters
🌈 Farm x2 points in Bulls'n'Bears!
🔮 Farm x2 points for BTC predictions.
Hurry! Special game bonuses are available for a week only!🧪
🍲Farm Halloween points with Electra
#electra#TON#DEX#DeFi#Web3
🎙CHOis one of few altcoins growing amidst this crypto winter.
Over the summer, the Choise.com project, recently known as Crypterium, released the DeFi platform Charism, launched web3.0 interest accounts with notable 15% APY for USDT and USDC, announced the release of Web3.0 NFT Interest accounts and an extremely relevant product for the current market - crypto price insurance.
CHO is planed to list in next CEX exchange Gate.io at 31 August.
Token’s trading volume on CMC has shown Х3 after the event and amounted over $10K.
📌 ultra successful trading false start on gate.io
📌 Altcoin traded for $3M
📌 $3M price for $CHO token – trial listing on #Gate_io
⏰ Date of trading at gate.io: 31 August
💻 Website: https://choise.com/
⚙️ Twitter: https://twitter.com/ChoiseCom
#web3#listing#gate.io #Defi#CeFi
🤩Fintopio is a new non-custodial wallet in the TON ecosystem
#Fintopio is a cryptocurrency wallet in🪙 Telegram, which can be used via mini app and website. With its help, you can conveniently use #DeFi and #CeFi functions, pay bills, divide expenses, buy goods and transfer money without leaving the application.
To get started quickly, you can import an existing wallet:
🟡Open "DeFi" tab in the Fintopio app
🟡 Click "View all"
🟡 Next – “Import wallet”
🟡 Enter your 12-word secret phrase to import your wallet
👛Currently the wallet supports: #BTC, #USDT [#ERC20/#TRC20], #ETH, #TRX and #TON.
📲 The project has a game to attract an audience where $HP (Hold Points) are farmed. You need to collect coins every 8 hours and in the future you can exchange them for the main utility token of Fintopio named $HOLD.
The token is only available to early participants of the project, the more you #HOLD, the more rewards you will receive from Fintopio.
So it's better to start right now!🚀
Game | Channel | Website