TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #76 · 27 апр.

Ранее я делал серию постов про битовые операторы. Вот вам ещё один наглядный пример как это используется в 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

Резултати

Пронајдени 1 слични објави

Пребарај: #stopreligiouspersecution

当前筛选 #stopreligiouspersecution清除筛选

@RusEmbMalta Press release 📄Illegal Actions by the Kiev Regime Targeting the Ukrainian Orthodox Church (UOC) New report by the Russian Foreign Ministry For years, the Kiev authorities have pursued a systematic campaign against the canonical Ukrainian Orthodox Church (UOC) – discriminating against its clergy, persecuting believers, and pressuring them to join the schismatic, state-sponsored Orthodox Church of Ukraine (OCU). This pressure intensified after 2022, as martial law gave rise to an increasingly authoritarian regime marked by censorship, political repression, and attacks on religious freedom. Despite its formal independence from Moscow, the UOC continues to be treated as an enemy. A legal framework has been created to eliminate the Church – from banning its access to the historic Kiev-Pechersk Lavra and imposing sanctions on bishops, to launching over 100 criminal cases against clergy. Dozens have been convicted or stripped of citizenship under vague accusations. The law adopted by the Verkhovna Rada in August 2024 now gives the regime broad powers to ban the UOC outright and seize its property – often based on the most tenuous links to the Russian Orthodox Church. Forceful church takeovers, community re-registration, and open hostility toward believers continue, largely unchecked. 🔇 International bodies, including the UN, remain silent in the face of these grave violations – sending Kiev a dangerous signal of impunity. 📘 The latest report from the Russian Foreign Ministry presents a detailed account of these developments and sheds light on the external influences – particularly from the United States – that have contributed to this crisis. 📎 You can read the full report by the Russian Foreign Ministry on this issue here. #HumanRights#ReligiousFreedom#UOC#Ukraine#ChurchRights#StopReligiousPersecution