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

Пребарај: #fromdogalitoadwa

当前筛选 #fromdogalitoadwa清除筛选
Red Nile

@rednile12 · Post #10886 · 26.01.2026 г., 17:20

🔺Continuation from above @rednile12 🔷Ras Alula’s Warning — and Italy’s Defiance Deeply angered by the occupation, Ras Alula Abanega, the most formidable general of Emperor Yohannes IV, sent a formal letter to the Italian commander General Genè, demanding that Italian forces vacate Ethiopian territory. ❗️ Italy refused. General Genè responded that he had no authorization from Rome to withdraw, and instead advanced inland toward Saati, where Italian forces began building fortifications—a clear signal that Italy intended permanent occupation. 🔷The Battle Ras Alula immediately mobilized his forces. Moving swiftly from the highlands, he confronted the Italian column at Dogali, a narrow and exposed terrain ideal for Ethiopian tactics. 🔹 Italian force: ~550 soldiers 🔹Ethiopian force: Larger, mobile, and battle-hardened 🔹Result: ▪️~470 Italian soldiers killed ▪️~80 wounded ▪️The Italian column was almost entirely annihilated This was not a skirmish—it was a strategic humiliation. 🔷Shockwaves in Italy and the Western Press 🔹Italian Press Reaction The defeat sent shockwaves through Italy. ▪️Newspapers such as La Tribuna and Corriere della Sera described Dogali as a “national tragedy” ▪️The fallen soldiers were quickly turned into martyrs of empire ▪️Public outrage fueled calls for revenge, not withdrawal Instead of questioning colonial aggression, the Italian press framed the defeat as: ▪️ A stain on national honor ▪️ Proof that Italy needed more troops, more funding, and harsher measures This reaction directly paved the way for Italy’s militarization of Eritrea and its later full-scale invasion of Ethiopia—culminating in Adwa (1896). 🔷Western Media Narrative Much of the broader European press reacted with disbelief. ▪️ Ethiopia’s victory contradicted the racist colonial assumption that African armies could not defeat Europeans ▪️ Some Western outlets downplayed Ethiopian strategy and leadership, attributing the loss to: ▪Italian “mismanagement” ▪Poor logistics ▪Terrain 🔹 Rarely did they acknowledge: ▪️Ras Alula’s military brilliance ▪️Ethiopia’s organized command structure ▪️Indigenous intelligence and strategy Yet privately, Dogali triggered a quiet realization in Europe: Ethiopia was not a weak state—it was a serious military power. 🔷Why Dogali Matters Dogali was: ▪️One of the first major African victories over a modern European army ▪️A psychological blow to colonial arrogance ▪️A direct precursor to Adwa, where Italy would suffer an even greater defeat ▪️It proved that Ethiopian resistance was not accidental, but systematic, strategic, and national. መብቱን ዮሐንስ ላሉላ ቢሰጠው እንደ ቀትር እሳት ቱርክን ገላመጠው ጣሊያንም ወደቀ እያንቀጠቀጠው አጭዶና ከምሮ እንደገብስ አሰጣው።» Photo Descriptions Image 1: Ras Alula Abanega, architect of the victory at Dogali Image 2: Italian troops burying their dead after the defeat (January–February 1887) Image 3: Wounded Italian soldiers transported back to Italy and treated in Naples — RedNile Media🌊🧭 📡@rednile12 Geopolitics | Multipolarity | Sovereignty | Strategic Reality #RedNileMedia#EthiopiaFirst #BattleOfDogali#AdwaVictory #FromDogaliToAdwa #HistoryBeyondTheWest

Red Nile

@rednile12 · Post #10888 · 26.01.2026 г., 18:32

The Strategic Containment of an Empire: How Europe Engineered Ethiopia's Landlocked Fate Red Nile Media | Deep Dive Analysis The story of Ethiopia in the late 19th and early 20th centuries is often celebrated as a heroic narrative of military triumphs at #Dogali (1887) and #Adwa (1896). Yet, a closer examination reveals a far more complex geopolitical saga. These victories did not translate into unbridled sovereignty; rather, they triggered a deliberate and coordinated European strategy of containment. The culmination of this strategy was the 1906 Tripartite Treaty—a formal pact that sealed Ethiopia’s landlocked destiny. 📌 This article expands on that history, incorporating academic perspectives to illuminate the “how” and “why” behind this enduring geopolitical outcome. 🔗Read the Full Article Here #RedNileMedia#EthiopiaFirst #BattleOfDogali#AdwaVictory #FromDogaliToAdwa #HistoryBeyondTheWest