Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
#FIS/USDT analysis :
#FIS is currently in a downtrend, forming lower lows and lower highs below the 200 Exponential Moving Average (EMA).
The price has broken through the trendline support and is expected to break the neckline of the head and shoulders pattern soon.
Wait for the neckline break to enter a short position, as the swing low level will likely be tested.
TF : 2h
Entry : $0.1790
Target : $0.1615
SL : $0.1885
#FIS/USDT analysis :
#FIS is currently retracing towards the 200 EMA, presenting a favorable long opportunity at this level. The price is anticipated to continue rising and test higher resistance levels.
TF : 4H
Entry : $0.2550
Target : $0.2962
SL : $0.2314
#FIS/USDT analysis :
#FIS is currently consolidating sideways between support and resistance levels. It is recommended to wait for the price to break out above the resistance for a long entry, as an expansion in price is anticipated following this consolidation. A potential target level is $0.5708.
TF : 1W
Entry : $0.3868
Target : $0.5708
SL : $0.3190
#FIS result
3rd target achieved ✅
One more quick profit 27%+💰🤑
👉 More quick profit signals available in premium channel. Hurry up 🏃♂👇
☎️ Contact @MichaelStrategiesVip
Шанс на победу
Международная федерация лыжного спорта и сноуборда (FIS) допустила первых спортсменов до участия в Зимних Олимпийских играх 2026-го года в нейтральном статусе. В списке (не окончательном) шестеро белорусов.
От Беларуси выступят:
🎿Фристайлисты: Анастасия Андриянова, Анна Деруго, Игорь Дробенков, Анна Гуськова, Владислав Вознюк;
🎿горнолыжница: Мария Шканова.
Эти атлеты смогут принять участие в квалификационных соревнованиях к Играм в Италии. FIS уточняет, что список будет дополняться по мере проведения проверок.
В то же время Международный союз биатлонистов (IBU) ранее принял решение, которое фактически закрывает белорусским биатлонистам путь на предстоящую Олимпиаду. Но все же будет за кого болеть.
#Олимпиада2026#Беларусь#спорт#статус#FIS
ОРБИТ
Dolphin's Predictions at 3 Hours Ago & Profits Now 🤑🤑
#HIFI +%19 🆙
#LOOM +%15 🆙
#JASMY +%14.5 🆙
#FIS +%8.5 🆙
PP: %5 Profit Probability in the next 24h
LP: %5 Loss Probability in the next 24h
Check out platform, never miss any chance 🫵
Грядет "Тур де Ски": где же нейтральный статус для Волкова? 🎿
Российский лыжник Сергей Волков еще не получил нейтральный статус от Международной федерации лыжного спорта и сноуборда (FIS). Это необходимо для участия в международных соревнованиях. Турнир "Тур де Ски" стартует 28 декабря в итальянском Тоблахе и продлится до 4 января.
Несмотря на ограничения, Волков уже тренировался в Италии с Савелием Коростелевым, который имеет допуск FIS.
Цитата из источника:
Волков находится в ожидании решения от FIS.
#ТурдеСки#Лыжи#СергейВолков#FIS#Италия#ЛыжныйСпорт#СпортНовости
Новости Госдумы
#ALT market update with some free alpha
🔩
👉JASMY recently added AI to its roadmap, but the move is seen as risky and lacking confidence. AI is expected to be the main trend in 2023, with cryptocurrencies such as #FET, #CTXC, #NMR, #AGIX, and #PHB likely to benefit.
👉ACH has introduced a crypto on-ramp payment solution in Vietnam, where 30-50% of the population is invested in cryptocurrencies. The company also provides incentives for Twitter payments and is obtaining a Hong Kong license, making it a good mid-term investment.
👉CFX's founder has proposed the implementation of a burn mechanism, seeking community approval. If approved, a pump is expected similar to #RENDER. The company is also working with China, making it a good mid-term investment.
👉#RENDER is considered a good long-term investment as it operates in the GPU/VR field and has a burn mechanism in place. Additionally, it has a partnership with Apple and is poised to benefit from the growing trend in AI.
👉Arb cryptocurrencies are good investments during their respective seasons. To invest, buy on dips and hold. Some recommended Zk coins are #SYS, #DUSK, #MINA, #IMX, #CTSI, #MATIC, and #LRC. For arb, consider cryptocurrencies operating in the dex/perp/defi field such as #GMX, #GNS, #BFR, #RPL, and #GMD.
👉The ETH Shanghai update is due in Q1/Q2 with cryptocurrencies such as #FIS, #LDO, #RPL, #FXS, and #ANKR expected to benefit.
👉Finally, we believe that Chinese/Korean/Asian investors are driving the recent market pump. 2023 is the year to invest in China, so take advantage of this opportunity and good luck!