@ncdcgov · Post #4100 · 24.11.2023 г., 16:31
⏳Live In 30 minutes Join the discussion on: “Supergerms and the Future of Infection: What can I do?” 🔗bit.ly/LearnWithDRASA7 #WAAW2023#WorldAMRAwarenessWeek
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #183 · 23 ное.
Python + bash Если вам часто требуется запускать shell команды из Python-кода, какой способ вы используете? Самый низкоуровневый это функция os.system(), либо os.popen(). Рекомендованный способ это subprocess.call(). Но это всё еще достаточно неудобно. Советую обратить своё внимание на очень крутую библиотеку sh. Что она умеет? 🔸 удобный синтаксис вызова команд как функций # os import os os.system("tar cvf demo.tar ~/") # subprocess import subprocess subprocess.call(['tar', 'cvf', 'demo.tar', '~/']) # sh import sh sh.tar('cvf', 'demo.tar', "~/") 🔸 простое создание функции-алиаса для длинной команды fn = sh.lsof.bake('-i', '-P', '-n') output = sh.grep(fn(), 'LISTEN') в этом примере также задействован пайпинг 🔸 удобный вызов команд от sudo with sh.contrib.sudo: print(ls("/root")) Такой запрос спросит пароль. Чтобы это работало нужно соответствующим способом настроить юзера. А вот вариант с вводом пароля через код. password = "secret" sudo = sh.sudo.bake("-S", _in=password+"\n") print(sudo.ls("/root")) Это не все фишки. Больше интересных примеров смотрите в документации. Специально для Windows💀 юзеров #libs#linux
Пребарај: #waaw2023
@ncdcgov · Post #4100 · 24.11.2023 г., 16:31
⏳Live In 30 minutes Join the discussion on: “Supergerms and the Future of Infection: What can I do?” 🔗bit.ly/LearnWithDRASA7 #WAAW2023#WorldAMRAwarenessWeek
Hashtags
@ncdcgov · Post #4096 · 23.11.2023 г., 11:44
#Antimicrobials are becoming less effective against common infections in animals & humans. 🚫 Do not self-medicate ✅ Visit a healthcare professional when sick Everyone has a role to play to ensure #antimicrobials continue to work. #AMR#WAAW2023
Hashtags
@ncdcgov · Post #4101 · 25.11.2023 г., 10:11
Antimicrobials play a vital role in fighting infectious diseases across humans, animals, and plants. However, their effectiveness is diminishing, leading to a global crisis known as #AntimicrobialResistance (AMR). Let’s raise awareness, promote responsible use, and work together to combat AMR. #WAAW2023#WorldAMRAwarenessWeek
@ncdcgov · Post #4086 · 20.11.2023 г., 12:18
Every year, the National Antimicrobial Resistance Technical Working Group joins the global community to raise awareness of the dangers of misuse or overuse of #antimicrobials. Fighting #AMR is a global endeavour that must be addressed through a #OneHealth approach as evident in this year's theme of #WAAW2023: ‘Preventing #AntimicrobialResistance together” 🔗Press Release https://ncdc.gov.ng/news/504/nigeria-joins-the-global-community-to-commemorate-world-antimicrobial-awareness-week-%28waaw%29
@ncdcgov · Post #4099 · 24.11.2023 г., 14:57
As an individual, what can you do to prevent #Antimicrobial Resistance? Our #AMR programme manager @beeodune will be live alongside other panellists on @drasatrust's @XSpaces discussion to speak on: “Supergerms and the Future of Infection : 🗓️ Today, 24th November 🕙6:00 PM 🔗Join the conversation via: http://bit.ly/LearnWithDRASA7 #WAAW2023#WorldAMRAwarenessWeek