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

Резултати

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

Пребарај: #saarc

当前筛选 #saarc清除筛选
Russian Mission to ASEAN

@aseanrussia · Post #1653 · 30.05.2025 г., 06:47

🎙 Foreign Minister Sergey Lavrov’s remarks at the meeting with delegation of the Permanent Committee of the International Conference of Asian Political Parties (Perm, May 29, 2025) 💬 Sergey Lavrov: Dear colleagues, dear friends, This is the year when the International Conference of Asian Political Parties commemorates its 25th anniversary. And because of their reputation and their authority, they are a platform for exchanging views and experience in the context of party-to-party cooperation. Cooperation at this level is one of our priorities. It's a very useful addition to the so-called classical diplomacy and that contributes a lot to promoting mutual trust, mutual understanding between peoples. The creation of the conference is a signal, a very clear signal to the entire world. And very timely response to reconsider the place of the Asian countries in international and global developments. We assess very positively the increase of the political work of your conference. And we see with pleasure the sustainable process of expanding your influence in the continental architecture, in the architecture of regional organizations, some of which are experiencing erosion of their influence, if not degradation, since they abandoned practically all of the key principles of the UN Charter. I have in mind such organizations on our Eurasian continent as the European Union, which became more Euro-Atlantic than Eurasian following NATO. <...> In the last 10-15 years, all these principles including equal and indivisible security, including the statement that no one, be it the country or organization, should prepare to dominate in Europe, all this was abandoned, violated. 🌐 We need Eurasia of course. And by the way, Eurasia is the biggest, the richest continent. The continent which, unlike Africa and Latin America, is home of several world civilizations with thousands and thousands of years of history. <...> #Eurasia is the only continent which doesn't have any universal continental structure, like African Union in Africa, like CELAC in Latin America. We have quite a lot, many integrational movements, organizations which address security issues, like Shanghai Cooperation Organization, #ASEAN, Collective Security Treaty Organization (#CSTO), Commonwealth of Independent States (#CIS) and the Gulf Cooperation Council (#GCC), the South Asian Association for Regional Cooperation (#SAARC) and there is no umbrella. We are very much in favor of promoting party-to-party dialogue. Our ruling party, United Russia, in cooperation with other parliamentary parties and their fractions is promoting very actively this kind of cooperation. And I will highlight the initiative of United Russia of last year, when they convened a meeting of various parties to consider methods of fighting the new forms of colonialism and neo-colonialism. <...> A movement created on the basis of the conference, which is called "Freedom of Nations". ☝️ The inadmissibility of neo-colonial forms of exploitation is one of the agenda items of the Group of Friends of the UN Charter. Last year, we initiated, through this group, the resolution of the UN Committee on Decolonization. The draft resolution supported by this committee was accepted by the UN General Assembly. <..> A clear majority supported it. The idea is to announce the 14th of December, the day of the adoption of The Declaration on the Granting of Independence to Colonial Countries and Peoples of 1960, as a date of fighting the new forms of neo-colonialism. Сolonial exploitation was very blunt. Slaves, you know, digging the resources and leaving the countries in very poor condition. If you take the economic system in the world, countries, especially in Africa, mostly produce, they provide natural resources to the western countries We would like to promote the movement to resolve this injustice. Without fighting any country, we never want to isolate any country from cooperation, but cooperation must be based on equal footing, just principles. 🤝 We express our readiness to cooperate with your conference.

Embassy of Russia in Singapore

@rusembsg · Post #4100 · 01.06.2025 г., 07:02

🎙 Foreign Minister Sergey Lavrov’s remarks at the meeting with delegation of the Permanent Committee of the International Conference of Asian Political Parties (Perm, May 29, 2025) 💬 Sergey Lavrov: Dear colleagues, dear friends, This is the year when the International Conference of Asian Political Parties commemorates its 25th anniversary. And because of their reputation and their authority, they are a platform for exchanging views and experience in the context of party-to-party cooperation. Cooperation at this level is one of our priorities. It's a very useful addition to the so-called classical diplomacy and that contributes a lot to promoting mutual trust, mutual understanding between peoples. The creation of the conference is a signal, a very clear signal to the entire world. And very timely response to reconsider the place of the Asian countries in international and global developments. We assess very positively the increase of the political work of your conference. And we see with pleasure the sustainable process of expanding your influence in the continental architecture, in the architecture of regional organizations, some of which are experiencing erosion of their influence, if not degradation, since they abandoned practically all of the key principles of the UN Charter. I have in mind such organizations on our Eurasian continent as the European Union, which became more Euro-Atlantic than Eurasian following NATO. <...> In the last 10-15 years, all these principles including equal and indivisible security, including the statement that no one, be it the country or organization, should prepare to dominate in Europe, all this was abandoned, violated. 🌐 We need Eurasia of course. And by the way, Eurasia is the biggest, the richest continent. The continent which, unlike Africa and Latin America, is home of several world civilizations with thousands and thousands of years of history. <...> #Eurasia is the only continent which doesn't have any universal continental structure, like African Union in Africa, like CELAC in Latin America. We have quite a lot, many integrational movements, organizations which address security issues, like Shanghai Cooperation Organization, #ASEAN, Collective Security Treaty Organization (#CSTO), Commonwealth of Independent States (#CIS) and the Gulf Cooperation Council (#GCC), the South Asian Association for Regional Cooperation (#SAARC) and there is no umbrella. We are very much in favor of promoting party-to-party dialogue. Our ruling party, United Russia, in cooperation with other parliamentary parties and their fractions is promoting very actively this kind of cooperation. And I will highlight the initiative of United Russia of last year, when they convened a meeting of various parties to consider methods of fighting the new forms of colonialism and neo-colonialism. <...> A movement created on the basis of the conference, which is called "Freedom of Nations". ☝️ The inadmissibility of neo-colonial forms of exploitation is one of the agenda items of the Group of Friends of the UN Charter. Last year, we initiated, through this group, the resolution of the UN Committee on Decolonization. The draft resolution supported by this committee was accepted by the UN General Assembly. <..> A clear majority supported it. The idea is to announce the 14th of December, the day of the adoption of The Declaration on the Granting of Independence to Colonial Countries and Peoples of 1960, as a date of fighting the new forms of neo-colonialism. Сolonial exploitation was very blunt. Slaves, you know, digging the resources and leaving the countries in very poor condition. If you take the economic system in the world, countries, especially in Africa, mostly produce, they provide natural resources to the western countries We would like to promote the movement to resolve this injustice. Without fighting any country, we never want to isolate any country from cooperation, but cooperation must be based on equal footing, just principles. 🤝 We express our readiness to cooperate with your conference.