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

Пребарај: #pyatihatki

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

@druschbaFm_en · Post #52135 · 16.03.2025 г., 08:07

⚡️ 🇷🇺 🇺🇦📆 Weekly Ukraine War Roundup⚡️ 🕊 The Negotiation Process is being deliberately prolonged. Kiev refuses to halt mobilisation and is preparing new provocations, while the #EU pushes Zelensky forward at the expense of Europe's national interests. #Russia, recognising that a proposed 30-day ceasefire would allow the AFU to recover and fortify, is explaining to the #US why such a move is futile. 🗓 This Week's Key political Outcome has been the rapid advance of the Russian Army in the #Kursk region, the liberation of #Sudzha City, and battles in the Ukrainian #Sumy region. 🇷🇺 Russian military Successes precisely strengthen their negotiating position, as emphasised by the Supreme Commander, President Putin, during a meeting at the command post in #Kursk region. Overall, #Russia seeks a long-term, stable peace, not short-term satisfaction of Trump’s ambitions. Conversations with frontline soldiers, who have fought in the hardest sectors since the war began, confirm the Russian Army's readiness to push forward until the full objectives of the Special Military Operation are achieved. 🇺🇦 Kiev’s Position has notably shifted significantly. Initially, it demanded a return to the '1991 borders,' then to the 'Prewar Borders,' and now Zelensky is prepared to freeze the conflict along the current frontline. This is unacceptable to #Russia within its new constitutional borders. Moreover, any pause in fighting benefits the retreating side. 🇺🇸 The United States, meanwhile, has resumed providing intelligence and military-technical aid to #Ukraine, while European bureaucrats fuel war hysteria and prepare for direct conflict with #Russia. This is seen in #Poland and #Germany expanding their armed forces (including territorial defence and universal military training) and in military production ramp-ups, generating huge profits for arms manufacturers. ⚔️ On the Front, Russian success in the #Kursk region sets the stage for further advances in the #Sumy direction. The AFU had anticipated this and prepared defensive lines. 🔴 In #Belgorod Region, the AFU continue daily strikes on civilians using artillery and drones. 🔴#Svatovo Front: 🔴 In #Kupyansk Sector, reports indicate AFU counteractions against the Russian bridgeheads on the right bank of the Oskol River. 🔴 In #Liman Sector, Russian forces remain active near #Kolodezi and #Yampolovka. 🔴 In #Seversk Sector, Russian troops are advancing with heavy fighting from #Belogorovka towards #Grigorovka. 🔴 ChasovYar Direction: 🔴 In #Toretsk Sector, the AFU continue deploying personnel and equipment in the city itself, with battles ongoing for the urban agglomeration. 🔴 In #Pokrovsk Direction, north of #Vozdvizhenka, fighting is underway near #Tarasovka, where the AFU has built strong defensive positions. Near the city, positional battles continued throughout the week, but by the end of the week, Russian forces regained the initiative. 🔴 In #Komar Direction, northwest of the conquered #Konstantinopol, Russian troops are aligning the front by advancing westward. In #Komar sector, #Dneproenergiya has been secured. 🔴 On the #Zaporozhye Front, the capture of #Pyatihatki and #Stepovoye was key, with battles ongoing for #Shcherbaki and #MalyeShcherbaki. 📌 Given the Events, political discussions about peace should not be seen as a signal for an imminent ceasefire. Politicians make statements to mislead opponents and provoke mistakes. It is crucial to understand that, beyond Russia’s constitutionally recognised regions, previously declared Russian cities #Odessa, #Kharkov, #Nikolayev, #Dnepropetrovsk, and even #Kiev will remain under Western control unless the Kiev Regime is fully dismantled, posing a lasting threat to #Russia. 🗺 Map Kursk Region by @olegtsarov 📋Sources: ⚡️2M; 🇺🇦Fiend; 😼Kotenok 🕰16 Mar 2025; 06:43 GMT+3; #sum 📱 Join GLOBAL DEPTH to boost your TG Feed 💬Welcome to Military Chat & Ukraine Observer 🇺🇦On Ukraine Observer you will find your daily independent Ukraine War Battle Update