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

Резултати

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

Пребарај: #aipolicysummit

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

@ai_and_law · Post #240 · 14.02.2024 г., 08:04

US FTC Hosts Inaugural AI Policy Summit Greetings everyone! The US Federal Trade Commission (FTC) held its first public summit on AI policy on January 25, 2024, focusing on antitrust and consumer protection challenges posed by AI technology's rapid evolution. The event convened experts from academia, industry, and government to discuss competition and consumer protection considerations in AI. FTC leaders expressed concerns about anticompetitive practices and consumer protection risks stemming from the adoption of large language models and generative AI. The agency is exploring enhanced enforcement in the AI sector while developing its liability regime. FTC Chair Lina Khan highlighted worries about incumbent tech companies consolidating control of the AI sector through vertical integration, leveraging their influence over training data and infrastructure. The FTC also signaled intentions to address consumer protection issues related to harmful AI applications and privacy violations in training data collection. The FTC announced a Section 6(b) inquiry into recent AI investments and partnerships between developers and cloud service providers to study their competitive impact. The summit reflects the FTC's commitment to understanding and regulating AI's impact on competition and consumer welfare. #FTC#AIPolicySummit#Antitrust#ConsumerProtection