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

Резултати

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

Пребарај: #aipolicy

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

@ai_and_law · Post #193 · 19.12.2023 г., 08:04

MIT Unveils Blueprint for U.S. AI Governance Hello, everyone! A committee of MIT Schwarzman College of Computing leaders and scholars has released a set of white papers outlining a strategic framework for the governance of Artificial Intelligence in the United States: 1️⃣A Framework for U.S. AI Governance: Creating a Safe and Thriving AI Sector 2️⃣Large Language Models 3️⃣Can We Have Pro-Worker AI? Choosing a Path of Machines in Service of Minds 4️⃣Labeling AI-Generated Content: Promises, Perils, and Future Direct The central policy paper, titled "A Framework for U.S. AI Governance: Creating a Safe and Thriving AI Sector," proposes the utilization of existing U.S. government entities to regulate AI tools within their designated areas. The framework emphasizes the necessity of clearly defining the purpose of AI tools, aligning regulations with specific applications, and holding AI providers accountable for the intended use of their technologies. The policy papers also advocate for advancements in auditing AI tools, exploring various pathways such as government-initiated processes, user-driven mechanisms, or legal liability proceedings. #AI#AIPolicy

Hashtags

AI & Law

@ai_and_law · Post #604 · 01.07.2025 г., 07:04

📖From Agents to Accountability: A Governance Blueprint for Autonomous AI As AI systems gain autonomy and operational independence, the latest report from the Center for AI Policy calls for a new governance paradigm. Focused on agentic AI—systems capable of executing complex tasks with minimal human oversight—the report outlines three core risks: catastrophic misuse via security breaches, slow erosion of human authority in decision-making, and disruptive white-collar workforce displacement. To address these, the authors recommend an “autonomy passport” system for AI registration, enforceable oversight mechanisms, mandatory expert review in high-impact domains, and economic monitoring of labor shifts. #AI#AIGovernance#AIPolicy

AI & Law

@ai_and_law · Post #674 · 08.10.2025 г., 07:04

🇺🇸Senate’s AI Jobs Report Built on ChatGPT Data Raises Questions About Policy Integrity A new report from the U.S. Senate Committee on Health, Education, Labor, and Pensions (HELP), led by Senator Bernie Sanders, claims that AI and automation could replace 97 million American jobs over the next decade. However, the report’s startling numbers, such as 89% of fast-food workers and 83% of customer service representatives at risk, were generated not by economists or federal research, but by ChatGPT. Senator Sanders used these figures to call for sweeping reforms, including a “robot tax,” a 32-hour work week without pay cuts, and a ban on stock buybacks. Yet experts note that much of the underlying data appears unreliable, with no current evidence that AI is displacing workers at this scale. Recent studies, including one from Yale, found no discernible disruption in the labor market attributable to AI. #AIPolicy#AIlaw

AI & Law

@ai_and_law · Post #513 · 25.02.2025 г., 08:04

🌐The First International AI Safety Report The newly released International AI Safety Report, chaired by Yoshua Bengio, gathers insights from 96 AI experts across 30 nations, the OECD, EU, and UN. This 298-page report highlights a critical challenge: the rapid and unpredictable evolution of AI leaves policymakers in an “evidence dilemma” — act too soon with limited data, or risk being unprepared for sudden AI breakthroughs. The report underscores a fundamental truth: AI’s future is not predetermined; it depends on human choices. As general-purpose AI advances, the decisions of governments, companies, and society will shape its trajectory. Will regulations keep pace? How should policymakers respond to fast-moving risks? These are the urgent questions that demand global cooperation and informed decision-making. #AISafety#AIRegulation#AIPolicy

AI & Law

@ai_and_law · Post #350 · 11.07.2024 г., 07:04

Japan Ministry Introduces First AI Policy Japan's Defense Ministry has released its inaugural policy on the use of AI in military applications, aiming to address recruitment challenges and stay competitive in defense technology. The policy outlines seven priority areas for AI deployment, including target detection, intelligence analysis, and unmanned systems. The strategy emphasizes human control over AI systems and rules out fully autonomous lethal weapons. Japan’s policy could set a precedent for responsible AI use in military applications, influencing global approaches to the AI arms race. #AI#AIPolicy#EthicalAI

AI & Law

@ai_and_law · Post #425 · 22.10.2024 г., 07:04

NYT Takes a Stand: Copyright Concerns Over AI-Generated Content The New York Times has issued a cease-and-desist notice to AI search startup Perplexity, demanding that it stop using the publisher's content without authorization. The NYT alleges that Perplexity’s use of its articles to generate AI summaries infringes on copyright law. This action follows Perplexity’s prior assurance to the publisher that it would cease crawling NYT content—an assurance that, according to the NYT, has not been fully honored. Perplexity, for its part, has expressed a willingness to collaborate with publishers and plans to respond to the notice before the October 30 deadline. This isn’t the first time the NYT has taken a stand; it has also filed lawsuits against OpenAI and Microsoft over similar issues. Other media outlets have echoed these concerns about Perplexity’s use of their content. As AI-powered search capabilities continue to evolve, news outlets are increasingly worried about the impact on their traffic and revenue. With the legal landscape still uncertain, the debate over AI’s role in content usage and copyright is far from resolved. #AI#Copyright#AIPolicy#Perplexity

AI & Law

@ai_and_law · Post #724 · 16.12.2025 г., 08:04

🇺🇸U.S. Executive Order Signals Federal Preemption in AI Policy President Donald Trump has signed a new Executive Order aimed at implementing the U.S. AI Action Plan and removing what the administration views as barriers to American leadership in AI. The Order represents the White House’s second effort to limit state-level AI regulation, following the Senate’s rejection of a proposed 10-year moratorium. It frames extensive state AI laws as a legal and strategic risk, arguing that fragmented regulation across states could undermine innovation and national competitiveness. The Order advances federal authority through three core rationales. First, it argues that AI companies must operate without burdensome, inconsistent state rules, particularly given the absence of a comprehensive federal AI law and the existence of over 1,000 state-level AI bills. Second, it targets state laws that, in the administration’s view, mandate “ideological bias” in AI systems, framing such requirements as potentially violating the Federal Trade Commission Act’s ban on unfair or deceptive practices. Third, it establishes an AI Litigation Task Force within the Department of Justice to challenge state AI laws deemed to unlawfully regulate interstate commerce, conflict with federal policy, or otherwise be unlawful in the Attorney General’s judgment. Together, these measures consolidate regulatory control at the federal level while deferring the adoption of a comprehensive national AI statute. The Executive Order positions federal enforcement and preemption as the primary tools for shaping U.S. AI governance, with significant implications for the future role of state-level AI regulation. #AIRegulation#USAI ##AIPolicy#AILaw

AI & Law

@ai_and_law · Post #764 · 13.02.2026 г., 08:04

🌐📥IAPP Publishes Curated Third-Party Resources for AI Governance The IAPP AI Governance Center released a curated collection of third-party AI governance resources, compiled by Managing Director Ashley Casovan. The list brings together tools, templates, guidelines, and repositories from trusted organizations worldwide, aimed at helping AI developers, deployers, regulators, and governance professionals navigate an increasingly fragmented information landscape. The initiative responds to a recurring problem in the field: the volume of AI governance material is growing faster than professionals can realistically track, assess, and trust. The resource is designed to highlight relevant, practical materials without duplicating existing work, and will be updated periodically with community input. Casovan emphasizes that effective AI governance requires a “full-sum approach,” where multiple organizations contribute complementary expertise. #AIGovernance#AIRegulation#EthicalAI#IAPP#AIPolicy

AI & Law

@ai_and_law · Post #241 · 15.02.2024 г., 08:04

US Lawmakers Introduce No AI FRAUD Act Hello everyone! US lawmakers María Elvira Salazar and Madeleine Dean introduced the No Artificial Intelligence Fake Replicas And Unauthorized Duplications (No AI FRAUD) Act on January 10, aiming to safeguard individuals' likeness and voice from exploitation in AI-generated content. The bill addresses concerns over the misuse of personalized generative AI cloning models, which enable human impersonation and unauthorized creation of fakes using others' images and voices. It seeks to protect the personal rights of individuals, including musical artists, actors, athletes, and even students, whose likeness and voice have been violated. Examples cited include AI-generated songs featuring famous artists like Drake and The Weeknd, false endorsements using celebrities like Tom Hanks, and the creation of non-consensual and intimate deepfakes, particularly concerning high school girls in a New Jersey town. Under the No AI FRAUD Act, individuals gain federal intellectual property (IP) rights over their likeness and voice, empowering them to enforce these rights against those responsible for creating, facilitating, or disseminating AI-generated content without their consent. The bill aims to curb the proliferation of AI-generated imitations and deepfakes while protecting individuals' rights and privacy. #NoAIFRAUDAct#AIPolicy#IntellectualProperty

AI & Law

@ai_and_law · Post #164 · 14.11.2023 г., 08:04

Spain's AI Minister Calms Startups Amid AI Act Concerns Hello, everyone! Spain's AI and Digitalisation Minister, Carme Artigas, urges calm among AI startup founders regarding the AI Act. She assures that the Act's aim is to foster innovation, offering a two-year adaptation period and national sandbox initiatives to support companies. The legislation has undergone three years of extensive contemplation to ensure it remains adaptable amidst AI's rapid advancements. Despite challenges, Artigas is confident about reaching an agreement on the legislation by year-end. #SpainAI#AIAct#Innovation#AIPolicy

AI & Law

@ai_and_law · Post #150 · 28.10.2023 г., 07:34

President Biden's AI Executive Order to Be Revealed! Hello AI & Law followers! On October 30 President Joe Biden is set to unveil his executive order on AI at a special event at the White House. The focus of this event will be on "safe, secure, and trustworthy artificial intelligence." This announcement comes after a series of actions taken by the Biden administration to lay the groundwork for AI guidelines in both the public and private sectors. Stay tuned for more details. #AIRegulations#AIExecutiveOrder#PresidentBiden#AIPolicy#AIandLaw#AISafety

AI & Law

@ai_and_law · Post #153 · 31.10.2023 г., 08:04

UK Government Unveils Report on Frontier AI Risks Hello AI & Law community! UK Prime Minister Rishi Sunak has issued a report to address AI's potential risks and harness its benefits. The report focuses on the rapid advancements in frontier AI and comprises three key sections: 1️⃣Capabilities and Risks from Frontier AI: This section discusses the current state of AI capabilities, potential improvements, and associated risks, including societal harms, misuse, and loss of control. 2️⃣Safety and Security Risks of Generative AI to 2025: It outlines global benefits of generative AI while emphasizing increased safety and security risks, particularly in enhancing threat actor capabilities and the effectiveness of attacks. 3️⃣Future Risks of Frontier AI: This section explores uncertainties in AI development, future system risks, and potential scenarios for AI up to 2030. The report, based on declassified information, raises concerns about generative AI being exploited by terrorists to plan biological or chemical attacks, posing a serious global security threat. Although some experts have questioned the UK Government's approach, the report highlights the need for collaborative measures to manage AI risks. An upcoming AI Safety Summit aims to foster discussions around these challenges, including misuse for cyberattacks or bioweapon design, AI systems acting autonomously, and broader societal impacts. #UKGovernmentAI#FrontierAI#AIRisks#AISafety#AIChallenges#UKAIReport#AIandLaw#AIPolicy#AIRegulation