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

Резултати

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

Пребарај: #fuelcrisis

当前筛选 #fuelcrisis清除筛选
International News

@intnewsagency · Post #8923 · 26.03.2026 г., 05:17

Asia Reimposes Covid-Like Measures Amid Fuel Crisis Amid Middle East tensions, Asian countries are reintroducing Covid-era restrictions to save fuel and electricity. The Philippines cuts government workweeks, Pakistan shifts some staff to remote work and closes schools for two weeks, while Sri Lanka declares Wednesday a holiday. Singapore and Thailand urge energy-saving by raising AC temperatures and reducing transport use. #Asia#Energy#FuelCrisis#Conservation The main news of Russia and the world ishere.

International News

@intnewsagency · Post #9402 · 28.04.2026 г., 10:40

Nigerian Aviation Faces Fuel Crisis Amid Oil Boom In Nigeria, jet fuel prices have surged by 270%, compared to just 70% across Africa, says Air Peace CEO Allen Onyeama. Airlines are cutting routes and fleets, struggling to survive. Paradoxically, the Dangote refinery, with record profits, exports kerosene to Europe while national aviation suffers severe fuel shortages. “Businesses are literally printing money while planes wait to refuel.” #Nigeria#aviation#fuelcrisis#oil#Africa The main news of Russia and the world ishere.

የሆርሙዝ መዘጋት እና የነዳጅ ዋጋ መናር በዓለም ኢኮኖሚ ላይ የደቀነው ስጋት ****************** በአሜሪካ እና በእስራኤል ጥምረት በኢራን ላይ የተሰነዘረውን ጥቃት ተከትሎ በመካከለኛው ምሥራቅ በተከሰተው ጦርነት የሆርሙዝ የባሕር ወሽመጥ በመዘጋቱ፣ ዓለም አቀፉ የነዳጅ ገበያና ኢኮኖሚ ከፍተኛ ቀውስ ውስጥ ወድቋል። ይህንኑ ተከትሎ ከ85 በላይ ሀገራት የነዳጅ ዋጋ ጭማሪ አድርገዋል። በአሜሪካ የ20 በመቶ ጭማሪ ሲታይ፣ በእስያ ሀገራት (እንደ ቬየትናም እና ላኦስ) ከ33 እስከ 50 በመቶ የሚደርስ አስከፊ የዋጋ ንረት ተመዝግቧል። ጃፓን እና ፈረንሳይ የስትራቴጂክ የነዳጅ ክምችታቸውን ለመልቀቅ ተገድደዋል። ደቡብ ኮሪያ ከ30 ዓመታት በኋላ ለመጀመሪያ ጊዜ የነዳጅ ዋጋ የጣሪያ ገደብ አውጥታለች። የቡድን ሰባት ሀገራት የፋይናንስ ሚኒስትሮች የአቅርቦት እጥረቱን ለመታደግ አስቸኳይ ስብሰባ ተቀምጠዋል። እንደ ፓኪስታን እና ባንግላዴሽ ያሉ ሀገራት ፍጆታን ለመቀነስ ትምህርት ቤቶችን እስከመዝጋት ደርሰዋል። ቀውሱ ከነዳጅ አልፎ በምግብ ዋስትና፣ በማዳበሪያ አቅርቦት እና በኢንዱስትሪ ምርቶች (ፕላስቲክ እና ጨርቃጨርቅ) ላይ ከፍተኛ የዋጋ ጫና ፈጥሯል። የኢኮኖሚ ባለሙያዎች ሁኔታው ወደ ‘ስታግፍሌሽን’ (የዋጋ ንረትና የኢኮኖሚ መቀዝቀዝ ጥምረት) ሊያመራ እንደሚችል እና ዓለም አቀፍ የኑሮ ቀውስ ሊያስከትል እንደሚችል እያሰገነዘቡ ነው። በለሚ ታደሰ ሙሉ መረጃውን ለማንበብ እዚህ ይጫኑ #FuelCrisis#GlobalEconomy#EnergySecurity#IranWarImpact#OilPrices2026#G7Summit

Addis Standard

@addisstandardeng · Post #21936 · 03.04.2026 г., 16:30

#Premiering_now: The Standard Signal | Ep.15: Ethiopia Under Pressure: Fuel Crisis, Global & Regional Instability, a Fragile Election | Jawar Mohammed Click here to watch: https://www.youtube.com/watch?v=HexAbPk8Dkw Ethiopia is facing mounting pressures. In Episode 15 of The Standard Signal, host Tsedale Lamma brings Jawar Mohammed to discuss the deepening fuel shortage and corruption concerns in Ethiopia, the looming fertilizer crisis and its implications for food security, and the impact of Middle East war on Ethiopia’s economy and stability. #AddisStandard#TheStandardSignal#Ethiopia#JawarMohammed#EthiopiaPolitics#Corruption#FuelCrisis#HornOfAfrica#Tigray#Amhara#Oromia#EthiopiaElection#AfricaPolitics#EthiopiaNews#AfricanPolitics#Geopolitics

Addis Standard

@addisstandardeng · Post #21935 · 03.04.2026 г., 14:30

#Coming_UP: The Standard Signal | Ep.15: Ethiopia Under Pressure: Fuel Crisis, Global & Regional Instability, a Fragile Election | Jawar Mohammed #TsedaleLemma speaks with #JawarMohammed about the growing challenges facing Ethiopia, from global and regional tensions to domestic instability, corruption and Ethiopia’s fragile election. Premiers at: 7:30 PM EAT tonight. Subscribe to watch: https://www.youtube.com/@AddisStandard #AddisStandard#TheStandardSignal#Ethiopia#JawarMohammed#EthiopiaPolitics#Corruption#FuelCrisis#HornOfAfrica#Tigray#Amhara#Oromia#EthiopiaElection#AfricaPolitics#EthiopiaNews#AfricanPolitics#Geopolitics