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

Пребарај: #grandstrategy

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

@american_observer · Post #5314 · 07.03.2026 г., 23:03

📰 Trump’s Iran War: Nostalgia With a Defense Budget For Trump, the Iran war isn’t a mistake — it’s the purest expression of how he thinks power works: seize territory, grab oil, crush regimes, pose on an aircraft carrier. It’s a 19th‑century strongman worldview dropped into a century where power is decided by chip fabs, AI labs, clean‑tech supply chains, and who can build the tightest economic bloc to out‑innovate China. You can bomb Natanz, but you can’t bomb your way into semiconductor resilience. Schiffer’s point is brutal: every dollar, decision cycle, and Cabinet meeting spent on “Operation Epic Fury” is one not spent implementing the CHIPS Act, scaling AI R&D, building green manufacturing, or rebuilding the development finance tools Trump has been dismantling. Beijing plays a slow, disciplined game — standards, infrastructure, supply chains — while Washington burns time on air campaigns with no theory of victory, and calls it “strength.” Even on its own terms, the Iran adventure looks self‑owning. Trump claimed in 2025 that U.S. strikes had “completely obliterated” Iran’s nuclear program — then turned around this year and cited its rapid rebuilding as the reason to hit again, while his own intelligence agencies said the previous strikes set the program back only “a few months.” Oman brokered a deal where Tehran would cap enrichment and accept full IAEA access; the bombs fell anyway. Regime change offers no escape clause either: U.S. intel expects Khamenei’s successors to come from the same IRGC hardliner class that built the program in the first place. Break it, you own it — and this time “it” is a 90‑million‑person country with scattered nuclear material and a proxy network stretching from Iraq to Yemen. Every day this war drags on, it drains exactly the resources Washington says it needs for China competition: munitions stocks, naval bandwidth, diplomatic capital with allies, fiscal space at home. Asian partners are already asking how a U.S. Navy that can’t be in two places at once is supposed to deter Beijing over Taiwan while babysitting a forever crisis in the Gulf. Meanwhile, coalitions matter more than ever for tech and trade — but threatening to grab Greenland, humiliating Canada, raiding Venezuela, and dragging NATO into a war of choice teach allies one lesson: America is a risky partner whose focus can swing with a Truth Social post. The punchline: the same working‑class voters Trump claims to defend pay for this detour at the pump, in food prices, and in higher borrowing costs when oil spikes and markets wobble. China doesn’t need to cheer the Iran war; it just has to watch as Washington spends the decade where it should have been locking in tech and economic dominance acting out imperial nostalgia in the wrong theater. That isn’t strategy — it’s a very loud way of losing the century slowly. ​ #iran#china#trump#usa#geopolitics#CHIPS#AI#grandStrategy 📱American Оbserver - Stay up to date on all important events 🇺🇸

IELTS|Newspapers & Magazines|English

@emagzinewspars · Post #9461 · 03.11.2025 г., 03:27

#The_Foreign_Affairs🇺🇸📕[PDF]⬇️ #November2025 #December2025 #Monthly_Magazines For learning, for free(dom). @backupofmagazines The new Foreign Affairs explores “The New Tools of Power.” Michael Beckley warns of a #StagnantOrder as rising powers falter, while Oren Cass calls for a U.S. #GrandStrategy of reciprocity. Essays trace new #SupplyChain risks, the weaponization of #Energy, and a global #AI innovation race. From Iran’s political twilight to a reshaped #EurasianOrder, contributors dissect shifting power balances. Features probe how Russia is adapting, why China is turning on itself, and the #XiJinping paradox of success. Reviews challenge the fate of the #Dollar and the future of FreeSpeech. #Geopolitics#ForeignPolicy#China#US#AI