Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
#ACM/USDT analysis :
#ACM is currently in a correction phase and is expected to retrace to test the 200 EMA before resuming its bearish momentum. However, the current level presents a good opportunity for long trade.
TF : 4H
Entry : $1.075
Target : $1.193
SL : $0.994
#ACM/USDT analysis :
#ACM is currently in a downtrend, with the price consistently trading below the 200 exponential moving average (EMA). Recent price action shows a rejection from the 200 EMA, suggesting a continuation of the downward momentum. As a result, it is expected that the price will decline further and test previous lows.
TF : 1D
Entry : $1.520
Target : $1.235
SL : $1.690
#ACM/USDT analysis :
#ACM is in a downtrend, trading below the 200 EMA. The price is currently retracing back to the 200 EMA and a resistance zone, and it is expected to decline from this point, continuing its bearish momentum to test lower levels. It is advisable to wait for a pullback for a short entry.
TF : 1H
Entry : $1.535
Target : $1.478
SL : $1.567
#ACM👈
Call given here
Hit 1667
Target 1 done ✅
14% profit
If you invested 1 btc it's now 1.14 btc now 🤑🤑
Signal before pump @ low level
Always trade with us for max profit 😊🤑💃
We are best pump tracker 🤑
#ACM#站免
ACM 五周年,站免两周。
Dear @everyone
We are absolutely thrilled to announce that we are celebrating the 5th anniversary of our beloved platform dedicated to the mesmerizing world of Asian cinema! 🥳🍾
It feels like just yesterday that we embarked on this incredible journey, passionate about bringing you the best of Asian cinema. Over the past five years, we've delved deep into the heart of cinematic artistry, exploring the rich tapestry of stories, cultures, and talents that make Asian cinema truly exceptional.
One of our core missions has always been to spread our love for Asian cinema around the globe and are very proud of what we have been able to accomplish so far. We've had the privilege of showcasing masterpieces, hidden gems, and emerging talents from across Asia. From the heartwarming dramas to the pulse-pounding action, the thought-provoking indie films to the visually stunning blockbusters, every frame has been a celebration of the cinematic excellence that defines Asian cinema.
To mark this momentous occasion, we have activated global FreeLeech (FL) for the next 2 weeks so you can finally download all those films you have bookmarked since our last global FL :). This celebration is not just about looking back but also about looking forward to the exciting cinematic adventures that await us.
None of this would have been possible without the unwavering support of our dedicated community. To each and every one of you who has shared their love for Asian cinema, contributed insightful discussions, and made this platform a vibrant hub – THANK YOU! Your enthusiasm fuels our passion, and we are incredibly grateful for your ongoing support.
As we raise a virtual toast to the past five years, we eagerly look forward to the next chapter. With your continued support, we are confident that the future holds even more exciting discoveries, cinematic treasures, and shared moments of joy.
Thank you for being a part of our cinematic journey. Here's to five years of Asian cinema magic, and to many more to come!
Cheers to the love of film! 🎉🎬✨
Yours,
AsianCinema Team