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

Резултати

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

Пребарај: #chinaai

当前筛选 #chinaai清除筛选
AI & Law

@ai_and_law · Post #59 · 18.07.2023 г., 07:04

China's new AI measures: boosting generative AI services Hello, everyone! Today we have exciting news from China. On July 13th China released the final version of the Interim Measures for Administration of Generative AI Services. Compared to the previous draft, which was open for public comments in April, the final version showcases a more business-friendly and supportive approach. These AI Measures specifically apply to services that generate text, image, video, and audio content using generative AI technology and are made available to the public in China. With a focus on both development and security, China adopts an "inclusive and prudent" stance. Notably, the final version includes more comprehensive provisions to foster international collaborations on generative AI technology and services, surpassing the scope of the earlier draft. The AI Measures outline a range of legal requirements for performing and utilizing generative AI services. These include adhering to core social values, protecting intellectual property rights and trade secrets, as well as taking effective measures to prevent discrimination, monopoly, and anticompetitive practices when designing algorithms, selecting training data, and creating computing models. While the whistle-blowing mechanism remains intact from the consultation draft, the punitive terms that could result in administrative fines of RMB10,000-100,000 for violations have been removed in the final AI Measures. The AI Measures are set to take effect on August 15th, sending a positive signal to businesses interested in investing, developing, and engaging in generative AI services in China. This move is expected to attract significant investments into China's thriving AI landscape in the coming months and years. #AIRegulations#GenerativeAI#ChinaAI#BusinessInvestments

Crypto M - Crypto News

@CryptoM · Post #64898 · 10.04.2026 г., 07:57

🚀 AI TRENDS | China's AI Industry Alliance Issues Risk Management Guide for Enterprise Security China's AI industry alliance has introduced a risk management guide aimed at enhancing enterprise security governance, similar to OpenClaw. According to NS3.AI, the guide establishes a security framework and self-inspection standards for the deployment, usage, and decommissioning of AI agents. #AI#ChinaAI#EnterpriseSecurity#RiskManagement#SecurityGovernance#AIIndustry#AIagents#NS3AI