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

Резултати

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

Пребарај: #fastfood

当前筛选 #fastfood清除筛选
Dishes.Cooking.Food

@cookingdish · Post #940 · 01.09.2025 г., 13:05

Burger! 🍔🤤 Ingredients: For Burger: * Ground beef * Salt/Pepper to taste * Lettuce * Onion * Vinegar * Hamburger buns * American cheese For the Sauce: * Ketchup * Mayonnaise * Mustard * Pickle For Potatoes: * Potato * Garlic powder * Salt/Pepper * Paprika * Olive oil #fastfood @dishes

Hashtags

Dishes.Cooking.Food

@cookingdish · Post #937 · 29.08.2025 г., 13:04

Vegetarian Burger! 🍔🤩 Ingredients: For Burger: * Pumpkin Hummus * Spinach * Tomato * Avocado * Red onions * Aioli For the Cutlet: * 90 g. Soy granules * 4 Beets * 100 g. Flour * 150 g. Oats * 1 tbsp Smoked paprika spice * 2 tsp Salt * 2 tsp Cumin * 1 tsp Pepper * 1 tsp Thyme * 1 tsp Rosemary #fastfood @dishes

Hashtags

Dishes.Cooking.Food

@cookingdish · Post #918 · 11.08.2025 г., 13:05

Filet Mignon with Mushroom Sauce 1️⃣Filet Mignon 🧂 Pinch of Salt 🫒 2 Tbs Olive Oil 🧈 2 Tablespoons Unsalted Butter 🧄 2 Cloves Garlic 🌿 1 Sprig fresh Rosemary 🌿 2 Sprigs fresh Thyme 🥦Asparagus 🍄For Mushroom Sauce: 🫒 Olive oil 🧈 2 Tbsp Butter 🍄 100g Shiitake Mushrooms 🧅 1 Shallot Onion 🥃 1/4 cup Bourbon 🥛 1 cup Heavy Whipping Cream 🧂/🧑‍🍳 Salt/Pepper #fastfood @dishes

Hashtags

Dishes.Cooking.Food

@cookingdish · Post #916 · 09.08.2025 г., 11:04

Pan-Fried Branzino with Anchovy Butter ◇ Ingredients: - 🐟 1 Whole Branzino, filleted into 2 halves - 🐟 Anchovies, finely chopped - 🌿 Fresh Parsley, chopped - 🧈 Butter - 🫒 Olive Oil - 🧵 Kitchen Twine - 🥄 Fresh Asparagus - 🍋 Lemon juice #fastfood @dishes

Hashtags

Dishes.Cooking.Food

@cookingdish · Post #915 · 08.08.2025 г., 13:03

Gnocchi ◇ Ingredients: 🥔 1 kg russet potatoes 🍚 2 cups all-purpose flour, plus extra for dusting 🥚 2 egg yolks 🧄 Garlic For sage butter sauce: 🧈 100g unsalted butter 🌿 10-12 fresh sage leaves 🧂 Salt and freshly ground black pepper, to taste 🧀 Grated Parmesan cheese, for garnish #fastfood @dishes

Hashtags

Dishes.Cooking.Food

@cookingdish · Post #913 · 05.08.2025 г., 11:01

Mushroom Ravioli For the Pasta Dough: 🍝 200g. Semolina 🍝 200g. 00 Flour 🥚 5 large eggs For the Filling: 🧀 200g. ricotta cheese 🍄 400g. finely chopped mushrooms 🧅 1/2 large yellow onion, minced 🧀 2 Tbsp grated Parmesan cheese 🌿 1 Tbsp chopped fresh parsley 🧂 Salt and pepper, to taste 🧈 Butter #fastfood @dishes

Hashtags

Dishes.Cooking.Food

@cookingdish · Post #894 · 16.07.2025 г., 12:38

Big Mac Tacos! 🌮🌮🌮 Ingredients: * Mini wraps * Minced * Salt/Pepper * Pickles * Cheddar * Cabbage * Red onion Sauce: * 2 tbsp Mayo * 1 tbsp Ketchup * 1 Pickle * 1 tsp Yellow mustard * 1/2 tsp Paprika * 1/2 tsp Garlic powder * 1/2 tsp Pepper * 1/2 tsp Onion powder #fastfood @dishes

Hashtags

Dishes.Cooking.Food

@cookingdish · Post #886 · 07.07.2025 г., 21:23

🇬🇧Ingredients for Caesar Salad Tacos 🌿For the Herb Butter: - 🌿 1 handful of parsley - 🌶 1/2 tsp chili flakes - 🧄 1 clove of garlic - 🧈 100 g butter 🌿For the Tacos: - 🌮 4 small wraps - 🧀 Vegan sprinkle cheese - 🌱 4 Green Mountain vegan fillets - 🥬 1 romaine lettuce 🌿For the Salad Dressing: - 🌿 1 tbsp mustard - 🥛 110 g vegan mayo - 🍷 1 tbsp white wine vinegar - 🍋 2 tbsp lemon juice - 🛢 1 tbsp olive oil - 🧂 Salt and pepper to taste #fastfood @dishes

Hashtags

Dishes.Cooking.Food

@cookingdish · Post #878 · 30.06.2025 г., 11:02

Hummus Ingredients: 🥫 230 grams of dried chickpeas 🥄 1/2 tsp baking soda 🧂 1 tsp salt 🥄 180g tahini 🍋 Juice of half a lemon 🧄 2 garlic cloves 1 tsp cumin 🌿 🧂 Salt and pepper to taste 🧊 2-3 Tbsp Ice water Toppings: roasted garlic 🧄, smoked paprika 🌶, parsley 🌿, olive oil 🫒 #fastfood @dishes

Hashtags

Dishes.Cooking.Food

@cookingdish · Post #877 · 29.06.2025 г., 11:04

Fondant Potatoes Ingredients: 🥔 4 large russet potatoes 🫒 2 tablespoons olive oil 🧈 6 tablespoons unsalted butter 🧄 1 garlic head 🌿 6 sprigs fresh thyme 🍗 2 cups chicken broth 🍚 Caviar 🧂 Salt and freshly ground black pepper to taste #fastfood @dishes

Hashtags

Dishes.Cooking.Food

@cookingdish · Post #876 · 28.06.2025 г., 11:02

Fig & Triple Spread Toast Ingredients 🍞 Sourdough bread 🧀 Gorgonzola with Mascarpone 🍇 Raspberry jam 🌰 Pistachio paste Thyme #fastfood @dishes

Hashtags

Dishes.Cooking.Food

@cookingdish · Post #874 · 26.06.2025 г., 11:03

Seared Tuna with Mango Salsa🐟🥭 Ingredients - Tuna Steak 🐟 - Salt 🧂 - Oil 🫒 For the Mango Salsa - 1 ripe mango, diced 🥭 - 1/4 cup red onion, finely chopped 🧅 - 1/3 cup tomato, finely chopped 🍅 - 2 tbsp fresh cilantro, chopped 🌿 - Juice of 1/2 lemon or lime 🍋 - 1/4 cup Ponzu sauce 🍶 - Sesame seeds 🌱 #fastfood @dishes

Hashtags

123•••56
ПретходнаСтраница 1 од 6Следна