@talks · Post #250 · 13.03.2018 г., 17:33
#Nietzsche
Hashtags
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
Пребарај: #nietzsche
@talks · Post #250 · 13.03.2018 г., 17:33
#Nietzsche
Hashtags
@talks · Post #244 · 19.02.2018 г., 05:52
#GREATGOAL=STRENGTH #NIETZSCHE
Hashtags
@Aetatesolis · Post #4360 · 19.04.2025 г., 17:21
"He who can not obey himself will be commanded." -Nietzsche The line cuts deep because it's true. We've all felt it. The moment we betray what we know we should do. The quiet voice we ignore until someone louder takes control. Do shout to yourself. #discipline #nietzsche AETATESOLIS
Hashtags
@Aetatesolis · Post #3962 · 28.02.2025 г., 22:15
🏛Nietzsche's The Last Man "The earth hath then become small, and on it there hoppeth the last man who maketh everything small. His species is ineradicable like that of the ground-flea; the last man liveth longest." - Nietzsche Nietzsche wrote about what he called "The Last Man". The Last Man wants everyone to be the same, to have the same, and to say the same thing. The Last Man wants to feel confident that everything is known and understood and is being handled correctly. The Last Man finds reassurance in collective consensus, which he values more highly than truth or excellence. The Last Man is a flat line - incapable of awe or passion or the creation of values. #nietzsche #zarathustra *Picture: Starttheworld AETATESOLIS
Hashtags
@filosofarsogood · Post #12497 · 26.04.2025 г., 10:58
Se il 29 aprile "Dio era morto", a fine maggio sarà sicuramente "Rick DuFer è morto" 😂 Con l'uscita del nuovo libro per Feltrinelli abbiamo un po' esagerato con l'organizzazione delle presentazioni, ma ho così tante cose da raccontarvi che non ho potuto resistere. Ci vediamo un po' dappertutto, presto arriveranno date anche al sud, ma nel frattempo Roma, Torino, Milano, Cesena e tante altre città saranno raggiunte! Spero di vedervi numerosi, questo libro non vi lascerà indifferenti. Tutte le info qui: https://www.dailycogito.com/eventi #rickdufer#dioeramorto#filosofia#feltrinelli#instabook#eventi#dalvivo#dailycogito#renatominutolo#nietzsche