TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

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

Hashtags

Резултати

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

Пребарај: #captions

当前筛选 #captions清除筛选
#️⃣Hashtag | Rasmiy kanal

@HashtagUz · Post #13787 · 14.03.2025 г., 03:28

⚠️ Blogerlar uchun YANGILIK: Captions kompaniyasi yangi Mirage texnologiyasini taqdim etdi. Neyron tarmoq noldan odamlarni yaratadi va ovozni video formatiga maksimal aniq oʻgiradi. 😱 Bu haqiqiy inqilob! Boshqa modellar faqat lablarni harakatlantirsa, Mirage hammasini qiladi: ✅ Tana modelini yaratadi ✅ Haqiqiydan ajratib bo'lmaydigan harakatlar ✅ Fon ✅ Tabiiy mimika ➡️https://www.captions.ai/mirage ➡️#ai#captions | Birinchi raqamli IT-Blog

Hashtags

☀️Beck’s☀️

@beck_blog · Post #998 · 02.01.2021 г., 23:00

· · • • • •❄️• · · INSTAGRAM · · •❄️• • • • · · Escribir captions en Instagram es un arte y es una excelente manera de impulsar el compromiso por parte de tu comunidad. Tus descripciones son representaciones de tu marca. Y podrían ser la última pieza que necesitas mejorar para pasar de un feed bueno a uno profesional. De hecho, escribir captions en Instagram podría ser la clave para que tu publicación gane visibilidad. Así que lee estos Tips para escribir captions en Instagram y luego me cuentas que te parecen 😉. #tips_instagram #captions · · • • • • • · · · · • • • ☃️• • • · · · · • • • • • · ·

☀️Beck’s☀️

@beck_blog · Post #2025 · 20.05.2021 г., 20:05

· · • • • •🌼• · · INSTAGRAM · · •🌼• • • • · · Uno de los beneficios de los posts en Instagram es que puedes cargar fotografías, diseños, videos e incluso galerías de hasta 10 imágenes juntas. En este caso la clave es que lo que sea que uses como portada sea lo suficientemente atractivo para que los usuarios se detengan a leer tu caption. #tips_instagram #captions#consejos · · • • • • • · · · · • • • 🍃• • • · · · · • • • • • · ·

GitHub Trends

@githubtrending · Post #14817 · 11.06.2025 г., 11:30

#python#asr#captions#cli#python#subtitle#subtitles#transcript#transcripts#translating_transcripts#youtube#youtube_api#youtube_asr#youtube_captions#youtube_subtitles#youtube_transcript#youtube_transcripts#youtube_video The YouTube Transcript API is a tool that helps you get the text from YouTube videos. It's fast and easy to use, saving you time compared to watching the whole video. You can use it to make subtitles, translate text, and even analyze what's being said in videos. This is helpful for content creators who want to make their videos more accessible and for researchers who need to study video content quickly. It also supports multiple languages, making it useful for a wide range of users. https://github.com/jdepoix/youtube-transcript-api

☀️Beck’s☀️

@beck_blog · Post #2742 · 22.09.2021 г., 13:13

┏━━━━━°❀•°:🍂 - 🍂:°•❀°━━━━━┓ POR AQUÍ PUEDE NAVEGAR POR EL CANAL 📁|#inicio 📝|#tips_instagram 📸|#tips_fotografía 📲|#instagram_Stories ⚙️|#estadísticas_instagram #️⃣|#hashtags 📱|#feed 📋|#captions 💡|#ideas 📷|#fotos 🏷|#peticiones ✨|#especial 📖|#recomendación 🧖🏻‍♀️|#cuidado_personal 💭|#consejos 🔎|#remedios 🧼|#limpieza 🖼|#fondos 🤯|#curiosidades 📒|#idiomas 🧁|#receta ☕️|#café 🎉|#festivos 🎃|#halloween 🎄|#navidad 👫🏻|#SanValentin 🍁|══════◄••❀••►══════|🍁 ➳ Recuerde que puede escribirme a ⇢ @SoyBeck_bot Para enviarme sugerencias, dudas, aportes o alguna petición especial que deseen ☺️ ┗━━━━━°❀•°:🍂 - 🍂:°•❀°━━━━━┛