@googlefactss · Post #39892 · 30.09.2025 г., 03:09
In January 2013 an erotic film was mistakenly aired for several minutes in the background during a national TV news report in Sweden. @googlefactss#bizarre
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #191 · 14 дек.
Как разделить строку с shell-командой на отдельные аргументы в виде списка? Если сделать просто сплит по пробелу то получим то что надо, кроме случаев со вставками текста с пробелами. Например так: >>> '-arg "I Am Groot"'.split(' ') ['-arg', '"I', 'Am', 'Groot"'] Чтобы учитывать текст в кавычках как единый аргумент можно воспользоваться функцией shlex.split() Кто читает мой канал давно, уже в курсе. А что делать, если нужно обратное действие? Объединить аргументы из списка в строку и при этом добавить кавычки в аргумент с пробелами. Конечно, если вы используете subprocess то он сам всё разрулит. Но если вам нужна именно команда одной строкой, то можно воспользоваться готовой функцией в том же subprocess. >>> from subprocess import list2cmdline >>> list2cmdline(['-arg', 'I Am Groot']) '-arg "I Am Groot"' Он также позаботится об экранировании уже имеющихся кавычек >>> list2cmdline(['-arg', 'I Am "Groot"']) '-arg "I Am \"Groot\""' А вот так он может "схлопнуть" в команду JSON >>> list2cmdline(['--json', json.dumps({'key': 'value'})]) '--json "{\"key\": \"value\"}"' _______________ Возможно кто-то спросит, а зачем соединять аргументы в строку если subprocess сам это сделает а os.system не наш путь? Мне как-то потребовалось отправлять команду на удалённое выполнение и в API поддерживалось указание команды только строкой. Так что всякое бывает) #libs#basic
Пребарај: #bizarre
@googlefactss · Post #39892 · 30.09.2025 г., 03:09
In January 2013 an erotic film was mistakenly aired for several minutes in the background during a national TV news report in Sweden. @googlefactss#bizarre
Hashtags
@AiGenLabsStyles · Post #706 · 07.09.2024 г., 07:12
⭐️ --sref 1964343293 --s 250 #Photography#Surreal#Vibrant#Bizarre#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 👥TheLab - our community 🔥AiGenLabs - main channel
@AiGenLabsStyles · Post #726 · 10.09.2024 г., 09:14
⭐️ --sref 3414219761 #illustration#Bizarre#Dark#2d#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 👥TheLab - our community 🔥AiGenLabs - main channel
@googlefactss · Post #40837 · 21.03.2026 г., 05:57
There's an animal that smells like buttered popcorn. The binturong (Arctictis binturong), a Southeast Asian "bearcat," smells like buttered popcorn due to 2-acetyl-1-pyrroline (2-AP) in its urine, which it uses to mark territory. This chemical is the same aromatic compound produced when popcorn is popped. These arboreal, cat-like mammals are threatened by habitat loss. @googlefactss#animals#mammals#bizarre [read more....]
@AiGenLabsStyles · Post #815 · 27.09.2024 г., 13:28
⭐️ --sref 905263956 #illustration#2d#Dark#Bizarre#Cartoon#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 👥TheLab - our community 🔥AiGenLabs - main channel
@AiGenLabsStyles · Post #689 · 05.09.2024 г., 13:18
⭐️ --sref 2627355792 #illustration#2D#Vibrant#Bizarre#Cartoon#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 👥TheLab - our community 🔥AiGenLabs - main channel
@AiGenLabsStyles · Post #660 · 03.09.2024 г., 09:14
⭐️ --sref 3846026342 #illustration#Bizarre#Pastel#2d#Surreal#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 👥TheLab - our community 🔥AiGenLabs - main channel
@AiGenLabsStyles · Post #763 · 16.09.2024 г., 08:13
⭐️ --sref 4136665817 #illustration#2d#Cartoon#Vibrant#Dark#Bizarre#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 👥TheLab - our community 🔥AiGenLabs - main channel
@AiGenLabsStyles · Post #738 · 11.09.2024 г., 13:18
⭐️ --sref 2353362577 --s 888 #Cinematic#Surreal#Vibrant#Bizarre#Dark#Fantasy#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 👥TheLab - our community 🔥AiGenLabs - main channel
@AiGenLabsStyles · Post #676 · 04.09.2024 г., 13:18
🔝🔝 --sref 72314753 #illustration#3D#Vibrant#LowPoly#Bizarre#Cartoon#StyleRandom#MidJourney#AiGenLabs#Ai 〰️〰️〰️〰️〰️ 👥TheLab - our community 🔥AiGenLabs - main channel