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 слични објави

Пребарај: #secureai

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

@ai_and_law · Post #299 · 03.05.2024 г., 07:04

USA: New Bill Targets AI Security with Breach Tracking and Counter-AI Measures Senators Warner and Tillis have introduced the Secure Artificial Intelligence Act, aiming to bolster security measures surrounding AI systems. The bill proposes an AI Security Center within the National Security Agency (NSA) to manage a database recording all AI security breaches, including close calls ("near-misses"). The legislation establishes a dedicated unit within the NSA to lead research on "counter-AI" techniques. This includes methods to identify and prevent manipulation of AI systems, such as: ✅Data Poisoning: Malicious insertion of code into training data to skew an AI model's output. ✅Evasion Attacks: Altering data used by AI models to intentionally confuse them. ✅Privacy-Based Attacks: Exploiting vulnerabilities in AI systems to compromise user privacy. ✅Abuse Attacks: Misusing AI models for malicious purposes. The Secure Artificial Intelligence Act will undergo committee review before potential consideration by the full Senate. #SecureAI

Hashtags

AI & Law

@ai_and_law · Post #35 · 21.06.2023 г., 07:04

£54 million boost to develop secure and trustworthy AI research The UK government has announced a significant investment of £54 million to support the development of secure and trustworthy AI. The funding will be allocated to various projects and initiatives focused on enhancing the security and trustworthiness of AI systems. This includes advancing research on AI algorithms, data privacy, and cybersecurity measures. The aim is to address critical challenges such as algorithmic bias, data protection, and ethical considerations in AI development and deployment. #AIresearch#SecureAI#TrustworthyAI#UKgovernment#Innovation#EthicalAI#DataPrivacy#Cybersecurity