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

Резултати

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

Пребарај: #warfare

当前筛选 #warfare清除筛选
Tomoko RD

@tomoko_channel · Post #1154 · 06.06.2025 г., 04:30

🔖 How Ukraine’s killer drones are beating Russian jamming | Hacker News #pinboard#warfare As an engineer, I am fascinated by it all. As a human, I am horrified that we democratized violence on this scale. A missile worth perhaps a million dollars can kill maybe 12 or 20 people. But for one million dollars, you can buy 10,000 drones, put four grenades on each, and they will kill 1,000 or even 2,000 people or destroy 200 tanks. https://news.ycombinator.com/item?id=44168658

America 🇺🇸 News & Politics

@America · Post #10370 · 11.03.2026 г., 05:54

🚨🇺🇸TRUMP: IRANIAN OPERATIONS WILL END "VERY SOON" BUT NOT THIS WEEK 🔹 11 days of military action have dismantled Iran's radar, telecommunications, leadership, missile stockpiles, and navy 💥 🔹 US forces destroyed 10 Iranian mine-laying vessels in Strait of Hormuz yesterday — key route for 20% of global oil 🛢️ 🔹 Defense Secretary Hegseth calls March 10 "most intense" day of bombardment — 140 US troops wounded, 7 killed ⚰️ 🔹 President warns "death, fire, and fury" if Tehran disrupts shipping lanes — tensions escalating 🔥 The Commander-in-Chief knows exactly what he's doing 😤💪 #USNews#MiddleEast#warfare @america

Interesting Planet 🌍

@interesting_planet_facts · Post #377 · 21.07.2025 г., 17:22

🌎 Ancient Greek fire, known as "Greek fire," was a weapon that could burn even on water. This flammable liquid, projected from tubes, terrified enemies at sea and kept its formula a closely guarded secret, lost to history. ✨ #history⚡#chemistry⚡#warfare 👉subscribe Interesting Planet

BadVolf

@badvolfnews · Post #1318 · 05.12.2023 г., 11:25

📢 Ukraine's defense forces resort to using Leopard tanks as long-range artillery, failing to fulfill their intended purpose against Russia. The highly anticipated offensive has turned into a defensive strategy, with the giant tanks deployed along the front line. But will this change the course of the conflict? Meanwhile, Poland plans to provide Ukraine with additional armored firepower. The war continues... 💥#Ukraine#Russia#LeopardTanks#Warfare https://www.gazeta.ru/army/news/2023/12/05/21855127.shtml Subscribe to @BadVolfNews