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

Пребарај: #moyale

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

@addisstandardeng · Post #21544 · 27.02.2026 г., 09:03

#Kenya arrests suspect in duping men to fight for #Russia in Ukraine war Police in Kenya have arrested a man accused of being a member of a human trafficking scheme that lured Kenyans to Russia with false promises of work, only for them to end up fighting on the front lines of #Ukrainian battlefields. In a statement released late on Wednesday, Kenyan officials said Festus Arasa Omwamba was being detained in #Moyale, a town in the country’s north bordering Ethiopia. The 33-year-old “is believed to be a key player in a more extensive human trafficking syndicate that exploits vulnerable individuals by promising them legitimate employment opportunities in European ..... https://www.aljazeera.com/news/2026/2/26/kenya-arrests-suspect-in-duping-men-to-fight-for-russia-in-ukraine-war?utm_source=facebook&utm_medium=social&utm_campaign=socialPulse&fbclid=IwY2xjawQOIs1leHRuA2FlbQIxMABzcnRjBmFwcF9pZBAyMjIwMzkxNzg4MjAwODkyAAEer7RCtq5Hcs-58ZNC1n8bjMgzBEQnikgUQ2KCBjmATIbmYbZzYsXcXNQEuBw_aem_c1xi54oPymFMwGZjtjqgPg

Addis Standard

@addisstandardeng · Post #21605 · 04.03.2026 г., 08:32

News: #Ethiopia, #Kenya agree to launch joint military operations to secure border corridor, #LAPSSET Ethiopia and Kenya have agreed to strengthen security coordination along the #Moyale–#Marsabit–#Turkana corridor, endorsing structured joint military operations aimed at addressing cross-border threats and safeguarding key infrastructure linking the two countries. The agreement is part of renewed efforts to operationalise the existing Defence Cooperation Agreement (#DCA) between the two neighbours. Under the arrangement, the Ethiopian National Defence Force (#ENDF) and the Kenya Defence Forces (#KDF) are expected to undertake phased and coordinated operations targeting vulnerable border areas and strategic assets. In a related development, Ethiopia’s defence ministry also held bilateral talks with a delegation from the #Rwanda Defence Force (#RDF) on the margins of the Adwa anniversary celebrations. According to RDF, discussions focused on deepening.... Read more: https://addisstandard.com/?p=55528