Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
🚀🚀 Storming Profits in the Premium Group
🎯🎯#DEEP/USDT has covered all the targets to give a profit 106% for all Premium Members
👁🗨Contact @futurechief to enter the Premium Futures & SPOT Group for daily gains
🚀🚀 123% Profit on #DEEP/USDT for our Premium Members on Binance Futures/Bybit/OKXX/Kucoin/Bitget
✅✅ All target completed
👁🗨Contact @primemod to enter the Premium Group for high quality SPOT & FUTURES Signals
Don't avoid the cliches - they always work because they are clichés.
In this post, you may face the author's offensive views about people's excessive repeated utterances that are widespread, calling attention to avert them. Basically, let it be on Instagram stories or Facebook profile pictures, you see people who post a picture of Yale, write Yale class of 2029 on the bio, and many similar actions.
Holders could have no issue with posting them, and they are entitled to publish anything they care to do unless they don't publish political statements that can be conceived as an opposing point. By talking with people who already know the ups and downs of US admissions and hearing things I wasn't aware of, I realized that getting into a TOP-20 school requires hard work: nighttime study sessions, countless drafts of the final masterpiece, and dreadful deadlines. But everyone, not just me, can sense that people ignore the pain of those mentioned above and end up somewhere else where they have no desire to pursue their 4-year life.
Rather than writing cool bio captions for NYU'28 or whichever college you dream of, spend time working on crucial components of the college application, check your essays to the expert, scrutinize what actions "99%" applicants are doing, and do the opposite or a bizarreness. My utterances may hurt souls, but I'm showing the truth (ridiculous actions).
Now, get off this app and finalize your college list, which you care less to do. Two months left to catch the golden fish!
#deep
#Deep Research #分享
分享:三款OpenAI Deep Research替代开源项目
https://github.com/nickscamara/open-deep-research
https://github.com/mshumer/OpenDeepResearcher
https://github.com/dzhng/deep-research
📢频道✈️群组☘️博客📬投稿
Happiness always look small while you hold it in your hands,
but let it go,
and you will learn at once
how big and precious it is.
– Maxim Gorky
#happiness#deep@quietworld🍃