Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
MyTonWallet v3.5 – let's take a look!
💎What has changed:
🫥The transaction feed has become more convenient and informative. "Change" and technical transactions are now grouped and do not interfere with viewing the history, and token icons are displayed during exchange. You can even see the average purchase price of a coin – very convenient
🩷
🫥Hiding the balance – the button is located at the top of the card on the main screen.
🫥 Now creating a deposit link, you can select any TON-token in which you want to receive funds to your wallet.
🫥MyTonWallet NFT cards provide access to advanced interface personalization. All palettes can be seen in the settings.
🔄 Since March 27, the service fee for $MY token exchanges in pairs with TON and USDT has been removed. The #MyTonWallet team hinted that they are working on further updates and exploring new blockchains. 👀
Channel | Chat | Mini-app
Updates from TON — LIVE: New Features in MyTonWallet
#TON#MyTonWallet
TON — LIVE reports that MyTonWallet has introduced an update allowing for mass transfers of TON and tokens in a single transaction, along with new options for renewing multiple TON DNS domains simultaneously.
Source: link
@tonlines
TON — LIVE: MyTonWallet v3.6 Update Released
#MyTonWallet#TON
TON — LIVE reports that MyTonWallet has released update v3.6, introducing the ability to view any TON and TRON addresses and share links to transfers immediately after sending. The update also includes action previews in dApp and auto-unlock via PIN.
Source: link
@tonlines
TON — LIVE: MyTonWallet to Launch Bank Cards
#MyTonWallet#TON
The TON — LIVE channel reports that MyTonWallet is planning to introduce bank cards. This development could enhance MyTonWallet's service offerings.
Source: link
@tonlines
TON — LIVE: NFT Card Minting Resumes
#MyTonWallet#NFT
TON — LIVE announces that MyTonWallet has resumed minting of NFT cards for users who staked or exchanged coins in the past month.
Source: link
@tonlines
TON — LIVE: MyTonWallet Unveils NFT Card Minting
#MyTonWallet#NFT
MyTonWallet has introduced NFT card minting, available for only 50 active users. These cards offer unique wallet design customization, with more features to be announced soon.
Source: link
@tonlines
🌿🌸 Spring is Here! Fresh Features from MyTonWallet v3.4
😎The most important news
In version v3.4, a mini-app #MyTonWalletappeared inside Telegram. Now you can use your favorite wallet in TMA format
🩷 — @myapp. Just import the Seed phrase from your current TON wallet and you can use it 🤑
Changes and new features:
🔵Knowledge base – a new section in the wallet settings (there is also a direct link to the guides ). For beginners, this is a very useful feature, as there is a lot of information about working with #web3 environment.
🔵 Several new features have been added for working with addresses and transactions.
🔵Transparent fees in TON Connect are a very convenient addition that allows you to see the size of $TON fees
💎Channel | Chat | Mini-app
TON — LIVE: Integration of USDe Stablecoin in MyTonWallet
#Ethena#MyTonWallet
TON — LIVE shares that the USDe stablecoin from Ethena is now integrated into MyTonWallet. Users can also participate in staking with returns up to 18% annually.
Source: link
@tonlines
⚡️Storm Trade: STORM Token Rewards Distributed
#STORM#MyTonWallet
Storm Trade has announced that rewards in STORM token from the MyTonWallet contest have been successfully distributed. Wallet holders are advised to check their balances.
Source: link
@tonlines
⚡️Storm Trade News: Join the $STORM Trading Tournament!
#STORM#MyTonWallet
Storm Trade | News has partnered with MyTonWallet for a trading tournament, offering $2,500 in prizes for top $STORM traders. Participants can earn cashback and stake $MY to reduce fees. The tournament runs from April 14–29.
Source: link
@tonlines
🎙New Interview with the Creator of MyTonWallet
TON App Journal recently published a written interview with Alexander Zinchuk, the founder of 💎MyTonWallet. If you're curious about the project’s philosophy and the team’s vision, it’s definitely worth a read
Highlights from the conversation:
🔵#MyTonWallet is built on the principles of freedom, user respect, and decentralization.
🔵Security, transparency, and ease of use are top priorities. Features like TON Proxy and multichain standards help make the TON ecosystem more accessible.
🔵 The team is made up of experienced developers focused on minimalist design and intuitive UX.
🔵#MTW was the first wallet on TON to undergo a CertiK audit.
🗣We’re currently working closely with TON Core, DeDust, and Tonscan to improve the speed of transfers and swaps within the network — and that’s just the beginning🗣 , says Alexander.
📖The MyTonWallet blog has been live for nearly six months, sharing major updates and release news (also mirrored in their Telegram channels).
💡 The team also published an important breakdown of a seed phrase theft scheme — a must-read for newcomers.