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

Резултати

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

Пребарај: #interculturaldialogue

当前筛选 #interculturaldialogue清除筛选

📘🌍 The third online meeting of the working group on the preparation of a brochure for African students at Yekaterinburg universities has been held. During the meeting, the Office of the Honorary Consul of South Africa, together with faculty members of Ural State Law University (USLU), discussed the structure of the brochure and the work plan for 2026. 👩‍🏫👨‍🏫 The USLU project team includes: ⚖️Dr. Svetlana Kuznetsova, PhD (Law) 📖Dr. Natalia Yushkova, PhD (Philology) 📖Dr. Yelena Kagan, PhD (Philology) 📖 Vitaly Yankovsky, Analyst, Department of International Cooperation #SouthAfrica#Russia#Yekaterinburg#Africa#Students#Education#InterculturalDialogue#USLU

📘🌍A Guide for African Students — the Project Continues! The Office of the Honorary Consul of South Africa and faculty members of Ural State Law University (USLU) held their second online meeting to develop a guide for African students studying at Yekaterinburg universities. So far, all major universities in the city have shared their materials designed for international students. We are now systematizing and integrating this information. 👩‍🎓🇷🇺 The guide will explain the rights and responsibilities of international students in Russia and help them avoid mistakes and administrative issues. 🌐 It will be published in Russian, English, French, Portuguese, and Arabic. From USLU, the project team includes: ⚖️ PhD (Law) Dr. Svetlana Kuznetsova 📖 PhD (Philology) Dr. Natalia Yushkova 📖 PhD (Philology) Dr. Yelena Kagan 📖Vitaly Yankovsky, Analyst at the Department of International Cooperation #SouthAfrica#Russia#Yekaterinburg#Africa#Students#Education#InterculturalDialogue#USLU

📘🌍 A Guide for African Students — Project Launched! The Office of the Honorary Consul of South Africa, together with faculty from Ural State Law University (UrSLU), has launched a project to create a practical guide for African students studying at Yekaterinburg-based universities. 👩‍🎓🇷🇺 The guide will explain students’ rights and responsibilities in Russia and help them avoid mistakes and administrative penalties. 🌐 It will be available in Russian, English, French, Portuguese, and Arabic. From USLU, the project team includes: ⚖️ Dr. Svetlana Kuznetsova (Law) 📖 Dr. Natalia Yushkova (Philology) 📖 Dr. Yelena Kagan (Philology) #SouthAfrica#Russia#Yekaterinburg#Africa#Students#Education#InterculturalDialogue#USLU

🌍African Club Launched at Ural Federal University The staff of the Office of the Honorary Consul of South Africa in Yekaterinburg🇿🇦 joined the launch of the African Club at Ural Federal University (URFU). This is a joint initiative by the university’s African Community and Chair of Oriental Studies. 🤝 📚 Together with Dr. Aleksey Antoshin, we discussed promising ideas for future collaboration. #AfricaRussia#SouthAfrica#Yekaterinburg#URFU#OrientalStudies#AfricanClub#InternationalCooperation#InterculturalDialogue