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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #201 · 13 јан.

Мы уже знаем, что на текущую сессию интерпретатора изменение PYTHONPATH никак не повлияет. Но если вы запустите дочерний процесс, то он унаследует окружение текущего процесса, а значит и изменения в любых переменных будут на него влиять. Вот небольшой пример: Объявляем переменную user@host:~$ export PYTHONPATH=/path1 Запускаем интерпретатор user@host:~$ python3 Проверим что в sys.path >>> import sys >>> print(sys.path) ['', '/path1', '/usr/lib/...', ...] Добавляем что-то в переменную >>> import os >>> os.emviron['PYTHONPATH'] = '/path1:/path2' >>> print(sys.path) ['', '/path1', '/usr/lib/...', ...] Изменений нет. Но давайте запустим дочерний процесс и посмотрим там >>> os.system('python3') # теперь мы находимся в другом процессе >>> import sys >>> print(sys.path) ['', '/path1', '/path2', '/usr/lib/...', ...] Тоже самое будет и с subprocess, так как по умолчанию текущее окружение тоже наследуется. >>> import subprocess >>> subprocess.call(['python3', '-c', 'import sys;print(sys.path)']) ['', '/path1', '/path2', '/usr/lib/...', ...] ______________________ Лучшей практикой является передача энвайронмента явно через аргумент env! import subprocess subprocess.call(cmd, env={'PYTHONPATH': '...'}) Это поможет точно понимать какое окружение будет у запускаемого процесса и при этом не изменять окружение текущего процесса. #basic

Hashtags

Резултати

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

Пребарај: #technologypolicy

当前筛选 #technologypolicy清除筛选
Crypto M - Crypto News

@CryptoM · Post #64863 · 10.04.2026 г., 05:15

🚀 Elon Musk's xAI Challenges Colorado's AI Regulations in Court Elon Musk's artificial intelligence company, xAI, has initiated legal proceedings against the state of Colorado, aiming to prevent the enforcement of new AI regulations that limit speech from AI chatbots like Grok. According to Cointelegraph, the lawsuit targets Colorado's Senate Bill 24-205, which is designed to safeguard AI users from 'algorithmic discrimination' in sectors such as employment, housing, and finance. In a recent filing to a U.S. district court in Colorado, xAI contended that the state cannot modify the company's message merely to promote its own perspectives on contentious issues like fairness and equity. The company further argued that the legislation, scheduled to be implemented on June 30, is paradoxical as it advocates 'differential treatment' to enhance diversity or address historical discrimination. xAI emphasized that altering Grok would disrupt its objective of being 'maximally truth seeking.' This is not the first instance of xAI challenging state-level AI regulations. In December, the company filed a lawsuit against California concerning its Generative AI Training Data Transparency Act, asserting that the act's disclosure requirements infringe upon the First and Fifth Amendments by compelling speech and exposing trade secrets. Both the Colorado and California laws emerged following allegations that Grok had previously made racist, sexist, and antisemitic remarks. David Sacks, appointed as co-chair of the President's Council of Advisors on Science and Technology, has advocated for federal oversight of AI regulations, arguing against a fragmented approach by individual states. Sacks highlighted the complexity faced by innovators due to the diverse regulatory frameworks across 50 states, emphasizing the need for a unified federal standard. His appointment aims to address these regulatory challenges and streamline AI governance at the national level. #ElonMusk#xAI#AIregulations#Colorado#lawsuit#Grok#ArtificialIntelligence#algorithmicdiscrimination#GenerativeAI#California#FirstAmendment#FifthAmendment#AIgovernance#federaloversight#technologypolicy