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

Резултати

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

Пребарај: #democratization

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

@CryptoM · Post #65110 · 11.04.2026 г., 02:24

🚀 AI TRENDS | OpenAI's Sam Altman Addresses AI Development Concerns and Recent Incident OpenAI founder Sam Altman has expressed understanding of societal fears regarding the rapid development of artificial intelligence. According to Odaily, Altman acknowledged that the current period is marked by significant technological change, with associated risks escalating to systemic challenges at the societal level. He emphasized that AI power should not be concentrated in a few institutions and advocated for broader distribution through technological democratization and institutional constraints. Addressing a recent incident where his residence was targeted with a Molotov cocktail, Altman admitted to underestimating the impact of public narratives and emotions amid AI-related anxieties. He also acknowledged mistakes in company governance and conflict management, offering apologies for past actions. Furthermore, Altman reiterated his decision to reject Elon Musk's attempts to control OpenAI, ensuring the company's independent development. Previously, it was reported that the OpenAI founder's residence was attacked with a Molotov cocktail. #AI#OpenAI#SamAltman#AIdevelopment#technologicalchange#AIsociety#democratization#institutionalconstraints#Molotovcocktail#publicnarratives#conflictmanagement#ElonMusk#companygovernance#independence

Venture Village Wall 🦄

@venturevillagewall · Post #3649 · 21.12.2024 г., 10:24

Decart Secures $32M Funding Round Decart raises $32M in a funding round on December 19, 2024. The company aims to democratize consumer AI with innovative solutions. Backed by Sequoia Capital and Zeev Ventures, Decart enhances GPU efficiency for AI model training, making advanced AI tools more accessible. It disrupts gaming and entertainment by enabling immersive experience creation from text prompts. Learn more #Decart#Funding#AI#GPU#Gaming#Entertainment#SequoiaCapital#ZeevVentures#ConsumerAI#TextToExperience#Innovation#Platform #2024 #Revolutionary#Technology#Access#Development#Efficiency#Democratization#Tools#Industry