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

Резултати

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

Пребарај: #cityholder

当前筛选 #cityholder清除筛选
🏆 Premium, NFT, Tokens

@giiveaways · Post #3395 · 27.12.2024 г., 20:22

CITY Holder: Welcome to the country! Join us at DROGON!🐉 Let's build the best country in the simulation and compete for a prize of 1000 TON🤑 👉 @cityholderdrogon city 👈 #cityholder

Hashtags

🏆 Premium, NFT, Tokens

@giiveaways · Post #3316 · 29.11.2024 г., 15:38

🗓Combo of the Day: 29.11.2024 💰 In #CityHolder, you get +7,500,000 coins every day for the Combo of the Day! The combo is updated at 2:00 PM. Tg Today's Combo: ✅Country Cottage -Residential buildings ✅Old Town - Residential buildings ✅HistoricMansion -Residential buildings ❓How to collect the combo in City Holder? Go to @CityHolder. Open the "Construction" section. Select the required combo cards. 👉 Join @CityHolder! #CityHolder

Hashtags

🏆 Premium, NFT, Tokens

@giiveaways · Post #3307 · 23.11.2024 г., 18:52

🗓Combo of the Day: 23.11.2024 💰 In #CityHolder, you get +7,500,000 coins every day for the Combo of the Day! The combo is updated at 2:00 PM. Today's Combo: ✅ Shopping Center ✅ Business Center ✅ Shopping Arcade ❓How to collect the combo in City Holder? Go to @CityHolder. Open the "Construction" section. Select the required combo cards. Daily Quiz 23.11.2024 👇 1. What is the type of the cryptocurrency designed to ensure price stability? Answer: Stablecoin 2. Which city is considered the cultural capital of Russia? Answer: Saint Petersburg 3. Which musical instrument was invented by Italians? Answer: Mandolin 4. In what year did Bitcoin appear? Answer: 2009 5. In which country is Kruger National Park located? Answer: South Africa 6. Which of these dishes is a national dish of Malaysia? Answer: Satay 7. Which dance style originated in Brazil? Answer: Samba 8. What is the official language of Brazil? Answer: Portuguese 9. Which city hotel is known as the most luxurious in the world? Answer: Burj Al Arab 10. What is the name of the Kyrgyz national epic? Answer: Manas 👉 Join @CityHolder! #CityHolder

Hashtags

🏆 Premium, NFT, Tokens

@giiveaways · Post #3304 · 22.11.2024 г., 16:04

🗓Combo of the Day: 22.11.2024 💰 In #CityHolder, you get +7,500,000 coins every day for the Combo of the Day! The combo is updated at 2:00 PM. Today's Combo: ✅ Agrocomplex - Industrial facilities ✅ Fish Farm - Industrial facilities ✅ Mill - Industrial facilities ❓How to collect the combo in City Holder? Go to @CityHolder. Open the "Construction" section. Select the required combo cards. Quiz 👇 1. / Guatemala 2. / Goulash 3. / SHA- 256 4. / Milan 5. / Indians 6. / Complete anonymity 7./ Jordan 8. / Juhannus 9. / Evan Duffield 10. / Genesis Block 👉 Join @CityHolder! #CityHolder

Hashtags

🏢 Daily Quiz :16 Jul 🔑Q.1 Ans. :GPS 🔑Q.2 Ans. :Bluetooth 🔑Q.3 Ans. :Miso soup 🔑Q.4 Ans. :Magnetometry 🔑Q.5 Ans. :Malay Archipelago 🔑Q.6 Ans. :Isaac Asimov 🔑Q.7 Ans. :Spacewar! 🔑Q.8 Ans. :Rigoletto 🔑Q.9 Ans. :Johannes Gutenberg 🔑Q.10 Ans. :Friedrich Schiller 🔗 Link :City Holder #cityholder ❤️ If you appreciate our work, tap a like or heart to support — we’ll keep bringing top passive income projects!

Hashtags

🏢 Daily Quiz :15 Jul 🔑Q.1 Ans. :Astana 🔑Q.2 Ans. :Sodium 🔑Q.3 Ans. :Hogwarts 🔑Q.4 Ans. :Haruki Murakami 🔑Q.5 Ans. :Apex Legends 🔑Q.6 Ans. :Riga 🔑Q.7 Ans. :Lead 🔑Q.8 Ans. :MR 🔑Q.9 Ans. :The Hurt Locker 🔑Q.10 Ans. :James Watt 🔗 Link :City Holder #cityholder ❤️ If you appreciate our work, tap a like or heart to support — we’ll keep bringing top passive income projects!

Hashtags

🏢 Daily Quiz :14 Jul 🔑Q.1 Ans. :Jeff Bezos 🔑Q.2 Ans. :Decentralization 🔑Q.3 Ans. :Wellington 🔑Q.4 Ans. :Forrest Gump 🔑Q.5 Ans. :Gobi 🔑Q.6 Ans. :Dow Jones 🔑Q.7 Ans. :Pokémon GO 🔑Q.8 Ans. :Gabriel García Márquez 🔑Q.9 Ans. :Jack Dorsey 🔑Q.10 Ans. :Guido van Rossum 🔗 Link :City Holder #cityholder ❤️ If you appreciate our work, tap a like or heart to support — we’ll keep bringing top passive income projects!

Hashtags

🏢 Daily Quiz :13 Jul 🔑Q.1 Ans. :Antoine de Saint-Exupéry 🔑Q.2 Ans. :The Scream 🔑Q.3 Ans. :Paradise Lost 🔑Q.4 Ans. :In Search of Lost Time 🔑Q.5 Ans. :Magical Realism 🔑Q.6 Ans. :Alexander Pushkin 🔑Q.7 Ans. :Data Mining 🔑Q.8 Ans. :Decentralization 🔑Q.9 Ans. :Psychologism 🔑Q.10 Ans. :Anton Chekhov 🔗 Link :City Holder #cityholder ❤️ If you appreciate our work, tap a like or heart to support — we’ll keep bringing top passive income projects!

Hashtags

🏢 Daily Quiz :12 Jul 🔑Q.1 Ans. :Evaporation 🔑Q.2 Ans. :Electron 🔑Q.3 Ans. :Atomic physics 🔑Q.4 Ans. :Electrolysis 🔑Q.5 Ans. :Blockchain 🔑Q.6 Ans. :Jupiter 🔑Q.7 Ans. :Ethology 🔑Q.8 Ans. :Troposphere 🔑Q.9 Ans. :Mitochondrion 🔑Q.10 Ans. :Dispersion 🔗 Link :City Holder #cityholder ❤️ If you appreciate our work, tap a like or heart to support — we’ll keep bringing top passive income projects!

Hashtags

123•••101112
ПретходнаСтраница 1 од 12Следна