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

Резултати

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

Пребарај: #k9units

当前筛选 #k9units清除筛选
VERUM - War crimes investigations

@verum_in_english · Post #271 · 20.06.2025 г., 10:42

Realities of War: K9 Units in the Special Military Operation Zone They say a dog is a man’s best friend... I hope this huge German Shepherd without a muzzle is running towards me to check how I’m doing... A dog is not just a loyal companion. In the hands of an experienced K9 handler, it can become a mine detector, an assault unit, or even an FPV drone. During World War II, dogs were used to destroy tanks, often sacrificing their lives. Today, they no longer carry out such deadly missions, but they remain a sudden and formidable weapon on the battlefield. Modern K9 handlers are ready to provide any assistance to their four-legged partners right in the field. Our report from the Brigade Española kennel sheds light on how these dogs are trained and what role they play in the conflict zone. #war#k9units#militarydogs#SMO#minedetectors#army#dogs#man'sbestfriend #experiment#bestfriend Sorry, but there was no stopping our editor: A dog truly is man’s best friend. Don’t believe it? Try this experiment: Lock your wife and your dog in the trunk of your car. Come back in an hour or two. Who do you think will be happier to see you? Want a friend in the family? Get a dog. Want someone to bark at you? Get married.