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

Резултати

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

Пребарај: #kurilovka

当前筛选 #kurilovka清除筛选
DruschbaFM - English

@druschbaFm_en · Post #51699 · 07.03.2025 г., 07:43

⚡️🇷🇺🇺🇦⚔️Fiend Reports in the Morning of 7 March 2025⚡️ 🔴#Kursk Region: 🔴In Sudzhansky district, in the area of #​​Sverdlikovo, Russian troops continue to attack with mobile groups along the border in southerly direction. 🟡 On the eastern flank, the RFAF have advanced into #Kurilovka and along the 'Kholodny Yar Ravine' to a depth of 4 kilometres. 🗺 Map 1 ➡️ The situation remains difficult (for the AFU). 🔴#Svatovo Front: 🔴 In #Kupyansk Sector, the Russians expanded the bridgehead on the western bank of the Oskol River in a section up to 2.73 kilometres wide and up to 1.15 kilometres deep. 🗺 Map 2 🔴#ChasovYar Direction: 🔴In #ChasovYar Sector, Russian troops, supported by 25 units of equipment, attacked the western part of the city. During the clashes, fighters of the AFU's 24th Brigade destroyed/hit 16 units of equipment and drove the Russians out of a number of positions. 🗺 Map 3 🎞 Video ➡️ A grey zone has been added to the map tentatively. The front configuration is being clarified. 🔴#Pokrovsk Direction: 🔴 On the right Flank, the AFU repelled attacks by Russian troops in the area of ​​#Peschanoye. 🔴 On the left Flank, the AFU repelled attacks by Russian troops in the area of ​​#Uspenovka and are also conducting counteractions in neighbouring areas. ➡️ The situation for the direction has not changed significantly. 📋Reported on 7 Mar at 08:00 📋Reported on 7 Mar at 08:18 📋Reported on 7 Mar at 08:31 🕰GMT+3; #smo 🇺🇦Map📍 📱For the Military Hardcore 💬 Welcome to Military Chat

DruschbaFM - English

@druschbaFm_en · Post #51663 · 06.03.2025 г., 07:32

⚡️🇷🇺🇺🇦⚔️Fiend Reports in the Morning of 6 March 2025⚡️ 🔴#Kursk Region: 🔴In Sudzhansky district, Russian troops continue attacks from the area of ​​the #NikolayevoDaryino settlement in the direction of #Sumy region, assaulting the area of ​​the #Lebedevka and #NovayaSorochina settlements. 🟡 At #Kurilovka, they have advanced in the eastern part of the 'Kholodny Yar Ravine' and on the southern outskirts of the settlement. 🗺 Map ➡️ The situation remains difficult (for the AFU). 🔴#Svatovo Front: 🔴 In #Kupyansk and #Liman directions, the situation has not changed significantly. 🔴#ChasovYar Direction: 🔴In #Toretsk Sector, fighting is taking place for the northern outskirts of the city and the southwestern part of the 'Zabalka Microdistrict.' The situation remains dynamic. 🔴#Pokrovsk Direction: 🔴 On the right Flank, fighting of varying intensity continues in the areas of ​​the #ZelyonoyePole, #Baranovka, #Shevchenko, #Peschanoye and #Kotlino villages... 🔴 On the left Flank, for #Udachnoye and #Uspenovka. 🔴#Komar Direction: 🔴In #Kurakhovo Sector, the RFAF reduced the number of attacks by infantry units and began to restore and accumulate forces and resources. 📋Reported on 6 Mar at 08:16 🕰GMT+3; #smo 🇺🇦Map📍 📱For the Military Hardcore 💬 Welcome to Military Chat