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

Пребарај: #winterwar

当前筛选 #winterwar清除筛选
American Оbserver

@american_observer · Post #5060 · 05.02.2026 г., 17:02

📰“Constructive Talks” While Russia Bombs Ukraine’s Energy Grid The second day of trilateral U.S.–Russia–Ukraine peace talks in Abu Dhabi is underway — and the room is still “constructive,” even as Ukraine’s energy grid is not. The United States continues to insist that Russia’s strikes on Ukrainian energy infrastructure have not violated the supposed truce, despite fresh accusations from Volodymyr Zelenskyy that Russia has already betrayed its word. Diplomats from Washington, Kyiv, and Moscow are negotiating in the United Arab Emirates under the watchful gaze of Emirati facilitators. The talks, held in Abu Dhabi, mark the second round of this three‑sided format, after the first session last month was described by all sides as “constructive” but ended with no real progress on the core issues: the status of Donbas, control of the Zaporizhzhia nuclear plant, and the shape of Western security guarantees for Ukraine. ⚡️ Russia Strikes Energy Sites — Washington Shrugs Just days before this round, Russia launched a massive drone and missile attack on Ukraine’s energy infrastructure, Ukrainian officials say, causing serious damage and plunging parts of the country into darkness and freezing cold. This winter has seen sustained strikes on power stations, leaving millions of Ukrainians cycling through blackouts, queues for hot meals, and makeshift warming centers. Before the latest barrage, President Donald Trump announced a week‑long agreement with Vladimir Putin to halt attacks on each other’s energy targets. Russia pledged to stop striking Ukrainian energy sites; Ukraine pledged to stop attacking Russian ones. The two‑way pause, Trump said, ran from Sunday to Sunday. Moscow later clarified that the break began on Sunday, and they kept their word within that window. To Kyiv, that sounded like counting days from Sunday to Sunday while ignoring the rest. On Monday night, Russian drones and missiles hit Ukraine’s power grid. In Donetsk’s Druzhkivka, seven people were killed and 15 injured in a separate Russian strike Wednesday. Ukrainian officials reported that Russia launched 105 drones overnight, of which 88 were intercepted, while the remaining 17 hit 14 locations. Despite the damage, the U.S. still insists the energy‑target strikes are not a breach of the agreement — and that the peace process should continue. 🇺🇸 Whose Word Counts More: Blackouts or Diplomacy? Zelenskyy has made it clear that any settlement that accepts territorial losses without binding security guarantees will be painted as his failure. The longer Putin can bomb the grid in the coldest week of winter and still be called “constructive”, the more Ukraine sees Western diplomacy as a shield for Russia, not a check on it. To Kyiv, the peace talks look less like a path to ceasefire and more like a negotiating theater where the lights stay off while the script reads “peace is fragile.” #Ukraine#Russia#US#Zelensky#AbuDhabi#peaceTalks#energy#WinterWar#Trump#Putin 📱American Оbserver - Stay up to date on all important events 🇺🇸