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

Резултати

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

Пребарај: #electricalgrid

当前筛选 #electricalgrid清除筛选
Venezuelanalysis

@venanalysis · Post #1732 · 30.08.2024 г., 12:20

[BREAKING] Venezuela is facing a nationwide blackout, with all 24 states affected since early this morning. Authorities are working to restore power, and buses have been deployed in Caracas as the subway system is down. Story developing. Full report here: https://shorturl.at/omBak #ElectricalGrid

Venezuelanalysis

@venanalysis · Post #2314 · 24.03.2026 г., 20:45

📰 NEWS | Venezuela: Rodríguez Announces Electricity Rationing Ahead of Heatwave, Drought Forecast Venezuela has introduced a 45-day electricity saving plan as authorities anticipate increased demand driven by extreme heat and drought conditions, according to Acting President Delcy Rodríguez. The government also confirmed plans to reform the electricity sector to allow private investment through joint ventures in generation and distribution, aiming to address long-standing infrastructure limitations. Recent outages and limited operational capacity, estimated at 12–14 GW out of 34 GW installed, highlight ongoing challenges in the national grid. Read the full report here 👉🏾https://shorturl.at/2SmsF #ElectricalGrid#Sanctions

Venezuelanalysis

@venanalysis · Post #1761 · 30.09.2024 г., 21:22

VA columnist Jessica Dos Santos describes a recent nationwide blackout in Venezuela and the memories from similar events in 2019. While the country returned to normal faster this time, questions about the state of the electrical infrastructure linger. Read the full column here 👉🏼https://shorturl.at/kFJlK #ElectricalGrid#TalesofResistance

Venezuelanalysis

@venanalysis · Post #1919 · 25.03.2025 г., 23:32

📰 NEWS | Venezuelan Gov’t Scales Down Public Sector Schedule in Electricity Rationing Measure The Venezuelan government has announced a six-week electricity rationing plan for state institutions, citing a climate emergency. Public offices will operate on alternating days with reduced hours (8 am-12:30 pm). Essential services remain unaffected. Western states, including Mérida, Táchira, Barinas, and Zulia, have faced daily blackouts of up to eight hours. Analysts point to drought-related hydroelectric challenges and concerns over the country’s transmission infrastructure. 🔗 Read the report here: https://venezuelanalysis.com/news/venezuelan-govt-scales-down-public-sector-schedule-in-electricity-rationing-measure/ #ElectricalGrid#PublicSector