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 слични објави

Пребарај: #euthieves

当前筛选 #euthieves清除筛选

🎙Russia's Foreign Minister Sergey Lavrov’s interview with RIA Novosti(November 9, 2025) Read in full (Telegraph) #RussiaUS#NewSTART ❓ Question: President of Russia Vladimir Putin announced that the Russian Federation is prepared to continue adhering to the restrictions established by New START for one additional year, starting February 5, 2026. Has there been any response from the United States? Did Moscow propose a meeting with Washington to discuss the post-New START period? If so, at what level? 💬Sergey Lavrov: The constructive initiative put forward by President Vladimir Putin in the post-New START context speaks for itself. It contains no hidden agenda and is perfectly clear for understanding. Its practical implementation would not require any special additional efforts. <...> The only thing required is reciprocity from the United States: we will voluntarily adhere to the restrictions only if, and precisely for as long as, the other side does the same. <...> So far, there has been no substantive response from Washington. We have been informed through diplomatic channels that “the issue is under consideration.” We have no intention of keeping persuading anyone. We believe that our step serves the interests of both parties and the entire international community. 👉 We are ready for any development of events, while hoping for a positive outcome. #Ukraine#RussiaUS ❓ Question: What is currently the main stumbling block in the negotiations with the United States on a settlement around Ukraine? Where is Russia ready to make concessions and where is it not? 💬Sergey Lavrov: <...> We are currently awaiting confirmation from the United States that the Anchorage agreements remain in effect. I would emphasise that, despite their essentially compromise nature, we have not abandoned – and do not intend to abandon – the points that are fundamental for us. ❗️ No one disputes the territorial integrity of the Russian Federation or the choice made by the residents of Crimea, Donbass, and Novorossiya, who made their historic decision to reunite with their homeland through the referendums in 2014 and 2022. We likewise do not forget the need to eliminate the root causes of the conflict. #EUthieves ❓ Question: What will be Russia’s response if the frozen assets of the Russian Federation are directed to support Kiev? 💬Sergey Lavrov: <...> Such actions amount to outright deception and theft. It seems that the long-dormant instincts of colonialists and pirates have reawakened among Europeans. No matter how the scheme for seizing Russian funds is presented, there is no lawful way to carry it out. The confiscation of our gold and foreign currency reserves will not save the Europe’s protégés in Kiev <...> Russia will respond to any predatory actions appropriately, in accordance with the principle of reciprocity, our national interests, and the need to compensate for the damage caused to us. We hope that Brussels and other Western capitals will still come to their senses and abandon this ill-advised venture. #RussiaUS ❓ Question: When and where could a meeting between the Russian and American delegations on mutual “irritants” take place? What about your meeting with US Secretary of State Marco Rubio? When and where might it be held? 💬Sergey Lavrov: There are indeed many irritants in Russia-US relations, most of them inherited from the previous US administration. It will take considerable time to clear up this mess. <...> From our perspective, it is important that this dialogue should not be limited solely to embassy-related issues. We consider it essential to address broader questions, including the restoration of direct flights and the return of Russian diplomatic property. <...> Secretary of State Marco Rubio and I share an understanding that maintaining regular communication is essential, both for discussing the Ukrainian issue and for advancing the broader bilateral agenda. We remain in contact by phone and are prepared to hold in-person meetings.