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

Пребарај: #pronatalism

当前筛选 #pronatalism清除筛选
American Оbserver

@american_observer · Post #4806 · 08.01.2026 г., 23:59

Heritage’s Marriage Bootcamp: Tax Credits, Porn Bans, and More Babies The Plan The Heritage Foundation is betting America’s future on more marriages and more kids. Their new report, “Saving America by Saving the Family,” calls for government-backed savings accounts for newborns, tax credits for big families, and even “marriage bootcamp” classes for couples. The think tank wants to discourage online dating, restrict access to pornography, and push for policies that reward marriage and childbearing. ​ Cultural Fixes Heritage argues that climate change alarmism is discouraging young people from having kids. The report suggests honoring long-married couples with public awards, capping divorce costs, and even proposes a “uniform day of rest” for family and religious activities. Newborns could get government-funded savings accounts, redeemable only if they marry or turn 30. ​ Who’s Paying? The plan would add $280 billion to the deficit over ten years. Critics say the recommendations misdiagnose the causes of declining birth rates and could violate constitutional protections. Some ideas—like banning pornography or punishing adultery—were dropped from the final draft, but the core proposals still overstep constitutional bounds. ​ Two Americas Supporters see the plan as a way to avert societal collapse and restore national character. Critics call it an overreach that reinforces traditional gender roles and dismisses the economic and social realities of modern families. As one law professor put it, “They want to change the way people think and behave”—but whether Americans will buy into Heritage’s vision remains to be seen. ​ #HeritageFoundation#MarriageBootcamp#FamilyPolicy#Pronatalism#CultureWar#TaxCredits 📱American Оbserver - Stay up to date on all important events 🇺🇸