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

Резултати

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

Пребарај: #aigenerated

当前筛选 #aigenerated清除筛选
Custom Emoji Packs

@CustomEmojiPacks · Post #879 · 09.06.2025 г., 22:20

We've brought back the ❤️ reaction and removed the 💫 option. We originally added the star just for fun, but it started to feel unfair - it was appearing on messages that included packs from other people. Even though the donations it generated were minimal and insignificant to us, I still felt bad about it. Anyway, I want to clarify what's been happening with this channel lately. 📰 A few months ago, Telegram placed restrictions on my account for no apparent reason - I wasn't allowed to post in public groups due to some "illegal content". It took me a while to realize that our community group had disappeared too. I'll admit it, our moderation wasn't the best, but we tried to block and remove spam, crypto scams, and anything related to drugs, porn etc, but in the end, our group ended up being deleted. I reached out to some Telegram volunteers, and after a few weeks I was unbanned. They told me I should’ve enabled the new aggressive anti-spam feature, so if you manage a large community, I strongly recommend turning it on. That way, a few troublemakers won’t end up causing problems for everyone. 🚨 That said, technology is evolving at an exponential rate, and with the arrival of AI generated emojis, we also want to evolve this channel into something new. Right now, you can generate an emoji on iOS or certain websites in just a few seconds, which takes away the magic of designing a set from scratch with vector graphics and countless cups of coffee. We still believe in the secret art of emoji creation, but it's fading faster and faster. That's why we're adding the ability to direct message us using the latest Telegram feature, so that you can share your packs, tell us your story and promote your own work - and request collaborations, too. We’ll review each submission, allowing you, in a way, to give us direct post suggestions, resulting in more frequent posts and better management, without the risk of creating another group just to get banned again. We have more ideas for oh how to evolve this community, but we also want to hear yours. At this point, we think the channel needs a new #aigenerated hashtag for emoji packs made with AI tools like ChatGPT or websites such as emojis.com - one of the most advanced AI emoji generators right now (not sponsored, by the way). So, keep creating incredible art in every form. Use AI to push the boundaries of what the human mind can do, without replacing it. Find the right balance, blending AI-generated ideas with your own artistic vision and creativity. That, I believe, must be the right way to create and communicate without getting replaced by technology in future generations. 🚀

Hashtags

12
ПретходнаСтраница 1 од 2Следна