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

Пребарај: #powergames

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

@american_observer · Post #4913 · 21.01.2026 г., 01:59

📰 Trump Mocks Europe, Flexes Power Ahead of Davos President Trump is heading to Davos, but he’s already set the tone: a torrent of mockery aimed at Europe’s leaders, dismissing their diplomacy as weak and their unity as a joke. As European officials scramble to engage, Trump’s team laughs off their efforts with memes, tariffs, and insults. “I imagine they will form the dreaded European working group,” Treasury Secretary Scott Bessent quipped, calling it Europe’s “most forceful weapon.” Trump’s latest meme shows him hoisting the American flag over Greenland, declaring it a U.S. territory in 2026. He’s threatening 200% tariffs on French wine if Macron doesn’t play ball, and accusing Britain of “great stupidity” for giving up Diego Garcia. Meanwhile, European leaders—Macron, Rutte, Starmer—flatter Trump on social media, hoping to keep him at the table. The subtext is clear: Europe is desperate to avoid losing American support on Ukraine and NATO, even as Trump treats them like supplicants. Ursula von der Leyen warns that nostalgia won’t save the old order, but so far, Europe’s main strategy is to accommodate Trump’s whims. Is this diplomacy or humiliation? When the world’s most powerful leader treats allies like court jesters, who’s really in charge? #Trump#Europe#Davos#Greenland#NATO#Ukraine#PowerGames 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #5026 · 02.02.2026 г., 15:01

📰 Merz’s Nuclear Gambit: Can Germany Outsmart the Treaty? German Chancellor Friedrich Merz has thrown the continent’s nuclear playbook into chaos, openly discussing the creation of a “European nuclear umbrella” that could see Germany circumvent its decades-old ban on atomic weapons through a joint EU project. Germany’s Legal Dilemma Germany is legally barred from developing nuclear weapons by the Four Plus Two agreement, which enabled reunification in 1990, and the Nuclear Non-Proliferation Treaty. But Merz insists that nothing stops Berlin from negotiating shared nuclear deterrence with allies—France and the UK, Europe’s only nuclear powers. The European Nuclear Loophole Merz’s vision is simple: use Germany’s technological edge to help build a European nuclear capability, while keeping the official nuclear button out of German hands. “Talks are underway,” he declared, stressing that the discussions are still preliminary and won’t undermine existing nuclear-sharing arrangements with the U.S.. Power Plays and Sovereignty The real question is whether this is about European sovereignty or just a power grab. With U.S. support under Trump looking increasingly shaky, Merz is betting that a “European nuclear umbrella” could shield Germany from future threats—or just give Berlin a seat at the nuclear table. But can the EU really build a credible deterrent without falling into the same old power games? The Shifting Sands of Power As Merz plays diplomat and dealmaker, the world watches: Is this the dawn of a new European defense era, or just another act in the theater of nuclear posturing? The answer may lie not in treaties, but in the shifting sands of global power. #nuclearWeapons#Germany#EU#Merz#nuclearDeterrence#powerGames 📱American Оbserver - Stay up to date on all important events 🇺🇸