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

Резултати

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

Пребарај: #wildfires

当前筛选 #wildfires清除筛选
Amazing Geography 🌍

@amazingeo · Post #279 · 21.09.2025 г., 20:31

🌍 In 2021, a record-breaking heatwave in western Canada triggered hundreds of wildfires, generating so much smoke it traveled thousands of kilometers and reached northern Europe. ✨ #disasters⚡#wildfires⚡#climate⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #639 · 18.02.2026 г., 12:31

🌍 New satellite sensors can track wildfires as they ignite, mapping heat signatures from space day and night. This real-time data helps firefighters respond faster to changing fire fronts. ✨ #satellites⚡#remote-sensing ⚡#wildfires⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Reuters: World

@reutersworldchannel · Post #149361 · 14.10.2021 г., 16:08

Fire crews fight California wildfire near Reagan ranch Planes and fire crews tackled a fast-moving wildfire near former President Ronald Reagan’s ranch in California #News#Reuters#California#ReaganRanch#Wildfires Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖

Reuters: World

@reutersworldchannel · Post #149353 · 14.10.2021 г., 13:16

October 14, 2021: Norway mass killing, Taiwan fire, Big Tech, U.S. Capitol riots, California October 14, 2021: Norway mass killing, Taiwan fire, Big Tech, U.S. Capitol riots, California 1. A 37-year-old Danish citizen who had converted to Islam is suspected of killing five people with a bow-and-arrow and other weapons in the Norwegian town of Kongsberg in a rare incident of mass killing in Norway, police said. 2. A fire in a residential building in the southern Taiwanese city of Kaohsiung has killed 46 people and injured another 41, the government said. 3. A bipartisan group of lawmakers, headed by Democrat Amy Klobuchar and Republican Chuck Grassley, plan to introduce a bill that would bar Big Tech platforms, like Amazon and Google, from favoring their products and services. 4. A congressional panel investigating the deadly Jan. 6 riot at the U.S. Capitol said it has issued a subpoena seeking testimony and records from Jeffrey Clark, a former senior official at the Justice Department who was a proponent of former President Donald Trump's false election fraud claims. 5. California firefighters took advantage of a break in strong winds to get an aircraft aloft and dump retardant on a fast-moving wildfire that was within a half mile of former President Ronald Reagan's ranch, officials said. #Norway #Taiwan #Fire #BigTech #Democrats #Republicans #AmyKlobuchar #ChuckGrassley #UnitedStates #CapitolRiots #Trump #California #Wildfires #RonaldReagan #News #Reuters Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖