@googlefactss · Post #40935 · 15.04.2026 г., 16:32
Emoji” is derived from three Japanese words: “e” for picture, “mo” for write, “ji” for character. @googlefactss#funfact
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
Пребарај: #funfact
@googlefactss · Post #40935 · 15.04.2026 г., 16:32
Emoji” is derived from three Japanese words: “e” for picture, “mo” for write, “ji” for character. @googlefactss#funfact
Hashtags
@googlefactss · Post #39971 · 29.10.2025 г., 06:07
More than 2,000 years ago Persians used yakhchals — ancient desert "refrigerators" — to make sorbet-like desserts and store ice. [read more here] @googlefactss#funfact
Hashtags
@googlefactss · Post #39955 · 27.10.2025 г., 07:15
The word “canvas” is related to the word “cannabis.” Historically, canvases were made of hemp. @googlefactss#funfact
Hashtags
@googlefactss · Post #39950 · 26.10.2025 г., 05:39
Getting dumped often leads to “frustration attraction,” which causes an individual to love the one who dumped him or her even more. @googlefactss#funfact
Hashtags
@googlefactss · Post #39947 · 25.10.2025 г., 11:09
Human mucophagy (literally "mucus feeding") is the act of eating one's own "boogers." @googlefactss#funfact
Hashtags
@googlefactss · Post #39937 · 20.10.2025 г., 17:17
Cats don’t have sweat glands over their bodies like humans do. Instead, they sweat only through their paws. @googlefactss#funfact
Hashtags
@googlefactss · Post #39936 · 19.10.2025 г., 15:24
The word "work" is from the Proto-Indo-European word *werg, meaning "to do." @googlefactss#funfact
Hashtags
@googlefactss · Post #39935 · 18.10.2025 г., 11:41
The Greek name for the mosquito is "anopheles," which means “good for nothing @googlefactss#funfact
Hashtags
@googlefactss · Post #39934 · 18.10.2025 г., 10:14
The chess term “checkmate” is from a 14th-century Persian phrase, “shah mat," meaning “the king is helpless. @googlefactss#funfact
Hashtags
@googlefactss · Post #39932 · 17.10.2025 г., 19:29
Each leopard's spot pattern is unique, like a human fingerprint, allowing individual leopards to be identified. @googlefactss#funfact
Hashtags
@googlefactss · Post #39931 · 16.10.2025 г., 07:46
A pangram is a sentence that contains every letter in the language. For example, "The quick brown fox jumps over the lazy dog." @googlefactss#funfact
Hashtags
@googlefactss · Post #39930 · 16.10.2025 г., 07:11
If you wrote out all the numbers (e.g. one, two, three . . . ), you would not use the letter "b" until the word "billion." @googlefactss#funfact
Hashtags