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

Резултати

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

Пребарај: #zap

当前筛选 #zap清除筛选

ZAP and Auto-fill for Bidask, reward distribution and contest with TaskOn 💪ZAP and Auto-fill: now you can add liquidity with only one type of tokens in your wallet, your position will be balanced automatically. Auto-fill is useful for selecting and evenly distributing the second type of tokens, depending on the chosen strategy. 👍 Reward distribution: farming in the 🪙WEB3 / TON pool ended on August 5, the final reward calculation is underway. For the 🪙 HYDRA / TON pool, everything has already been sent to wallets, while the long-term distribution from HYDRA themselves will continue. 🪙 TeFi Alliance campaign has also ended, $2 000 for farming tgUSD has already been sent. 🏆Bidask x TaskOn contest - prize pool $500, the contest will last from August 7 to 21. Conditions below: ➡️Swaps tokens worth $10 or more. ➡️Add liquidity from $10. ➡️More actions = more XP = higher chance of getting a reward. 1st place — $100 2nd place — $90 3rd place — $75 4th place — $60 5th place — $50 6th place — $40 7th place — $30 8th place — $25 9th–10th places — $15 each  #Bidask#ZAP#rewards#contest

TN MiniCrypto Official

@swift_airdrops · Post #5125 · 10.04.2024 г., 17:57

⚡️ Airdrop ZAP Chain is finally here! Just Follow the steps 🔥 👉 Join here :- zapchain.io/node-sale/0M7WMX6JXO ➖ Connect your X ➖ Connect your evm ➖ Complete all tasks ➖ Done #Note : 3 days left only guys Don't miss because Snapshot on 13 April at 13:00 UTC Confirmed 🔥#ZAP#ZAPlayer2#Runes#Airdrop