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

Резултати

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

Пребарај: #russiantraditions

当前筛选 #russiantraditions清除筛选
Learn RCRussian🤍💙❤️

@learnrcrussian · Post #4294 · 03.03.2025 г., 14:00

The question posed to men in the US and Russia was: "Would you fully support your wife?" 🔻In Russia it depends on several issues: husband's salary (if it is high, wife is likely not much into work, but keeps the house and takes care of kids), wife's ambitions, the age and social status of the respondents. 🔻But on average, the situation when husband fully supports his wife is not rare in Russia. ❓I'm curious if it is common in your country for the husband to fully support his wife (not girlfriend!), or is it more of a 50/50 split on expenses? #Russian_culture #Russiantraditions 😎 Stay with @learnRCRussian

Russian Consulate in Cape Town

@rusconct · Post #2818 · 08.07.2025 г., 14:43

💛 8 July — Day of Family, Love and Fidelity 🕊 Today, Russia celebrates a heartfelt and meaningful holiday — the Day of Family, Love and Fidelity, which is observed in honour of Saints Peter and Fevronia of Murom, revered as the patron saints of marriage and family happiness in the Orthodox tradition. This day serves as a reminder of the timeless values that form the foundation of any society: love, fidelity, mutual understanding, and care for one another. It unites generations, strengthens family ties, and inspires the preservation of traditions and their transmission to future generations. 🌿 The symbol of the holiday is the daisy, representing purity, sincerity, and faithful love. On this day, it is customary to give daisies, hold family gatherings, and congratulate couples — especially those who have shared many years together in harmony. The Consulate General of Russia in Cape Town extends its warmest congratulations to Russian compatriots and friends of Russia on this special occasion and wishes every family peace, happiness, and enduring love! #Russia#DayOfFamilyLoveAndFidelity#RussianTraditions

Russian House Brussels-Europe

@rushousebrussels · Post #2483 · 26.06.2025 г., 12:58

🎉👰Museum Day ONLINE: “Wedding Ceremonies in Russia” 📅 1 July 2025 | 18:00 In celebration of the Day of Family, Love, and Fidelity, we invite you to a special online meeting as part of the *Hermitage Evenings* project! Discover the rich traditions of Russian wedding ceremonies through the ages in a joint project of the State Hermitage Museum and the Russian House in Brussels. ✨ Language: Russian / French ✨ Live online broadcast Join us for a beautiful cultural evening celebrating love, family, and history! 👉More details & registration #HermitageEvenings#RussianHouseBrussels#FamilyLoveFidelityDay#RussianTraditions