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

Резултати

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

Пребарај: #veganrecipe

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

@cookingdish · Post #574 · 08.11.2024 г., 15:02

Pink Pasta 🍝 Ingredients: - 300 g pasta 🍄Sauce: - 250 g cooked beetroot 🥗 - 100 g cashew nuts 🥜 - 50 ml water 💧 - 1 tbsp soy yogurt skyr 🥛 - 1 tsp oil 🫒 - 1 tsp agave syrup 🍯 - 1 tsp salt 🧂 - 1 tsp pepper 🌶️ - 1 tsp vegetable broth 🍲 Preparation: 1. 🥄 Soak the cashews in warm water for 10 minutes, then drain. Meanwhile, cook the pasta 🍲. 2. 🥢 Dice the beetroot and blend it with the other sauce ingredients until smooth. 3. 🍳 Crumble the tofu and sauté in oil, then add the beetroot and chickpeas. Fry until golden. 4. 🍝 Mix the pasta with the sauce, add your favorite toppings, and enjoy! #PinkPasta#VeganRecipe#HealthyEating @dishes

Dishes.Cooking.Food

@cookingdish · Post #570 · 04.11.2024 г., 14:57

Carrot Cake Bites 🥕🍰 Ingredients: - 135 g rolled oats 🌾 - 120 g walnuts 🌰 - 170 g dried dates 🌴 - 1 carrot 🥕 - Seeds from a vanilla bean 🌸 - 1 tbsp maple syrup 🍁 - 1 tsp cinnamon ✨ - Grated coconut 🥥 Preparation: 1. Soak the dates in warm water, then drain after 10 minutes 💧 2. Mix all ingredients in a high-speed blender until coarse 🌀 3. Shape the mixture into 30 g balls and roll in grated coconut 🍥 #HealthySnack#CarrotCakeBites#VeganRecipe @dishes

Dishes.Cooking.Food

@cookingdish · Post #787 · 28.03.2025 г., 14:04

High Protein Vegetable Patties 🥕 Ingredients: - 1 small carrot 🥕 - 1 medium potato 🥔 - 1/2 bell pepper 🌶 - 1 onion 🧅 - 50 g soy granules 🌱 - 50 g corn 🌽 - 50 ml water 💧 - 100 g flour 🌾 - 1 tbsp starch ✨ - Oil for frying 🍳 Preparation: 1️⃣ Grate the carrot & potato, dice the pepper & onion, and place in a bowl 🥣 2️⃣ Soak the soybean granules in water, then add to the bowl along with the remaining ingredients and mix well 👩‍🍳 3️⃣ Shape the dough into patties and sauté in a pan with a little oil until golden brown 🥘 Enjoy! 😋 #HighProtein#VegetablePatties#VeganRecipe#HealthyEating#PlantBased @dishes

Dishes.Cooking.Food

@cookingdish · Post #583 · 17.11.2024 г., 15:23

High Protein Vegetable Patties 🥕 Ingredients: - 1 small carrot 🥕 - 1 medium potato 🥔 - 1/2 bell pepper 🌶️ - 1 onion 🧅 - 50 g soy granules 🌱 - 50 g corn 🌽 - 50 ml water 💧 - 100 g flour 🌾 - 1 tbsp starch ✨ - Oil for frying 🍳 Preparation: 1️⃣ Grate the carrot & potato, dice the pepper & onion, and place in a bowl 🥣 2️⃣ Soak the soybean granules in water, then add to the bowl along with the remaining ingredients and mix well 👩‍🍳 3️⃣ Shape the dough into patties and sauté in a pan with a little oil until golden brown 🥘 Enjoy! 😋 #HighProtein#VegetablePatties#VeganRecipe#HealthyEating#PlantBased @dishes

Dishes.Cooking.Food

@cookingdish · Post #784 · 25.03.2025 г., 14:05

🌿Udon Noodle Bowl 🍜 Ingredients • 🫒 Oil for frying • 100 g smoked tofu 🧆 • 1/2 tsp chili 🌶 • 1/2 tsp thyme 🌱 • 1/2 tsp coriander 🌿 • 2 tbsp soy sauce 🍶 • 100 g mushrooms 🍄 • 2 cloves garlic 🧄 • 300 g udon noodles (pre-cooked) 🍜 Sauce: • 1 tbsp paprika paste 🌶 • 2 tbsp agave syrup 🍯 • 5 tbsp soy sauce 🍶 • 200 ml water 💧 • 1 tbsp starch 🌽 • 1 tbsp white sesame 🥢 Side dishes for the bowl: • 1 bok choy 🥬 • Red cabbage 🥬 • Cucumber 🥒 • Avocado 🥑 • Lime 🍈 • Spring onions 🧅 • Sesame seeds 🌱 • Paprika 🌶 Preparation: 1. 🔥 Fry the smoked tofu in oil, deglaze with soy sauce, season & set aside. 2. 🥄 Mix all the ingredients for the sauce together. 3. 🍄 Sear the mushrooms and garlic, deglaze with the sauce, and stir in the udon noodles. 4. 🍲 Fill the bowl with the udon noodles, tofu, and all the remaining ingredients. #VeganRecipe🌱#UdonNoodles🍜#HealthyEats💚#AsianCuisine🍲#PlantBased @dishes

Dishes.Cooking.Food

@cookingdish · Post #580 · 14.11.2024 г., 14:39

🌿Udon Noodle Bowl 🍜 Ingredients • 🫒 Oil for frying • 100 g smoked tofu 🧆 • 1/2 tsp chili 🌶️ • 1/2 tsp thyme 🌱 • 1/2 tsp coriander 🌿 • 2 tbsp soy sauce 🍶 • 100 g mushrooms 🍄 • 2 cloves garlic 🧄 • 300 g udon noodles (pre-cooked) 🍜 Sauce: • 1 tbsp paprika paste 🌶️ • 2 tbsp agave syrup 🍯 • 5 tbsp soy sauce 🍶 • 200 ml water 💧 • 1 tbsp starch 🌽 • 1 tbsp white sesame 🥢 Side dishes for the bowl: • 1 bok choy 🥬 • Red cabbage 🥬 • Cucumber 🥒 • Avocado 🥑 • Lime 🍈 • Spring onions 🧅 • Sesame seeds 🌱 • Paprika 🌶️ Preparation: 1. 🔥 Fry the smoked tofu in oil, deglaze with soy sauce, season & set aside. 2. 🥄 Mix all the ingredients for the sauce together. 3. 🍄 Sear the mushrooms and garlic, deglaze with the sauce, and stir in the udon noodles. 4. 🍲 Fill the bowl with the udon noodles, tofu, and all the remaining ingredients. #VeganRecipe🌱#UdonNoodles🍜#HealthyEats💚#AsianCuisine🍲#PlantBased @dishes

Dishes.Cooking.Food

@cookingdish · Post #568 · 02.11.2024 г., 14:24

🌾Oriental Mujaddara 🌾 🌾 Ingredients: 🍚 200g rice 🥫 1 can (300g) cooked brown lentils 🧴 Oil for frying 🧅 3 large white onions 🧅 2 red onions 🧂 Pinch of salt 🥄 150 ml vegetable stock powder 🌿 1 tsp cumin 🧂 Salt and pepper 🍃Yoghurt dip: 🥄 500g soy yogurt 🍋 Juice of half a lemon 🧂 1/2 tsp salt 🧄 2 cloves of garlic 🌿 1 bunch of chives 🌈Toppings: 🌿 Chives, 🍈 pomegranate seeds #OrientalMujaddara#MiddleEasternFlavors#VeganRecipe#PlantBased#ComfortFood @dishes

Dishes.Cooking.Food

@cookingdish · Post #567 · 01.11.2024 г., 15:22

🥬 Asparagus Crêpes 🥞 Ingredients: 🥒 1 bunch of green asparagus 🍋 1 lemon 🧈 200 g smoked tofu 🫒 Oil for frying Crepe Batter: 🌾 200 grams of flour 🌱 50 g lupine flour 🥛 300 ml almond drink 💧 200 ml water 🧂 1 tsp salt 🌟 1 tsp baking powder Hollandaise Sauce: 🧈 15 g margarine 🌾 15 g flour 🥛 150 ml almond drink 🍾 50 ml white wine 🌶️ 1 tsp hot mustard 🥜 1 pinch nutmeg 🧂 Salt & white pepper to taste ✨ Optional: 1 tbsp yeast flakes Toppings: 🌿 Chives, parsley #HealthyEats#AsparagusCrepes#PlantBased#VeganRecipe#Gourmet @dishes

Dishes.Cooking.Food

@cookingdish · Post #588 · 22.11.2024 г., 14:50

High Protein Quinoa Balls Recipe🥗💪 Ingredients for Quinoa Balls: 🥣 75g quinoa 🌿 3 tsp canola oil 🧅 1 red onion 🧄 2 cloves garlic 🥕 1 small carrot 🌾 10g rolled oats (tender) 🌱 35g soy granules 🫚 1 tsp vegetable broth 🌽 2 tbsp cornstarch 🌿 1 handful of parsley Ingredients for Filling: 🌿 1 handful of chives 🌱 1 tbsp vegan cream cheese 🍋 Quarter lemon Spices: 🧂 Salt 🌶️ Chili 🧂 Pepper Preparation🥘: 1️⃣ Cook the quinoa & soy granules according to the packaging. Then drain each one. 2️⃣ Chop onions & garlic 🧅🧄 and sauté in 1 tsp canola oil. 3️⃣ Grate or finely chop the carrots 🥕 and add to the pan for 3 minutes. Finely chop parsley 🌿. 4️⃣ Mix quinoa, soy granules, onions, garlic, carrots, oats, vegetable broth, parsley & cornstarch in a bowl 🥣. Leave to swell for 3 minutes. 5️⃣ Prepare the filling: mix vegan cream cheese, lemon juice 🍋, and chives 🌿. Season. 6️⃣ Season the quinoa mixture, form 5 balls, press in with your thumb, fill with the dip, and close the balls. 7️⃣ Fry the balls in 2 tbsp canola oil until golden. ✨Enjoy your high-protein snack!💪🌱 #HealthyEating#VeganRecipe#ProteinBoost#QuinoaBalls#PlantBased#MealPrep @dishes

Dishes.Cooking.Food

@cookingdish · Post #549 · 15.10.2024 г., 13:27

Pumpkin Cabbage Rolls 🎃🥬 Filling: 200 g 🎃 pumpkin 50 g 🌱 soy granules 3 cloves of garlic, grated 🧄 2 cm ginger, grated 2 spring onions 🧅 1/2 bell pepper 🌶️ 100 ml TABASCO Sriracha Sauce 🌶️ 2 tbsp 🍁 maple syrup Toppings: Sesame, chili, coriander 🌿 #PumpkinCabbageRolls#VeganRecipe#SpicyAndSweet#PlantBased#HealthyEating#AutumnVibes @dishes

Dishes.Cooking.Food

@cookingdish · Post #562 · 28.10.2024 г., 14:31

🍞✨Recipe for 1 Garlic Bread✨🍞 Dough: 🥛 200 ml oat milk 💧 50 ml water 🌿 3 tbsp oil 🍯 1 tbsp agave syrup 🧂 1 tsp salt 🍞 1 packet yeast 🌾 500 g flour Filling: 🧈 80 g vegan butter 🧄 6 cloves garlic 🌱 1 handful rosemary 🧂 1/2 tsp salt #GarlicBread#VeganRecipe#HomemadeBaking#OatMilk#Rosemary @dishes

Dishes.Cooking.Food

@cookingdish · Post #550 · 16.10.2024 г., 13:36

Pumpkin Scissor Pasta 🍝🎃✂️ Ingredients: ✂️ Scissors pasta: - 650 g Hokkaido pumpkin 🎃 - 600 g flour 🌾 - 1/2 tbsp salt 🧂 Also: - Oil for frying 🫒 - 2 cloves of garlic 🧄 - 1 white onion 🧅 - 200 g leaf spinach 🌿 - Pinch of salt and pepper 🧂🌶️ Toppings: - Vegan feta 🧀 - Chili flakes 🌶️ #PumpkinPasta#VeganRecipe#ScissorPasta#HealthyEating#FallRecipe#HomemadePasta#PlantBased#SpinachAndFeta#ComfortFood @dishes