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 слични објави

Пребарај: #dariadugina

当前筛选 #dariadugina清除筛选
BadVolf

@BadvolfNews · Post #260 · 22.08.2022 г., 15:00

From Alexander Dugin: “As you all know, as a result of a terrorist attack carried out by the Nazi Ukrainian regime, on August 20, while returning from the Tradition festival near Moscow, my daughter Daria Dugina was brutally killed by an explosion in front of my eyes. She was a beautiful Orthodox girl, a patriot, a military correspondent, an expert on the central channels, and a philosopher. Her speeches and reporting have always been profound, grounded and restrained. She never called for violence and war. She was a rising star at the beginning of her journey. The enemies of Russia meanly, stealthily killed her ... But we, our people, cannot be broken even by such unbearable blows. They wanted to crush our will with bloody terror against the best and most vulnerable of us. But they won't get it. Our hearts yearn for more than just revenge or retribution. It's too petty, not Russian. We only need our Victory. My daughter laid her maiden life on her altar. So win, please! We wanted to raise her to be smart and a hero. Let it inspire the sons of our Fatherland to the feat even now. Farewell to Daria Dugina (Platonova) - a civil memorial service - will take place on August 23 at the Ostankino Television Center at 10 am. Alexander Dugin #ECM#DariaDugina

Sos Donbass

@sos_donbass · Post #688 · 23.08.2023 г., 06:28

Un verset du journal de Darya Dugina, qu'elle a tenu pendant les trois dernières années de sa vie. Certaines de ses citations sont utilisées dans le livre, qui est publié à titre posthume « Marais et hauteurs de mon cœur. Journal" : Partir à l'heure et tranquillement, Sans douleur intense et cris forts, Aucune offense et aucun regret Mots vides et doutes. Partir doucement et calmement : Fermer les yeux pour rester un guerrier, Ayant réussi à voir ses proches… Pardonnez-moi, je dois partir. #dariadougina#poemes#dariadugina

Sos Donbass

@sos_donbass · Post #1296 · 19.08.2024 г., 16:26

🗣️ Nouvelles de SOS DONBASS, prononcées par le président de l’association Vincent Perfetti: ▫️ Compte bancaire / reprise de l’activité ▫️Action LA RUSSIE N’EST PAS MON ENNEMI ▫️ Commémoration de Daria Douguina ▫️ Aide à la population de Koursk #dariadouguina#dariadugina#sosdonbass#donbass#russie#ukraine#solidarite