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

Резултати

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

Пребарај: #srilanka

当前筛选 #srilanka清除筛选
Ultimora.net - POLITICS

@UltimoraPOlitics · Post #39017 · 10.05.2022 г., 07:41

#SriLanka Il presidente dell'assemblea nazionale Imaduwa Pradeshiya è morto durante le proteste per un infarto, dopo che dei manifestanti hanno dato alle fiamme la sua abitazione. Nello stesso giorno, è stato appiccato un incendio anche nella casa dell'ex primo ministro. @UltimoraPolitics

Hashtags

ASIANOMICS

@asianomics · Post #5867 · 06.04.2026 г., 15:52

🇱🇰Sri Lanka Raises Cooking Gas Prices 23% Sri Lanka raised liquefied petroleum gas prices on April 6, citing higher global prices driven by the Iran war. State-owned Litro Gas, the main domestic LPG supplier, increased the price of a 12.5kg refill from 3,990 rupees to 4,765 rupees, a rise of 19.42 per cent. A private supplier holding roughly a quarter of the domestic market raised its retail price by 23 per cent to 5,700 rupees. A Litro spokesperson attributed the revision to higher global LPG prices and increased shipping costs, and confirmed supplies sufficient for the entire month of April. The April increase follows an eight per cent hike in March, when Sri Lanka also raised fuel and electricity prices by more than a third. Sri Lanka's government has previously stated that a prolonged conflict in the Middle East could undermine the country's recovery from its 2022 economic crisis, noting that the Strait of Hormuz has been effectively closed since the conflict began. #SriLanka @asianomics

Hashtags

ASIANOMICS

@asianomics · Post #5844 · 04.04.2026 г., 12:00

🇱🇰Sri Lanka Battles Energy Crisis, Economic Strain Sri Lanka's government has rationed fuel, raised fuel prices by a third, and increased electricity costs by up to 40 per cent since the Middle East war began disrupting global energy supplies. The measures compound the economic damage from Cyclone Ditwah, which killed 641 people and caused an estimated US$4.1 billion in damage late in 2025. President Anura Kumara Dissanayake's administration is also managing review conditions tied to a US$2.9 billion IMF bailout loan, with a US$700 million instalment pending. Sri Lankan authorities have indicated they may request modifications to the loan's austerity conditions given the deteriorating external environment. The Frontline Socialist Party, which led the 2022 protests that removed former president Gotabaya Rajapaksa, has warned that the current administration may face a similar political implosion. Human rights lawyer Bhavani Fonseka noted that emergency laws, introduced after Cyclone Ditwah, give authorities broad powers to arrest and detain, which could limit public protest activity. #SriLanka @asianomics

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1086 · 06.09.2024 г., 12:14

🗺Sri Lanka 🇱🇰 The Red Mosque (Jami Ul-Alfar Masjid) in Sri Lanka is a towering structure in the heart of Colombo's commercial district, Pettah. Each brick of the building is painted red and white, featuring Indo-Saracenic architecture with pomegranate-shaped domes. Today, it is the largest mosque in Sri Lanka, accommodating up to 10,000 worshippers. #SriLanka @voyage

Hashtags

BAZUKA

@jbazuka · Post #185 · 13.07.2022 г., 17:29

🇱🇰#SriLankaОбразуются длинные очереди для посещения резиденции президента, занятой в течение трех дней демонстрантами ⚠️☝️ 💬Даже в условиях революции и госпереворота люди культурно стоят в очереди, уважая друг друга!

Hashtags

BAZUKA

@jbazuka · Post #151 · 10.07.2022 г., 14:53

🇱🇰#SriLankaПротестующие на Шри-Ланке нашли миллионы рупий в захваченной резиденции президента страны ⚠️☝️ 💬Все деньги передали в службу безопасности для восстановления страны.

Hashtags

BAZUKA

@jbazuka · Post #148 · 10.07.2022 г., 14:52

🇱🇰#SriLankaПротестующие Шри-Ланки обживаются в президентском особняке ⚠️☝️ 💬Второй день они купаются в президентском бассейне и занимаются в его фитнес-центре, а так же устраивают пир в его столовой! 💬 Сам президент успел сбежать до штурма дворца. Он покинул Шри-Ланку на частном самолёте.

Hashtags

BAZUKA

@jbazuka · Post #147 · 10.07.2022 г., 06:19

🇱🇰#SriLankaПротестующий народ Шри-Ланки ворвался в резиденцию президента ⚠️☝️ 💬 Президент Шри-Ланки успел сбежать до того, как туда прорвались бунтующие граждане. 💬 Страна уже несколько месяцев живет совершенно без топлива, испытывает проблемы с электроэнергией и продовольствием.

Hashtags

BAZUKA

@jbazuka · Post #145 · 10.07.2022 г., 06:07

🇱🇰#SriLankaПротестующий народ Шри-Ланки ворвался в резиденцию президента ⚠️☝️ 💬 Президент Шри-Ланки успел сбежать до того, как туда прорвались бунтующие граждане. 💬 Страна уже несколько месяцев живет совершенно без топлива, испытывает проблемы с электроэнергией и продовольствием.

Hashtags

RTDocumentary

@rtdocumentary · Post #734 · 11.05.2022 г., 12:08

Protests continue in Sri Lanka, despite the imposition of a state of emergency. People are demanding the resignation of President Gotabaya Rajapaksa. Anti-Russian sanctions have exacerbated the economic crisis, and prices in the country have skyrocketed. The cost of basic foodstuffs has more than doubled. Locals queue up for paraffin. They need fuel to cook food. The ‘hottest’ point of the protests is near the secretariat of the head of state. A tent camp was set up there. People have travelled from all over the country. Among the protesters is Mahindi Siri, a 40-year-old Special Forces soldier. He lost a leg after being blown up by a landmine while fighting in the north. The war ended 13 years ago. He never imagined he would have to count every rupee to survive. This footage was shot by an RT Documentary team in Sri Lanka, making a new film about how the country is coping with the economic crisis. It’s premiering soon. #video#SriLanka Follow: https://t.me/rtdocumentary

12
ПретходнаСтраница 1 од 2Следна