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

Резултати

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

Пребарај: #tradesecrets

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

@ai_and_law · Post #259 · 12.03.2024 г., 08:04

Former Google Employee Charged with Stealing AI Trade Secrets Greetings everyone! Linwei Ding, a former Google employee, has been charged with stealing confidential AI trade secrets. He allegedly uploaded over 500 documents to his personal Google Drive account and shared them with Chinese companies. Ding is accused of leveraging stolen data to secure employment with Chinese AI firms and launch his own startup. The case underscores the importance of safeguarding sensitive technology from unauthorized access and theft. #AI#TradeSecrets

Торговый переговорщик

@tradenegotiator · Post #150 · 17.01.2023 г., 12:54

Технологическое противостояние США и Китая продолжается Джо Байден подписал закон о защите американской интеллектуальной собственности (Protecting American Intellectual Property Act of 2022), который требует предоставления периодических отчетов Конгрессу с указанием любых иностранных лиц, уличенных в краже американской коммерческой тайны (trade secrets). В отношении таких иностранных лиц закон предусматривает введение санкций на основе «меню», в котором помимо прочего есть опция введения блокирующих санкций. В законе нет отсылок к каким-то конкретным странам, но заявление для прессы сенатора Криса Ван Холлена, спонсора Закона, ясно указывает на то, что Китай является основной мишенью новых мер. #ИИ#законСША#Китай#санкции#tradesecrets

AI & Law

@ai_and_law · Post #783 · 12.03.2026 г., 07:04

🇺🇸Court Allows Enforcement of California AI Training Data Disclosure Law A US federal court has denied a request by Elon Musk’s AI company xAI to block enforcement of California Assembly Bill 2013. The law requires AI developers whose models are accessible in California to publicly disclose key information about training datasets, including dataset sources, collection timelines, whether collection is ongoing, and whether datasets contain copyrighted, trademarked, patented, or personal data. Companies must also indicate whether training data was licensed or purchased and the extent of synthetic data used. xAI argued the law would force disclosure of trade secrets, including dataset sources, dataset sizes, and data-cleaning methods. According to the company, such transparency could allow competitors to infer what datasets it uses and replicate its approach. The company warned that compliance could be “economically devastating” and reduce the value of its proprietary data practices. However, US District Judge Jesus Bernal ruled that xAI failed to demonstrate that the law requires disclosure of protected trade secrets. The court found the company’s claims too general and based largely on hypotheticals. The motion for a preliminary injunction was denied, allowing the law—which took effect in January—to remain in force while the lawsuit continues. #AIRegulation#AITransparency#TrainingData#TradeSecrets#AIAct#AIGovernance#TechLaw