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

Пребарај: #ramaphosa

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

@addisstandardeng · Post #21140 · 21.01.2026 г., 07:56

News: #Somalia, #South_Africa discuss security, regional stability Somali President #Hassan_Sheikh Mohamud on Tuesday held a telephone conversation with South African President Cyril #Ramaphosa, during which the two leaders discussed strengthening bilateral relations and expanding cooperation on peace and security, trade and investment, and regional stability. According to Somalia’s state news agency SONNA, the talks also covered key regional and continental developments, with both leaders reaffirming their commitment to #African solidarity and shared prosperity. Recently reports indicate that Somalia intensifies diplomatic relations with different countries. Yesterday SONNA reported.that Somalia has signed a defence cooperation agreement with #Qatar, days after formally terminating all existing security and defence arrangements with the United Arab Emirates (#UAE). The agreement was... https://web.facebook.com/AddisstandardEng/posts/pfbid0APngK9nL83rpkiaz2ADgk3Fhm1cZKE3Utxx6mMTkWx8RgG7w4yTYz191C3C5g6uAl

Addis Standard

@addisstandardeng · Post #21685 · 12.03.2026 г., 05:29

#South_Africa deploys soldiers to the streets to tackle organized and violent crime Soldiers were deployed to the streets of South Africa’s biggest city Wednesday in an effort to help police fight gang violence and illegal mining. It was the first major deployment since President Cyril #Ramaphosa said in his annual speech to the nation last month that he would use the army against organized crime, which he called the greatest threat to democracy and the country’s economic development. Soldiers jumped from vehicles and entered apartment blocks as military vehicles moved through the #Riverlea and #Westbury suburbs of #Johannesburg. Many residents of Riverlea expressed relief to see soldiers deployed to stem the violence. One resident, Pearl Hilma, told The Associated Press that she supports the crackdown “because there’s lots of gangsterism as well as gunshots every night” in the neighborhood...... https://apnews.com/article/johannesburg-troops-crime-crackdown-president-d92dd6dc8eea76bdf1abd878200379f9

Marx21.it

@marx21news · Post #9208 · 14.11.2025 г., 14:45

Un nuovo capitolo strategico tra Việt Nam e Sudafrica La visita di Stato del Presidente sudafricano Cyril Ramaphosa a Hà Nội (23-24 ottobre) segna una svolta storica nelle relazioni tra i due Paesi. Dopo decenni di cooperazione politica ed economica, il Việt Nam e il Sudafrica si preparano a elevare il loro rapporto a Partenariato Strategico entro il 2025, fondato su fiducia politica, sviluppo sostenibile e convergenza multilaterale. Le radici del legame risalgono alla solidarietà anticoloniale e al movimento afro-asiatico, ma oggi la partnership guarda al futuro: energie rinnovabili, digitalizzazione, infrastrutture, finanza verde e libero scambio con la SACU. Il Việt Nam si conferma ponte tra Asia e Africa, mentre il Sudafrica punta a rafforzare il proprio ruolo di hub continentale. Entrambi i Paesi condividono una visione del Sud Globale unito, promotore di un ordine internazionale più equo, basato su cooperazione, legalità e rispetto reciproco. La dichiarazione congiunta del 24 ottobre non chiude un ciclo, ma ne apre uno nuovo: quello di una cooperazione Sud-Sud più matura, fondata su principi, pragmatismo e ambizioni globali comuni. #Vietnam#SouthAfrica#Ramaphosa#CooperazioneSudSud#Diplomazia#Geopolitica#ASEAN#Africa#PartenariatoStrategico#GiulioChinappi https://www.marx21.it/internazionale/un-nuovo-capitolo-strategico-nella-cooperazione-tra-vietnam-e-sudafrica/