Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
Central Bank Politicization in Ethiopia and Implications for Creditors. Read more.
https://borkena.com/2026/02/26/ethiopia-central-bank-politicization-in-ethiopia-and-implications-for-creditors/#Ethiopia#CentralBank#Bank
Nabiullina: Russia Faces Labor Shortage for the First Time
At the Alpha Summit, Central Bank Chair Elvira Nabiullina stated that modern Russia is experiencing an unprecedented labor shortage. This situation significantly impacts the economy and regulatory decisions. Nabiullina emphasized that more timely data would improve labor market analysis. Such a workforce deficit presents a new challenge for the country’s economy.
#Russia#CentralBank#Nabiullina#LaborMarket#Economy
The main news of Russia and the world ishere.
Russian Ministry of Economic Development Welcomes Central Bank’s Rate Cut
The Russian Ministry of Economic Development views the Central Bank’s seventh consecutive key rate reduction—from 15.5% to 15.0%—as a positive signal. The ministry highlights that easing monetary policy supports the economy’s shift toward sustainable growth, especially amid improvements in various sectors. This decision fosters business development and an improved investment climate.
“Lowering the rate is a crucial step to support the economy,” the ministry emphasized.
#Russia#Economy#CentralBank#KeyRate#EconomicDevelopment
The main news of Russia and the world ishere.
Russian Stock Market Opens Week with Moderate Decline
On April 29, the Moscow Exchange and RTS indexes fell 0.3%, reacting to the Central Bank of Russia’s cautious signals on monetary policy. Meanwhile, oil prices rose amid ongoing geopolitical tensions in the Middle East. Biggest losers included Group Pозитив (-2.2%), Yandex (-2.1%), and MMK (-1.8%). The official dollar rate stands at 75.53 rubles.
The market reflects both domestic and external challenges, showing investor caution.
#Russia#StockMarket#MoscowExchange#RTS#CentralBank
The main news of Russia and the world ishere.
Czech Central Bank Eyes Bitcoin Investment
Czech National Bank considers Bitcoin investment, stated Governor Aleš Michl. Proposal could diversify 5% of $146 billion reserves. Details: ForkLog
#CzechRepublic#Bitcoin#Crypto#Investments#CentralBank#Finance#AlešMichl#Reserves#ForkLog
Czech Bank Considers Bitcoin Investment
Aleš Michl, Governor of the Czech National Bank, suggests possible Bitcoin acquisition for diversification of foreign reserves. Board decision pending. Plans to raise gold reserves to 5% by 2028. Read more.
#CzechRep#Bitcoin#Finance#Investing#Gold#Reserves#CentralBank#Diversification#Crypto#Economy
⚠🇷🇺🏦 From July 25, your financial transaction in Russia may be blocked and refunds may be issued without your consent if it falls under the following categories:
📌 If It is made to an account in the bank's database for fraudulent transactions. It may be the sending or receiving bank's database.
📌 If there is information about the initiation of a criminal case from a client or other interested party
📌 If data is received from third-party organizations indicating a fraudulent transaction (for example, information from a telecom operator about unusual telephone activity for the client before the transfer of funds or an increase in the number of incoming messages from new numbers, including in instant messengers). Please note "including instant messengers")
On the same day, an order will also come into effect, according to which banks will have to return money, including those voluntarily transferred to fraudsters, to clients within 30 days of their request.
There are three grounds for this refund:
1. If the account to which the funds were transferred is in the fraudulent database;
2. If the bank did not notify the client about the transfer without his consent;
3. If the card was lost or used without the client's consent. In the latter case, the client must notify the bank about the loss, otherwise the bank has the right not to return the funds.
Subscribe:@nido_russia
https://t.me/nido_russia/1715
#news#Russia#finance#fraud#crime#centralbank#цб#сb
🚀 Bank of Japan Governor: Underlying Inflation Gradually Approaching Target
Bank of Japan Governor Kazuo Ueda stated that the underlying inflation rate is gradually accelerating towards the central bank's target. According to Jin10, Ueda emphasized the importance of monitoring inflation trends closely to ensure they align with the Bank of Japan's objectives. The central bank remains committed to its monetary policy framework to achieve stable price growth.
#BankOfJapan#Inflation#MonetaryPolicy#KazuoUeda#EconomicStability#CentralBank
U.S. Bitcoin Reserve Gains Traction
Growing support for a U.S. Bitcoin reserve post-Trump's inauguration. Estimates show a 64% chance for the reserve by 2025 via Polymarket. The proposal under the BITCOIN Act aims to accumulate 1M bitcoins over five years. Advocates highlight potential benefits while critics voice concerns about volatility and logistical issues. The initiative reflects a broader trend of governments exploring digital assets, alongside China's digital yuan advancements. More on the future implications of this movement on global finance.
#Bitcoin#Crypto#VC#Finance#DigitalAssets#Polymarket#Blockchain#Trump#Economy#Investment#Innovation#CentralBank#Cryptocurrency#DigitalDollar#China#Gold#Assets
🚀 Poland's Central Bank Governor: No Need for Rate Hike, Rate Cuts Paused
Poland's Central Bank Governor, Adam Glapiński, stated that there is no need to raise interest rates, and that the recent cycle of rate cuts has been paused. According to Jin10, Glapiński emphasized that the current economic conditions do not warrant an increase in rates, suggesting a stable monetary policy stance for the foreseeable future. This decision comes amid ongoing assessments of Poland's economic performance and inflation trends.
#Poland#CentralBank#InterestRates#MonetaryPolicy#Economy#Inflation#RateCuts
🚀 Venezuela's Inflation Rate Reaches 13.1% in March
Venezuela's central bank reported that the country's inflation rate reached 13.1% in March. According to Jin10, the inflation rate for the first quarter of 2026 was recorded at 71.8%, reflecting ongoing economic challenges in the nation.
#Venezuela#Inflation#Economy#CentralBank#EconomicCrisis #2026 #FinancialNews
🚀 Poland's Central Bank Keeps Benchmark Rate Unchanged at 3.75%
Poland's central bank has decided to maintain its benchmark interest rate at 3.75%, aligning with market expectations. According to Jin10, this decision reflects the bank's current monetary policy stance amid ongoing economic conditions. The unchanged rate suggests a cautious approach as the bank monitors inflationary pressures and economic growth. This move is consistent with the central bank's efforts to balance economic stability and inflation control.
#Poland#CentralBank#InterestRate#MonetaryPolicy#Inflation#EconomicGrowth#EconomicStability