Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
#LINEAопубликовали чекер эйрдропа
Проверить дроп можно по ссылке
Клейм должны открыть 10 сентября в 11:00 по МСК
Ключевые моменты дропа:
- Минимальный порог для участия: 2,000 LXP
- Распределенено - 9.361 млрд $LINEA
- Допущенные адреса - 749,663
- Семь уровней с прогрессивным вознаграждением:
Tier 1: 2,000 LXP
Tier 2: 3,000 LXP
Tier 3: 4,000 LXP
Tier 4: 4,500 LXP
Tier 5: 5,000 LXP
Tier 6: 6,500 LXP
Tier 7: 8,000+ LXP
- Внутри уровня - линейное распределение, чтобы более активные участники получали больше
Цена $LINEA на премаркете: ≈ 0.034$
Кто крутил линею? Кому сколько насыпали?
Welcome to Linea Culture SZN😎
🎨 Find the entrance on TokenPocket's DApp Store, you can easily participate in #Linea Culture SZN on layer3xyz and find your Fam in a snap! 🎊
📱Discover page > Airdrop Zone
💻Open TokenPocket's DApp Store > Airdrop Zone
👉https://tokenpocket.pro/en/dappstore?category_id=99998&category=Trend
All-in-one, all in TokenPocket!
👉https://tokenpocket.pro
Are you human? Linea wants to know 📞
Prove that your #Linea Score leveled up! Nomis and Intract deliver this chance
📸 Meet PROOF-OF-LINEA OG: Two stages, two weeks, x2 rewards
Start Here —->
🔗Start Here
The flow is simple:
Stage 1 on Intract ->
🔗Start Stage 1
1. Verify your updated Linea Rep Score, powered by Nomis.
(If you have the old version, update it on Intract with a 50% discount to get the new one)
2. Complete social tasks.
Stage 2 on the Gravity, Nomis Platform ->
🔗Go to Stage 2
1. Use your Linea Score as a passkey
2. Obtain the PoH Medallion, powered by Intract (it's free)
3. Complete social tasks.
What you get: Intract 3 gems/user, Nomis x2 points, and 2FA verification. YOU ARE ✨ HUMAN ✨
💠Nomis tApp | X | Discord | YouTube | Check Scores⚖️
Every Nomis Score packs its own punch when it comes to benefits 🧐
For example, Linea Rep Score
🌟 Over 500K users farmed their LXP (token-convertible) through Linea Park and Linea Voyage because the Linea Score serves as a rewards ticket!
✍️ We've broken down #Linea Score for you:
• What it is
• What it unlocks
• How to make it work for you
READ THE ARTICLE 👨💻
And NOW, you have the opportunity to leverage your Score in Life on Linea:
1. Get your Linea Score
2. Visit Gravity
3. Harvest LXP with Izumi Finance
4. Gather Gravity points
5. Claim your slice of the $3k reward pool 🤑
All gain, no pain: your turn 🫵
🆕Lynex now fully supports #TokenPocket login! LynexFi
✅Lynex is LineaBuild's native on-chain liquidity marketplace. Powered by cutting-edge DEX infrastructure, it offers a highly capital-efficient DeFi solution. #Linea
🔥You can access Lynex with your TokenPocket wallet. (Both Mobile Wallet and Chrome Extension)
👉https://www.tokenpocket.pro/
👉https://app.lynex.fi/
【Details】https://twitter.com/TokenPocket_TP/status/1750718245525701079
【Powered By】Crypto Box
$3K + $5K = MBV 8 Celebration & Life on Linea Quests hosted by Nomis ❤️
The smartest move to leverage your #BNB and #Linea Reputation Scores is to get rewarded for it 👻
- 10+ partners
- Eco perks
- POINTS, POINTS, POINTS
Only YOU, your Score, and rewards ⚡️
In community we trust, in BUIDLers we build
💜
Proud to build and lead as the top Proof-of-Humanity protocol on Linea #blockchain!
Discover our Linea Reputation Score's Core and our achievements on Linea in the new YouTube video:
- What is Linea Score
- What parameters it counts
- How to get it
- How to leverage it
👉WATCH THE VIDEO HERE 👈
Don't forget to jump on Life on Linea Quest on Gravity 👽
- Prepare your #Linea Score
- Complete tasks
- Earn points 🪂
We'll distribute $3K among the users with the highest results (points + Score)
LFG 🫵