Что-то вы гоните насчет "привычного вида формата 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
📖🇪🇺 The AI Act: A Strategic Focus on SMEs
According to a summary from the Future of Life Institute the AI Act places significant emphasis on small and medium-sized enterprises (SMEs), mentioning them 38 times—far more than ‘industry’ (7) or ‘civil society’ (11). This focus translates into concrete measures: SMEs will receive priority access to regulatory sandboxes, benefit from proportional compliance costs, and have dedicated channels for guidance.
To further ease compliance, the Act introduces simplified technical documentation, SME-specific training, and tailored obligations under the Code of Practice. With these provisions, the EU aims to ensure that AI innovation remains accessible and sustainable for smaller businesses.
#AIAct#SMEs#AIRegulation#ResponsibleAI
#Opinion: Cost of Modernizing Addis: When progress pushes small businesses out
In recent years, #Ethiopia is undergoing rapid transformation, with digitalization expanding across daily life and #Addis_Abeba experiencing one of its most ambitious urban overhauls. However, Abraham Abebe Asfaw argues in this opinion piece that such ambition risks overwhelming the small and medium enterprises (#SMEs) that employ roughly 70% of the urban population.
He explains that tens of thousands of businesses are cancelling their licenses. This issue extends beyond tax compliance, as the combined pressures of taxation, informal payments, and displacement have eliminated the “margin that allowed firms to survive.”
Abraham emphasizes that “ignoring this distress is costly” and cautions that “development without guardrails risks becoming extractive rather than enabling.”
https://addisstandard.com/?p=54697
Meeting agenda: meeting Miffy? 😲
Follow along Yi Qing as she represents IRAS on the international stage in Utrecht, the Netherlands - the hometown of Miffy! 🐰
At the OECD FTA Community of Interest on Small and Medium Enterprises meeting, she connected with international peers to share experiences and perspectives. The discussions covered important ground in advancing tax administration, from strengthening digital ecosystems to e-invoicing and AI applications. These valuable insights are useful to inspire and shape IRAS' transformation journey ahead.
Explore your opportunities at IRAS today at go.gov.sg/lifeatiras
#fyp#tiktoksg#lifeatiras#SMEs#miffy
🚀 WeChat Pay Launches AI Integration Toolbox for Seamless Payment Solutions
WeChat Pay has officially introduced an AI-native integration toolbox designed to offer merchants and developers a streamlined payment integration solution. According to ChainCatcher, this toolbox facilitates the rapid generation of payment function code through natural language commands.
The toolbox comprises Skill packages, AI-friendly documentation, and APIs, enabling one-click calls in mainstream AI development environments. Its 'verbal code generation' feature significantly reduces the development process from days to minutes, allowing quick integration of over 20 functions, including mini-program payments, H5 payments, refunds, and profit-sharing.
Additionally, the toolbox includes AI diagnostic capabilities that automatically identify code logic issues and provide suggestions for fixes, minimizing financial and system risks during integration. It also supports interface troubleshooting and legacy code upgrades for existing system developers. This upgrade further advances the standardization and AI adaptation of payment capabilities, lowering the digital business barriers for small and medium-sized enterprises.
#WeChatPay#AIintegration#PaymentSolutions#Developers#Merchants#AItoolbox#CodeGeneration#DigitalBusiness#SMEs#TechInnovation#PaymentAPI#Automation#SystemUpgrade
🚀 Trident Digital Tech Holdings Partners with Ripple Strategy for African Expansion
Trident Digital Tech Holdings, a Nasdaq-listed company, has announced a strategic partnership with Ripple Strategy Holding. According to Foresight News, Ripple Strategy will provide RLUSD stablecoin technology and payment infrastructure to support Trident's business expansion in the African market.
Under the agreement, Trident plans to develop a blockchain-based tax settlement and reporting system for approximately 2.1 million small and medium-sized enterprises in Ghana. Additionally, the company aims to establish an RLUSD/GHS liquidity pool to create a low-cost, real-time foreign exchange market, facilitating 24/7 cross-border payments.
Trident has previously formed a 50/50 joint venture with local institutions in Ghana, with a stablecoin business pilot scheduled to commence by mid-2026.
#TridentDigitalTech#RippleStrategy#AfricaExpansion#Stablecoin#Blockchain#SMEs#Ghana#ForeignExchange#CrossBorderPayments#RLUSD#Nasdaq#TechPartnership#PaymentInfrastructure#BlockchainTaxSystem#LiquidityPool#XRP