Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в 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
Continuous practice of standard #IPC is key to preventing the spread of infection from patients to health workers, health workers to other health workers or their families, and from the patients to the rest of the community.
🔗Guideline:
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf
Infection Prevention and Control (IPC) is an essential aspect of the clinical management of #LassaFever.
Healthcare workers are urged to always practice standard #IPC measures when attending to patients.
🔗Download, read and share our guidelines:
https://www.ncdc.gov.ng/themes/common/docs/protocols/92_1547068532.pdf
As Nigeria continues the fight against Lassa fever, our healthcare workers remain our strongest line of defence.
The Nigeria Centre for Disease Control and Prevention reminds all health professionals to stay alert, every fever case matters.
Standard precautions save lives:
🧼 Clean your hands before and after contact.
🩺 Use the right PPE based on risk.
🧹 Keep your environment clean.
🗑 Dispose of waste safely.
For detailed guidance, read the full Lassa Fever Advisory for Healthcare Workers here:
https://ncdc.gov.ng/themes/common/docs/protocols/373_1771241608.pdf
Protect yourself. Protect your colleagues. Protect your patients.
Infection prevention isn’t optional, it saves lives.
#LassaFever#IPC#NCDCNigeria
📃
"Despite high mortality & morbidity, drug-resistant bacterial infections remain the forgotten pandemic"
In this PLOS Biology article, our #IPC/#AMR coordinator Dr Tochi Okwor & colleagues write on the need for urgent action & investment focusing on this 'pandemic'.
Read and share:
https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.3001903
Improving the quality and safety of health care through informed #IPC practices such as #HandHygiene bolsters the feeling of protection by patients & healthcare workers.
Facility managers should ensure #handhygiene at every point of care is promoted at all times.
Health workers,
Continuous and appropriate use of infection prevention and control methods is crucial to protect yourself from Healthcare-Associated Infections and further spread in the community.
🔗Download our National Guideline on #IPC for #VHF
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf
Standard #IPC is key to preventing the spread of infection from patients to health workers, health workers to other health workers or their families, and from the patients to the rest of the community.
🔗Download our National Guideline on #IPC for #VHF
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf
Health workers,
Continuous and appropriate use of infection prevention and control methods is crucial to protect yourself from Healthcare-Associated Infections and further spread in the community.
🔗Download our National Guideline on #IPC for #VHF
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf
Famine threat spreads in #Sudan’s Darfur as hospital attack kills 22 amid ongoing war
Famine is threatening additional areas in war-ravaged Sudan’s western #Darfur region, a global hunger monitoring body warned on Thursday, even as an attack by paramilitary forces on a military hospital in the country’s south killed at least 22 people, including the hospital’s director and three medical staff.
Sudan has been engulfed in conflict since April 2023, following a power struggle between the Sudanese military and the paramilitary Rapid Support Forces (#RSF). The war has triggered what the United Nations has described as the world’s worst humanitarian crisis
The Integrated Food Security Phase Classification (#IPC) said acute malnutrition has reached famine-level thresholds in two more towns in Darfur — Umm Baru and Kernoi in North Darfur province — though it stopped short of formally declaring famine due to lack of sufficient data on mortality and.....
https://www.daijiworld.com/news/newsDisplay?newsID=1305714
The overall goal of Infection Prevention & Control is to maintain an environment of care that minimises risks of infection for patients, staff & visitors.
These #IPC guidelines must be practised by all #HCWs in public and private primary, secondary & tertiary healthcare facilities.
Read more in the Nigerian Manual of Infection Prevention and Control:
https://ncdc.gov.ng/themes/common/docs/protocols/296_1649340294.pdf
The overall goal of Infection Prevention & Control is to maintain an environment of care that minimises risks of infection for patients, staff & visitors.
These #IPC guidelines must be practised by all #HCWs in public and private primary, secondary & tertiary healthcare facilities.
Read more in the Nigerian Manual of Infection Prevention and Control:
https://ncdc.gov.ng/themes/common/docs/protocols/296_1649340294.pdf
One-third of #Somalis to face hunger in March: #UN officials
Some 6.5 million people, or about a third of Somalia's population, will face crisis levels of hunger through March, an increase of 1.7 million since January, UN officials warned.
Speaking to reporters on Wednesday at the UN headquarters via video link, World Food Programme (#WFP) Director of Emergency Preparedness and Response Ross Smith said the latest Integrated Food Security Phase Classification (#IPC) report for Somalia, released on Tuesday, confirmed fears that the humanitarian situation in Somalia has significantly worsened.
"Of these, two million of the most vulnerable women and children are expected to face severe hunger," with over 1.8 million children under the age of 5 to face acute malnutrition in 2026, he said.
Smith said Somalia is in the midst of a very complex hunger crisis, where two rainy seasons have failed, conflict and insecurity....
https://menafn.com/1110791078/One-Third-Of-Somalis-To-Face-Hunger-In-March-UN-Officials