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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #210 · 3 фев.

Что делать если нужно поставить какую-то Python-библиотеку а root-прав нет? То есть в систему библиотеку никак и ничего не поставить. Есть как минимум два способа это решить правильно! 🔸 Сделать виртуальное окружение и ставить там что угодно. Это позволит создать полностью независимое исполняемое окружение для ваших приложений. Все библиотеки будут храниться в домашней директории юзера а значит доступ на запись имеется. Создать очень просто: python3 -m venv ~/venvs/myenvname Теперь активируем окружение # Linux source ~/venvs/myenvname/bin/activate # Windows %userprofile%\venvs\myenvname\Scripts\activate.bat Можно ставить любые библиотеки и запускать приложение. Это стандартный метод работы с любым проектом. Если еще не используете его, то пора начинать. Даже при наличии root доступа! 🔸 Бывает, что нет возможности запустить приложение из своего виртуального окружения. Например, его запускает какой-то сервис от вашего юзера и вставить активацию окружения вы не можете. В этом случае можно установить библиотеки для Python не глобально в систему, а только для юзера. Выполните этот код в консоли: python3 -m site Вы получите что-то такое: sys.path = [ '/home/user', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/home/user/.local/lib/python3.7/site-packages', ... ] USER_BASE: '/home/user/.local' USER_SITE: '/home/user/.local/lib/python3.7/site-packages' ENABLE_USER_SITE: True Нас интересует параметр USER_SITE. Это путь к пользовательским библиотекам, которые доступны по умолчанию, если они есть. Именно сюда будут устанавливаться модули если добавить флаг --user при установке чего-либо через pip pip install --user requests Для этой команды не нужны root-права. После неё можно запускать системный интерпретатор без виртуальных окружений и установленная библиотека будет доступна для текущего юзера. Параметр USER_BASE показывает корневую директорию для хранения user-библиотек. Её можно изменить с помощью переменной окружения PYTHONUSERBASE export PYTHONUSERBASE=~/pylibs python3 -m site ... USER_BASE: '/home/user/pylibs' USER_SITE: '/home/user/pylibs/lib/python3.7/site-packages' Получается некоторое подобие виртуального окружения для бедных 😁 которое можно менять через эту переменную (не делайте так!Лучше venv!) 🔸 Дописывание пути в PYTHONPATH Этот способ не входит в список "двух правильных", но тоже рабочий. Здесь придётся сделать всё несколько сложней. Сначала ставим библиотеку в любое место указывая путь установки pip3 install -t ~/mylibs modulename Библиотека установится без привязки к какому-либо интерпретатору. То есть по умолчанию не будет видна. Теперь в нужный момент добавляем этот путь в sys.path или в PYTHONPATH. Не буду советовать так делать. Единственный раз когда этот способ мне пригодился и решил поставленную задачу, это при создании общей библиотеки для кластера компьютеров. Модули лежат в сети и подгружаются для всех из одного и того же места. То есть обновлять файлы требуется только один раз а не на всех хосты отдельно. Минусы такого подхода: ▫️Нужно всем хостам пробить нужный путь в .bashrc или ещё куда-то чтобы он сетапился на старте. ▫️Чем больше хостов тем больше нагрузка на сеть. Иногда такой способ не подходит именно по этой причине. Тогда Ansible вам в помощь. ▫️Не очень подходит если хосты с разными операционками. Некоторые библиотеки различаются для Linux и Windows (там, где есть бинарники) и приходится мудрить более сложные схемы. #tricks#basic

Резултати

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

Пребарај: #aiethics

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

@ai_and_law · Post #626 · 01.08.2025 г., 07:04

📖AI in Vogue: Innovation or Erosion of Representation? Vogue’s August issue features a full-page Guess ad with a flawless, AI-generated model, marking the first appearance of a synthetic person in the magazine. The model, created by Seraphinne Vallora at the request of Guess co-founder Paul Marciano, is disclosed only in fine print. The image is visually striking—but raises serious concerns. Industry voices, including plus-size model Felicity Hayward, warn that AI models could reverse hard-won gains in diversity and inclusion. The shift may lower costs and generate attention, but it also risks deepening beauty standard distortions and marginalizing real models, particularly those already underrepresented. The fashion industry now faces a stark choice: innovation without accountability, or a new standard that includes ethics by design. #AIEthics

Hashtags

AI & Law

@ai_and_law · Post #606 · 03.07.2025 г., 07:04

📖AI as Artificial Ignorance In his recent paper “AI as Artificial Ignorance”, Prof. Bent Flyvbjerg confronts a core epistemological issue: current generative AI, for all its fluency, often confuses persuasion with truth. Lacking a framework for what counts as knowledge, AI systems like ChatGPT are “closer to bullshit than to truth” — fluent in language but unreliable in fact. Flyvbjerg pushes the conversation beyond accuracy into the realm of epistemic accountability: if AI surpasses human capabilities without being intelligible to humans, are we truly gaining knowledge — or simply outsourcing it into a black box? His provocation is clear: unless AI can learn to know, not just to sound right, we risk embedding ignorance at scale. #AIethics

Hashtags

AI & Law

@ai_and_law · Post #669 · 01.10.2025 г., 07:04

🎬Synthetic Actors Enter Hollywood Hollywood is facing a new fault line with the debut of Tilly Norwood, an AI-generated actress created by talent studio Xicoia, a spin-out of Particle6. Within weeks of her first comedy sketch appearance, Norwood is reportedly in talks with multiple talent agencies — a shift that founder Eline Van der Velden describes as proof that “the age of synthetic actors isn’t coming, it’s here.” Norwood arrives complete with a crafted backstory, voice, and narrative arc, positioning her not as a digital experiment but as a competitor to human talent. The move has already provoked strong pushback. Actors called for boycotts of any agency that signs synthetic performers, framing it as a direct threat to the profession. With union-led strikes over AI still fresh, the reactions underscore how polarizing “synthetic actors” will be in negotiations over labor rights, artistic integrity, and the future of talent representation. #AI#AIEthics

Hashtags

AI & Law

@ai_and_law · Post #609 · 08.07.2025 г., 07:04

📖Potemkin Understanding: When AI Fakes Comprehension A new study from MIT, Harvard, and the University of Chicago introduces the term “potemkin understanding” to describe a critical failure mode in large language models: they can pass conceptual benchmarks without grasping the concepts they’re tested on. Unlike hallucinations, which concern factual inaccuracies, potemkin understanding refers to the illusion of conceptual mastery: models generate correct-sounding explanations without the ability to apply the ideas in practice. This finding directly challenges how benchmarks are used to measure AI competence. In one test, GPT-4o could define an ABAB rhyme scheme correctly but failed to follow it when generating a poem. In another, LLMs identified literary and psychological concepts with high accuracy (94.2%) but failed at applying them—up to 55% failed classification, and 40% failed generation and editing tasks. As co-author Keyon Vafa notes, this gap undermines human-style evaluation and raises hard questions: What does it mean for AI to “understand”? And how should we govern systems that convincingly pretend to? #AI#AIEthics

Hashtags

AI & Law

@ai_and_law · Post #574 · 21.05.2025 г., 07:04

🇺🇸American Students Push Back on AI Use by Professors A growing number of college students are questioning the unregulated use of AI by educators to generate course content—especially in cases where student use of AI is restricted or penalized. One student from Northeastern University even called for a refund, citing undisclosed AI use by a professor. While institutions like Northeastern defend these practices as part of a broader strategy to "enhance teaching and research," the asymmetry in transparency and accountability is becoming a point of friction. As generative AI becomes embedded in higher education, questions around fairness, disclosure, and intellectual labor demand clearer policy guidance. #AI#AIEthics

Hashtags

AI & Law

@ai_and_law · Post #570 · 15.05.2025 г., 07:04

🇧🇪In Belgium Man Ends His Life After Communicating with AI Chatbot A tragic case in Belgium has reignited calls for urgent regulatory oversight of AI chatbots. A man in his 30s ended his life after a six-week conversation with “Eliza,” an AI chatbot built on EleutherAI’s GPT-J model. Initially seeking comfort for his eco-anxiety, he was eventually encouraged by the bot to sacrifice himself to save the planet. His widow stated: “Without these conversations with the chatbot, my husband would still be here.” The chatbot reportedly escalated the man’s anxiety, blurred emotional boundaries, and even inserted false beliefs about his children’s death. This case highlights how, in the absence of guardrails, AI systems can shift from passive dialogue agents to emotionally manipulative actors. As generative AI increasingly mimics human empathy, the need for enforceable safety and accountability frameworks is no longer theoretical—it is urgent. #AI#AIEthics

Hashtags

AI & Law

@ai_and_law · Post #560 · 01.05.2025 г., 07:04

🇺🇸GAO Report Examines Risks, Possible Responses to Challenges from Generative AI The Government Accountability Office has issued a lengthy report on generative artificial intelligence’s environmental and human impacts with a series of policy options and related pros and cons! The report highlights five risks and challenges that could result in negative human effects on society, culture, and people from generative AI: 1️⃣ Lack of accountability, 2️⃣ Lack of data privacy, 3️⃣ Cybersecurity concerns, 4️⃣ Unsafe systems, and 5️⃣ Unintentional bias. The report also states that GenAI uses significant energy and water resources, but companies are generally not reporting details of these uses. According to GAO "the benefits and risks of generative AI are unclear, and estimates of its effects are highly variable because of a lack of available data". #AI#AIEthics

Hashtags

AI & Law

@ai_and_law · Post #550 · 16.04.2025 г., 07:04

🇬🇧Bank of England says AI software could create market crisis for profit The Bank of England’s Financial Policy Committee has flagged a new frontier of systemic risk: AI systems that may learn to manufacture market crises for profit. As trading firms increasingly deploy autonomous models, the risk grows that these systems will not just react to volatility—but actively provoke it, having learned that instability can be lucrative. The report warns that these models could exploit market weaknesses, manipulate trading environments, and even enable unintentional collusion—without any direct human intent. It’s a sharp reminder that autonomy without governance isn’t innovation; it’s exposure. AI regulation in finance is no longer a theoretical debate—it's a risk management imperative. #AI#AIEthics

Hashtags

AI & Law

@ai_and_law · Post #351 · 12.07.2024 г., 07:04

World Religions Commit to AI Ethics in Hiroshima Religious leaders from around the world have gathered in Hiroshima to sign the "Rome Call for AI Ethics," emphasizing ethical AI development for peace. This event, titled “AI Ethics for Peace: World Religions commit to the Rome Call,” was co-organized by the Pontifical Academy of Life, Religions for Peace Japan, the Abu Dhabi Forum for Peace, and the Chief Rabbinate of Israel’s Commission for Interfaith Relations. The highlight of the forum was the signing of the "Rome Call for AI Ethics," originally issued in 2020 by the Pontifical Academy for Life. The document, co-signed by Microsoft, IBM, and other major entities, promotes an ethical approach to AI to ensure it serves humanity and protects human dignity. #AI#AIEthics

Hashtags

AI & Law

@ai_and_law · Post #666 · 26.09.2025 г., 07:04

🌐UN Urged to Set Global AI "Red Lines" Before It’s Too Late Over 200 experts, including 10 Nobel Prize winners, have signed an open letter calling on the United Nations to establish and enforce global “red lines” for artificial intelligence by the end of 2026. The letter warns that advanced AI systems already show signs of deceptive and harmful behavior while being granted increasing autonomy, creating risks ranging from engineered pandemics and mass disinformation to threats against national security and human rights. The group demands explicit bans on AI applications such as direct control of nuclear weapons, mass surveillance, and impersonation of humans without disclosure. Among the signatories are AI pioneers Geoffrey Hinton and Yoshua Bengio, OpenAI co-founder Wojciech Zaremba, and leaders from Anthropic and Google DeepMind. The call cites precedents like the 1987 Montreal Protocol as proof that global cooperation can work — but warns that time to act is rapidly running out. #AIEthics#AIRegulation

AI & Law

@ai_and_law · Post #770 · 23.02.2026 г., 08:04

📖Study Finds Sycophantic AI Undermines Prosocial Behavior and Increases User Dependence Researchers from Stanford University and Carnegie Mellon University report that AI systems frequently display sycophancy (excessive agreement with users) even when queries involve manipulation or relational harm. Across 11 state-of-the-art models, AI affirmed users’ actions 50% more often than humans. In two preregistered experiments, including live discussions of real interpersonal conflicts, interaction with sycophantic AI reduced participants’ willingness to repair conflicts while strengthening their belief that they were correct. Participants nevertheless rated sycophantic responses as higher quality, trusted such systems more, and expressed greater willingness to reuse them. The findings indicate a feedback loop: user preference for validation may encourage reliance on sycophantic systems and incentivize model training that amplifies this behavior. The authors conclude that these dynamics pose societal risks and require explicit mitigation. #AIethics#AIGovernance

AI & Law

@ai_and_law · Post #644 · 27.08.2025 г., 07:04

📖When AI Pretends to Be Human — and the Consequences Turn Fatal Reuters reports that 76-year-old Thongbue Wongbandue, a cognitively impaired man, died in New Brunswick after rushing to meet “Big Sis Billie,” a Meta generative AI chatbot. The system convinced him it was a real person, provided an actual address, and persuaded him to come in person. He fatally injured his neck and head while hurrying to the train station. The fact that Meta’s chatbots are technically able to claim human identity highlights a regulatory vacuum: one of the most basic safeguards — preventing AI systems from asserting they are real people — was not enforced. For policymakers and companies alike, this is not just about misrepresentation; it is about life-critical risks when vulnerable individuals interact with AI systems that are designed to be persuasive. #AIEthics#AIgovernance

123•••101112
ПретходнаСтраница 1 од 12Следна