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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #281 · 18 авг.

Что-то вы гоните насчет "привычного вида формата 755 и 644". Я вот вообще не понял что это!😳 Действительно, что означают цифры которые мы получили в прошлом посте? Это кодировка, заключающая в себе режимы доступа к файлу. Подробней можно почитать в статье про chmod. Там можно увидеть альтернативное обозначение того же самого с помощью символов r w x, что значит чтение, запись, исполнение. Чтобы преобразовать восьмеричное число в такое обозначение в Python есть готовая функция >>> stat.filemode(0o755) '?rwxr-xr-x' Мы видим 3 группы по 3 символа, дающие 3 типа доступа для 3 типов юзеров. А что за знак вопроса в начале? Давайте передадим в эту функцию необрезанное значение от os.stat >>> stat.filemode(os.stat(path).st_mode) 'drwxr-xr-x' Это данные, которые мы безжалостно обрезали в прошлый раз😼 Первый символ обозначает тип объекта. Это может быть файл (-), директория (d) или симлинк (l). Вот простая схема данной кодировки [1][3][3][3] │ │ │ │ │ │ │ └──> Others Permissions │ │ └─────> Group Permissions │ └────────> Owner Permissions └───────────> File Type (разверните экран если вы с телефона) Если вы попробуете получить пермишены для симлинка то получите пермишены для файла >>> path = '.venv/bin/python3' >>> stat.filemode(os.stat(path).st_mode) '-rwxr-xr-x' Чтобы получить свойства именно симлинка, нужно это явно указать >>> stat.filemode(os.stat(path, follow_symlinks=False).st_mode) 'lrwxrwxrwx' #tricks#basic

Резултати

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

Пребарај: #malaria

当前筛选 #malaria清除筛选
Borkena

@borkena · Post #5560 · 15.12.2025 г., 16:34

Ethiopia’s First R21 Malaria Vaccine Rollout, A Global First In A Refugee Camp (MSF) https://borkena.com/2025/12/15/ethiopias-first-r21-malaria-vaccine-rollout-a-global-first-in-a-refugee-camp/#Ethiopia#Malaria#MSF

Eliminating #malaria requires continued implementation of measures proven to stop the local spread of the malaria parasite. Every Nigerian has a role to play in accelerating the fight against #malaria infection⬇️ ➡️Use insecticide-treated nets when sleeping in places where malaria is present ➡️Use mosquito repellents after dusk ➡️Use coils and vaporizers ➡️Wear protective clothing ➡️Use window nets ➡️Clear stagnant water in your environment to prevent the breeding of mosquitoes #WorldMalariaDay2024

The theme for #WorldWaterDay2023 is 'Accelerating the change to solve the water and sanitation crisis' Diseases like #cholera, #yellowfever, #typhoid and #malaria can be prevented by proper water/sewage management & by consumption of clean water Be the change you want to see!

Mosquitoes are carriers of various diseases, including #Malaria, #YellowFever, #DengueFever, and #ZikaVirus, with cases rising during the rainy season. You can protect yourself: ➡Eliminate stagnant water to prevent mosquito breeding ➡Use mosquito repellent and wear clothing that covers your arms and legs ➡Sleep under insecticide-treated mosquito nets ➡Keep drainages and gutters clear ➡Install screens on doors and windows #WorldMosquitoDay