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

Пребарај: #chirp

当前筛选 #chirp清除筛选
🦅 [ perspective ix ]

@perspectiveix · Post #1359 · 26.06.2018 г., 12:00

📰#iXDailyBrief STAT ⚡️ The leading activity in apps is digital audio, with the average US adult listening to over 50 minutes of audio via mobile apps per day. Social networking is next, with 40 minutes of app time. The other major categories are mobile video, gaming and messaging. Of these five, gaming is growing most slowly. (Source: eMarketer) INSIGHT 📺 How brands are using #Instagram’s new long-form video feature, #IGTV: prs.pctvix.co/2yPgJAC OTHER NEWS 🇻🇪 Venezuela is blocking access to the Tor network: t.me/iXNews/28209 📱#iOS12 is all about making your phone work better (Public Beta Available Now): t.me/iXNews/28205 💰#VidCon’s new grant will award one emerging YouTuber $2,000 each week for a year: t.me/iXNews/28186 🐦#Twitter returns to #AppleWatch thanks to #Chirp: t.me/iXNews/28182 🇨🇳 John Oliver is erased from Chinese internet following segment on China: t.me/iXNews/28183 — ☕️ If you like our channel, please support us: prs.pctvix.co/2taiWBz — "Success is no accident. It is hard work, perseverance, learning, studying, sacrifice and most of all, love of what you are doing or learning to do." ― Pele Ben, @iXNews

GitHub Trends

@githubtrending · Post #15270 · 05.11.2025 г., 12:00

#jupyter_notebook#chirp#gemini#google_cloud#imagen#lyria#nano_banana#veo#vertex_ai GenMedia Creative Studio is a web app that lets you use Google Cloud’s generative AI tools to create images, videos, music, and speech. It includes features like Imagen for images, Veo for videos, Lyria for music, and Chirp for speech, plus creative workflows for tasks like virtual try-ons and moodboards. You can experiment with these tools to quickly make and test creative media, helping you bring new ideas to life faster and more easily. https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio