Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
⚡️TON MemeRepublic: Lambo Week 2 Winner Announced
#TON#LAMBO
TON MemeRepublic reveals the winner of Lambo Week 2 as the LAMBO token, highlighting $100K in liquidity provisioning and $50K in purchases. Utilized through Swap Coffee, this involves DCA engine and liquidity deployment on STON.fi. The process will continue weekly with new tokens.
Source: link
@tonlines
⚡️swap.coffee: $LAMBO Trading Competition Announcement
#LAMBO#swap
swap.coffee presents an exciting $LAMBO trading competition with a prize pool of $2,500. Participants can trade on swap.coffee or @swapi between November 19 and 21. Top traders and random participants have chances to win various prizes in $LAMBO and Lunar Snake Onyx Black gifts.
Source: link
@tonlines
Last Call for Swap.Coffee Trading Competition!
#LAMBO#trading
Swap.coffee is hosting a $LAMBO trading competition with $2,500 in rewards. Less than 2 hours remain to join and trade for a chance to win through various prize categories, including random daily selections and top trading volume rewards.
Source: link
@tonlines
swap.coffee: LAMBO Trading Competition Concludes
#LAMBO#memerepublic
The LAMBO trading competition hosted by swap.coffee has concluded, with all rewards now available in the Claim Center. Congratulations to the LAMBO team for securing 1st place in memerepublic.
Source: link
@tonlines
⚡️TON MemeRepublic: Highlights from Week 2
#BeInCrypto#LAMBO
BeInCrypto has published a comprehensive overview of TON MemeRepublic's second week, highlighting LAMBO's victory with significant community support. The dynamic leaderboard features POK, DICKSHOTI, OC & AMORE, while favorites like UTYA, DOGS, and REDO remain competitive amid new contenders.
Source: link
@tonlines
swap.coffee: Last Chance to Win $LAMBO Prizes
#LAMBO#swap_coffee
Participants have until November 23 to hold their $LAMBO for a chance to win premium prizes on swap.coffee. The trading competition ends tomorrow, providing an opportunity to increase trading volume and earn rewards.
Source: link
@tonlines
⚡️TON MemeRepublic: LAMBO Triumphs in Week 2
#LAMBO#DEX#memecoins
TON MemeRepublic announces LAMBO as the winner of Week 2, awarding $100K after outstanding performance. Updates include a minimum 1% LP trading fee requirement and disqualification for unfounded accusations. Winners are supported with partnerships and guidance to scale their projects.
Source: link
@tonlines
📍 List of abbreviations commonly used in cryptocurrency trading:
#ALTCOIN = Alternate cryptocurrency except bitcoin
#SHITCOIN = A coin with no potential value or use
#BEAR | #BEARISH = Negative price movement
#BULL | #BULLISH = Positive price movement
#LONG = Margin buy position
#SHORT = Margin sell position
#BTFD = Buy The Fucking Dip
#DILDO = Long green or red candles 😆
#DYOR = Do Your Own Research
#FA = Fundamental Analysis
#TA = Technical Analysis
#FOMO = Fear Of Missing Out
#JOMO = Joy Of Missing Out
#FUD = Fear Uncertainty & Doubt
#HODL = Hold a position
#MCAP = Market Capitalization
#MOON = Continuous upward movement of price
#OTC = Over The Counter
#PUMP = Upward price movement
#DUMP = To sell off a coin
#REKT = When you have a bad loss
#WHALE = Very wealthy trader/Market mover
#AMA = Ask me anything
#ATH = All Time High
#ATL = All Time Low
#DLT = Distributed ledger technology
#IMO = In My Opinion
#LAMBO = Lambo is symbol that becomes an elusive goal for most investors
#NOOB = A person who is inexperienced
#SAFU = Secure Asset Funds for Users
#SHILL = Holder of altcoin who just wants to promote it for his own benefit
✅@ElfCryptoVIP