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

Пребарај: #kurilovka

当前筛选 #kurilovka清除筛选
DruschbaFM - English

@druschbaFm_en · Post #51699 · 07.03.2025 г., 07:43

⚡️🇷🇺🇺🇦⚔️Fiend Reports in the Morning of 7 March 2025⚡️ 🔴#Kursk Region: 🔴In Sudzhansky district, in the area of #​​Sverdlikovo, Russian troops continue to attack with mobile groups along the border in southerly direction. 🟡 On the eastern flank, the RFAF have advanced into #Kurilovka and along the 'Kholodny Yar Ravine' to a depth of 4 kilometres. 🗺 Map 1 ➡️ The situation remains difficult (for the AFU). 🔴#Svatovo Front: 🔴 In #Kupyansk Sector, the Russians expanded the bridgehead on the western bank of the Oskol River in a section up to 2.73 kilometres wide and up to 1.15 kilometres deep. 🗺 Map 2 🔴#ChasovYar Direction: 🔴In #ChasovYar Sector, Russian troops, supported by 25 units of equipment, attacked the western part of the city. During the clashes, fighters of the AFU's 24th Brigade destroyed/hit 16 units of equipment and drove the Russians out of a number of positions. 🗺 Map 3 🎞 Video ➡️ A grey zone has been added to the map tentatively. The front configuration is being clarified. 🔴#Pokrovsk Direction: 🔴 On the right Flank, the AFU repelled attacks by Russian troops in the area of ​​#Peschanoye. 🔴 On the left Flank, the AFU repelled attacks by Russian troops in the area of ​​#Uspenovka and are also conducting counteractions in neighbouring areas. ➡️ The situation for the direction has not changed significantly. 📋Reported on 7 Mar at 08:00 📋Reported on 7 Mar at 08:18 📋Reported on 7 Mar at 08:31 🕰GMT+3; #smo 🇺🇦Map📍 📱For the Military Hardcore 💬 Welcome to Military Chat

DruschbaFM - English

@druschbaFm_en · Post #51663 · 06.03.2025 г., 07:32

⚡️🇷🇺🇺🇦⚔️Fiend Reports in the Morning of 6 March 2025⚡️ 🔴#Kursk Region: 🔴In Sudzhansky district, Russian troops continue attacks from the area of ​​the #NikolayevoDaryino settlement in the direction of #Sumy region, assaulting the area of ​​the #Lebedevka and #NovayaSorochina settlements. 🟡 At #Kurilovka, they have advanced in the eastern part of the 'Kholodny Yar Ravine' and on the southern outskirts of the settlement. 🗺 Map ➡️ The situation remains difficult (for the AFU). 🔴#Svatovo Front: 🔴 In #Kupyansk and #Liman directions, the situation has not changed significantly. 🔴#ChasovYar Direction: 🔴In #Toretsk Sector, fighting is taking place for the northern outskirts of the city and the southwestern part of the 'Zabalka Microdistrict.' The situation remains dynamic. 🔴#Pokrovsk Direction: 🔴 On the right Flank, fighting of varying intensity continues in the areas of ​​the #ZelyonoyePole, #Baranovka, #Shevchenko, #Peschanoye and #Kotlino villages... 🔴 On the left Flank, for #Udachnoye and #Uspenovka. 🔴#Komar Direction: 🔴In #Kurakhovo Sector, the RFAF reduced the number of attacks by infantry units and began to restore and accumulate forces and resources. 📋Reported on 6 Mar at 08:16 🕰GMT+3; #smo 🇺🇦Map📍 📱For the Military Hardcore 💬 Welcome to Military Chat