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

Резултати

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

Пребарај: #ship

当前筛选 #ship清除筛选
404 KIDS SEE GHOSTS (生产力之王版

@Isaiahsystem · Post #1414 · 18.01.2026 г., 13:17

https://x.com/thedankoe/status/2010751592346030461 1.25 亿阅读量...X 最近在推一个百万美元文章活动,将在下一轮收益分成给表现最好的一篇长文发放 100 万美元。一鲸起,万物生成(Generated)。#ship

Hashtags

Interesting Planet 🌍

@interesting_planet_facts · Post #657 · 30.08.2025 г., 16:22

🌎 In 1872, the Mary Celeste was found adrift in the Atlantic Ocean—its crew vanished without a trace, leaving food, cargo, and the ship untouched. This unsolved maritime mystery has puzzled historians ever since. ✨ #disappearance⚡#ship⚡#mystery 👉subscribe Interesting Planet ​

American Оbserver

@american_observer · Post #5664 · 20.04.2026 г., 13:59

The US Has Attacked An Iranian-Flagged Container Ship. A New Stage of the War? ⚠️🌍 The US military has attacked and seized an Iranian-flagged container ship that attempted to get past an American blockade near the strait of Hormuz, the first such interception since the blockade of Iranian ports began last week. 🚢 Iran’s joint military command said Tehran would respond soon and called the US seizure an act of piracy that violated the ceasefire that has been in place since 8 April. The news threw into question Trump’s earlier announcement that US negotiators would head to Pakistan on Monday for another round of talks with Iran. That had raised hopes of extending a fragile ceasefire set to expire by Wednesday, but Iran has not confirmed it will attend. In a post on X, US Central Command said US marines departed the USS Tripoli assault ship by helicopter and rappelled on to Touska on Sunday. The post included a video of the marines onboard the helicopter. Trump had earlier posted on X that the ship had tried to get past the US blockade “and it did not go well for them”. The US president said a US navy guided missile destroyer warned the Touska to stop in the Gulf of Oman but the vessel did not. “[Our] Navy ship stopped them right in their tracks by blowing a hole in the engine room,” Trump said, adding that US marines now had custody of the vessel. 💥 He said the ship was under US treasury sanctions because of “prior history of illegal activity”. The ship is on the treasury department’s list of sanctioned vessels. A spokesperson for Iran military’s central command centre, Khatam al-Anbiya, cited by the Isna news agency, said: “We warn that the armed forces of the Islamic Republic of Iran will soon respond and retaliate against this armed piracy and the US military.” Iranian state media also reported that Tehran had – for now – rejected new peace talks, citing the ongoing blockade, threatening rhetoric, and Washington’s shifting positions and “excessive demands”. Video posted on social media by the US defence department showed the interception of the ship by US forces. “Vacate your engine room,” a US sailor can be heard saying. “We’re prepared to subject you to disabling fire.” The cargo ship was stopped near Iran’s border with Pakistan. Touska had previously left Port Klang, a major port in Malaysia, when the vessel then attempted to move past the US blockade, according to tracking information from TankerTrackers.com. The escalating standoff threatens to deepen the energy crisis roiling the global economy and push the two countries toward renewed fighting, in a conflict that has killed at least 3,000 people in Iran, nearly 2,300 in Lebanon, 23 civilians and 15 soldiers in Israel, and more than a dozen in Gulf Arab states. Thirteen US service members have also been killed. 📉 #us#iranian#container#ship#war 📱American Оbserver - Stay up to date on all important events 🇺🇸

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