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

Резултати

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

Пребарај: #wanderlust

当前筛选 #wanderlust清除筛选
International Geographic

@internationalgeographic · Post #5600 · 14.04.2025 г., 03:56

📍 Nighttime in Singapore 🇸🇬 View of the Marina Bay Sands hotel 🌆 Singapore is an island nation in Southeast Asia. Founded as a British trading colony in 1819, after gaining independence it became one of the most prosperous countries, with the world's leading trading port. A fascinating fact: Singapore is the world's only island city-state! 🏙️🌴 #travel#wanderlust#cityscape

VEON AdTech

@veonadtech · Post #254 · 11.07.2025 г., 10:30

Ловим момент, когда мозг говорит: «Пора в отпуск!» Мечты рождаются между делом: 🫴 Оплатил связь → увидел билеты по цене кофе 👍 Оформил страховку → получил оффер на SPA-уикенд 🛫 Проверил баланс → открыл подборку тревел-хаков Почему это не реклама, а магия: ✨ Алгоритм ловит момент, когда мозг готов к побегу ✈️ Предложения встраиваются в рутину, как свои мысли 📈 Конверсия в 4 раза выше стандартных баннеров P.S. Это как если бы Booking.com читал мысли — только точнее и без cookie. 💻 Знаем, как продавать отдых до того, как его захотят — протестируем? #VEONAds#BehavioralTargeting#DigitalMarketing#Wanderlust#TravelTech#SmartAds 👋👋Всё о digital-рекламе в Узбекистане: аналитика, лайфхаки и готовые решения.

Amazing World and Travel

@amazingworldtravel · Post #677 · 10.04.2026 г., 03:58

🇲🇬Avenue of the Baobabs, Madagascar Ancient baobab trees, some over 800 years old and 30 meters tall, line this red-dirt road in western Madagascar like sentinels from a primordial world. These Grandidier's baobabs are among the most endangered trees on Earth — the last survivors of a once-dense tropical forest cleared over centuries, leaving these ancient giants standing alone in open farmland. At sunset, their massive silhouettes glow against a sky of liquid fire, bare branches reaching upward like roots — which is why Malagasy legend says the gods planted baobabs upside down. Ox-carts pass between trees that were already ancient when Genghis Khan rode across Asia, creating one of Africa's most hauntingly beautiful landscapes. Drop a 🔥 if this is on your list! #travel#wanderlust#explore#bucketlist#travelgram#adventure 📸@amazingworldtravel

Amazing World and Travel

@amazingworldtravel · Post #675 · 09.04.2026 г., 03:45

🇺🇸Antelope Canyon, United States Sculpted by flash floods over millions of years, this narrow slot canyon in Navajo Nation reveals flowing sandstone walls in waves of orange, red, purple, and gold. When midday sunlight beams pierce the narrow openings above, shafts of light illuminate the swirling rock in an ever-changing display that has made Antelope Canyon one of the most photographed wonders in the American Southwest. Upper Antelope Canyon — 'the place where water runs through rocks' in Navajo — is a smooth, undulating corridor at ground level, while Lower Antelope Canyon descends via narrow ladders into deeper chambers. Both were formed by monsoon floods that carry sand polishing the Navajo sandstone into these impossibly smooth, flowing forms. Drop a 🔥 if this is on your list! #travel#wanderlust#explore#bucketlist#travelgram#adventure 📸@amazingworldtravel

ПретходнаСтраница 1 од 3Следна