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

Резултати

Пронајдени 3 слични објави

Пребарај: #akobo

当前筛选 #akobo清除筛选
Addis Standard

@addisstandardeng · Post #21646 · 09.03.2026 г., 06:50

Thousands flee #Akobo after #South_Sudan army issues forced evacuation order Thousands of civilians have fled an opposition stronghold in eastern South Sudan after the army ordered evacuations to clear the way for a military offensive, the latest sign that the country’s fragile peace is unravelling, as fears of a return to all-out civil war haunt the world’s youngest nation. The town of Akobo, near the #Ethiopian border, was almost completely emptied by Sunday after the South Sudan People’s Defense Forces issued an ultimatum on Friday demanding that civilians, aid workers and United Nations peacekeepers leave ahead of a planned assault. “The town is now almost empty,” said Nhial Lew, a local humanitarian official. “Women, children and the elderly have left and crossed into Ethiopia.” By Sunday evening, he could hear the conflict closing in. “We are hearing the sound of machine guns.... https://www.aljazeera.com/amp/news/2026/3/8/thousands-flee-akobo-after-south-sudan-army-issues-forced-evacuation-order

Addis Standard

@addisstandardeng · Post #21767 · 19.03.2026 г., 08:09

100,000 flee #South_Sudan offensive into #Ethiopia: #UNICEF An order by South Sudan's army to evacuate the opposition-held town of #Akobo earlier this month pushed an estimated 100,000 people to flee across the border into Ethiopia, UNICEF said Tuesday. Akobo in the eastern state of Jonglei is the latest flashpoint as fighting between the government and opposition has brought South Sudan back to the brink of all-out civil war. The army ordered an evacuation of the town, including foreign aid agencies, on March 6. It claims to have since taken control of Akobo, though there have been conflicting reports of events on the ground, which have been impossible to verify due to limited communications. A security source told AFP that the army had taken over the military barracks in Akobo & destroyed buildings in the vicinity to create a buffer zone, but no official report had yet been issued.... https://www.facebook.com/AddisstandardEng/posts/pfbid0UmiC7pyEye84FEktt3LwgfgMHiF2MFVjvnVcxkEguK724EysYDK2P7hXgDrMXpFpl

Addis Standard

@addisstandardeng · Post #21625 · 06.03.2026 г., 05:28

#South_Sudan: “People keep asking me, is help coming?” Last month, a grandmother, walked for seven days, carrying her month-and-a-few-days-old granddaughter, Nyabhan. Nyaphan Nyang, the grandmother, walked with a sense of urgency, surviving on leaves. She was fleeing from the conflict that had consumed #Walgak#Payam in #Akobo West, #Jonglei State. Besides, the baby was critically ill because of severe malnutrition. Hunger had become widespread as conflict resurged in Jonglei State in December 2025. Bhan’s father had been killed in the conflict, while her mother and siblings were kidnapped by armed youth. Nyaphan was the baby’s only hope. She did get her to safety and help. Unfortunately, it was too late. A few days later Nyabhan died. The baby and the grandmother were among the several displaced people who met with Under-Secretary-General for Humanitarian Affairs and Emergency Relief Coordinator (ERC), Tom Fletcher, about a ..... https://www.unocha.org/news/south-sudan-people-keep-asking-me-help-coming