TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #411 · 9 фев.

reload_flag="" if [[ -n "${DEBUG}" ]]; then reload_flag="--reload" fi if [[ -n "${WORKER_COUNT}" ]]; then workers=${WORKER_COUNT} else workers=2 fi gunicorn --workers ${workers} \ --bind 0.0.0.0:8000 \ ${reload_flag} main.wsgi Писали такие конструкции чтобы проверить наличие флага и сформировать команду правильно? На самом деле можно сделать тоже самое проще. Для этого используются операторы условной подстановки, доступные в оболочках семейства POSIX. :- для установки значений по умолчанию ${WORKER_COUNT:-2} Если переменная не объявлена, то будет дефолтное значение 2. :+ подставляет указанный текст, если переменная не пуста ${DEBUG:+--reload} Если что-то есть в переменной то распечатается текст после символа +, в противном случае - ничего. Удобно для опциональных флагов, как в нашем примере. Итого наш скрипт может выглядеть так: gunicorn --workers ${WORKER_COUNT:-2} \ --bind 0.0.0.0:8000 \ ${DEBUG:+--reload} main.wsgi Есть еще два оператора. := не только подставить дефолтное значение, но и присвоить его переменной, если она пуста # никаких переменных еще нет VAL1=${VAL2:=hello} # теперь доступны обе echo $VAL1 $VAL2 # hello hello :? остановить выполнение с ошибкой, если переменной нет. echo ${MISS:?is required} bash: MISS: is required Код выхода будет 1. #tricks#linux

Резултати

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

Пребарај: #ipc

当前筛选 #ipc清除筛选

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

Hashtags

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

Hashtags

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

Hashtags

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

Hashtags

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

Hashtags

Addis Standard

@addisstandardeng · Post #21324 · 06.02.2026 г., 05:28

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

Hashtags

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

Hashtags

Addis Standard

@addisstandardeng · Post #21528 · 26.02.2026 г., 05:18

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

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