Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
#LEVER/USDT analysis :
#LEVER is in a downtrend, trading below the 200 EMA. The price is testing the resistance zone and is anticipated to decline from there and test lower levels.
TF : 1H
Entry : $0.000895
Target : $0.000814
SL : $0.000950
#LEVER/USDT analysis :
#LEVER is currently testing the previously respected resistance zone. A rejection is anticipated from this level, and it is expected that the price will subsequently test the previous swing low.
TF : 2h
Entry : $0.001405
Target : $0.001282
SL : $0.001487
#LEVER/USDT analysis :
#LEVER is currently in a correction phase within an overall uptrend, retracing back to the 200 EMA support zone. The price is expected to test this zone and bounce back, which would allow it to continue its bullish momentum and potentially test previous highs.
TF : 2H
Entry : $0.002570
Target : $0.002910
SL : $0.002384
#LEVER/USDT analysis :
#LEVER is currently rejecting from the resistance zone. A decline in price is expected to be seen soon until the previous lows are tested.
TF : 4H
Entry : $0.00214
Target : $0.00180 and $0.00166
SL : $0.00238
#LEVER/USDT analysis :
#Lever has broken out and retested the previous resistance zone. It is now ready to move upside and test the previous swing high.
TF : 15min
Entry : $0.00171
Target : $0.00176
SL : $0.00167
#LEVER/USDT analysis -
#LEVER has broken down below the support level with strong bearish momentum. Wait for the price to retest the broken zone for a short entry. The previous low will be tested.
TF : 4h
Entry : $0.00245
Target : $0.00199
SL : $0.00264
#LEVER/USDT analysis -
#LEVER is currently trading in a downtrend on the higher time frame. The price is currently going through a sideways correction phase. Price is currently trading near the 200 EMA and is expected to reject from there to decline further. The previous low is expected to be tested.
TF : 30min
Entry : $0.00218
Target : $0.00199
SL : $0.00229
#LEVER/USDT analysis -
#LEVER is currently in a downtrend, establishing new lows while trading below the 200EMA. The price is currently rejecting from the 200EMA and resistance zone after a corrective pullback. Price is likely to continue its downward momentum. Further declines are expected to test new lows.
TF : 30min
Entry : $0.00250
Target : $0.00214
SL : $0.00277
🔫Double Kill: #LEVER & #PYTH
Yesterday bot dropped two longs.
Today both detonated with +1000% profit (10x lev)in just one day.
• LEVER → +1284%
• PYTH → +1086%
___
📊Full stats for both strategies are on the screenshot ^^
🔍