TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #183 · 23 ное.

Python + bash Если вам часто требуется запускать shell команды из Python-кода, какой способ вы используете? Самый низкоуровневый это функция os.system(), либо os.popen(). Рекомендованный способ это subprocess.call(). Но это всё еще достаточно неудобно. Советую обратить своё внимание на очень крутую библиотеку sh. Что она умеет? 🔸 удобный синтаксис вызова команд как функций # os import os os.system("tar cvf demo.tar ~/") # subprocess import subprocess subprocess.call(['tar', 'cvf', 'demo.tar', '~/']) # sh import sh sh.tar('cvf', 'demo.tar', "~/") 🔸 простое создание функции-алиаса для длинной команды fn = sh.lsof.bake('-i', '-P', '-n') output = sh.grep(fn(), 'LISTEN') в этом примере также задействован пайпинг 🔸 удобный вызов команд от sudo with sh.contrib.sudo: print(ls("/root")) Такой запрос спросит пароль. Чтобы это работало нужно соответствующим способом настроить юзера. А вот вариант с вводом пароля через код. password = "secret" sudo = sh.sudo.bake("-S", _in=password+"\n") print(sudo.ls("/root")) Это не все фишки. Больше интересных примеров смотрите в документации. Специально для Windows💀 юзеров #libs#linux

Hashtags

Резултати

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

Пребарај: #euai

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

@ai_and_law · Post #720 · 10.12.2025 г., 08:04

🇪🇺EU FRA Flags Rights Risks in High-Risk AI Deployment The EU Agency for Fundamental Rights has released a report showing that many developers and deployers of high-risk AI systems lack the knowledge or tools to mitigate impacts on fundamental rights. The assessment covers the use of such systems in asylum procedures, education, employment, law enforcement, and the administration of public benefits: areas where algorithmic decisions can directly affect access to essential services and legal protections. The FRA recommends expanding the definition of AI to better reflect fundamental-rights considerations and issuing clear guidance on how to conduct impact assessments. According to the report, these steps are necessary to ensure that high-risk AI systems are developed and deployed in ways that do not compromise individuals’ rights across critical public domains. #AIandLaw#FundamentalRights#EUAI#AIRegulation

AI & Law

@ai_and_law · Post #436 · 06.11.2024 г., 08:04

Strengthening the EU’s AI Leadership Through Investment and Strategic Governance The EU Council has endorsed the European Court of Auditors’ call to elevate AI ambitions within the EU, emphasizing increased, targeted investments and enhanced governance. Recognizing AI’s potential to drive Europe’s global competitiveness, the Council urges a focus on fostering AI talent and creating an ecosystem built on excellence and trust. Moreover, the Council highlights the importance of considering environmental impacts, especially in energy efficiency and the reliability of the hardware supply chain, as the EU moves forward with AI policies. By reinforcing collaboration with member states and international partners, the EU aims to position itself as a global leader and benchmark in AI governance. #AIGovernance#EUAI#SustainableAI #

AI & Law

@ai_and_law · Post #761 · 10.02.2026 г., 08:04

🇪🇺European Parliament Pushes New Copyright Safeguards for AI The European Parliament’s Committee on Legal Affairs has approved an own-initiative report proposing new measures to strengthen copyright protection in the context of generative AI. The proposals include mandatory transparency obligations on training data practices for all generative AI systems placed on the EU market. MEPs also call for remuneration mechanisms for rightsholders and the development of voluntary, sector-specific collective licensing agreements. The report is not legally binding but signals political direction and will be submitted for a vote by the full Parliament during the March plenary session. #AIandCopyright#EUAI#GenerativeAI#CopyrightLaw#AIRegulation

AI & Law

@ai_and_law · Post #73 · 02.08.2023 г., 07:04

Leading the Way in Responsible AI: The EU's Vital Opportunity Hello, AI enthusiasts! Today, we share a policy brief by Pegah Maham and Sabrina Küspert from the Stiftung Neue Verantwortung. They highlight the EU's significant chance to take the lead in responsible AI development through the AI Act and beyond. But to seize this opportunity, understanding the risks associated with general-purpose AI models is essential. 🔹 Risks from Unreliability: One major concern is the lack of control over AI models' behavior. This unreliability could lead to serious issues like discrimination and stereotype reproduction, spreading misinformation, and violating individual privacy. 🔹 Misuse and Dual-Use AI Models: The dual-use nature of some AI models poses another challenge. While they offer immense benefits, they can also be misused by malicious actors for cybercrime, biosecurity threats, and politically motivated purposes. 🔹 Systemic Risks: As AI rapidly integrates into our society, systemic risks emerge. These risks include economic power concentration and inequality, ideological homogenization, and disruptions from the lagging adaptation of society. By comprehending and addressing these risks, the EU can establish itself as a global leader in responsible AI development. #ResponsibleAI#AIRegulation#AIAct#AIChallenges#EUAI#TechPolicy#DigitalFuture#AICommunity