@TestFlightX · Post #34125 · 23.09.2024 г., 18:24
#FLIP#FLASHCARDS https://testflight.apple.com/join/J2B2WMZY
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
Пребарај: #flashcards
@TestFlightX · Post #34125 · 23.09.2024 г., 18:24
#FLIP#FLASHCARDS https://testflight.apple.com/join/J2B2WMZY
Hashtags
@testflightynoti · Post #37537 · 03.05.2026 г., 21:56
#Cruxly#AI#Quiz#amp#Flashcards Join the Cruxly AI - Quiz & Flashcards beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/muAr9ASt Shared by Dimitri
@githubtrending · Post #14651 · 01.05.2025 г., 11:30
#python#agplv3#education#flashcards#foreign_language#hacktoberfest#hacktoberfest2022#language_learning#python#second_language_acquisition#spaced_repetition#svelte LibreLingo is a free, community-driven language-learning platform offering courses like Spanish, German, and French through interactive exercises, spaced repetition, and progress tracking across devices, while allowing users to contribute and modify content for a collaborative learning experience[1][4][5]. https://github.com/kantord/LibreLingo
@githubtrending · Post #15549 · 08.03.2026 г., 12:00
#python#ai_automation#api#audio_overview#claude#cli_tool#flashcards#google_notebooklm#notebooklm#notebooklm_api#notebookln#podcast_generator#python#python_api#quiz_generator#sdk#skills#study_tools notebooklm-py is a free Python tool and CLI for full access to Google NotebookLM's features, like creating notebooks, adding sources (URLs, PDFs, YouTube), chatting, deep research, and generating podcasts, videos, quizzes, slides, mind maps in formats like MP3, MP4, JSON. It offers extras the web lacks, such as batch downloads, editable PPTX, and mind map data. You benefit by automating research, content creation, and exports programmatically for faster prototypes, pipelines, or AI agents—saving time on manual UI work. https://github.com/teng-lin/notebooklm-py