Skip to content

Instantly share code, notes, and snippets.

@adelq
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adelq/90b14a23cf4f721f6445 to your computer and use it in GitHub Desktop.
Save adelq/90b14a23cf4f721f6445 to your computer and use it in GitHub Desktop.
Vegetarian Slow Cooker
from __future__ import print_function
import sys
import random
proteins = [
"canned white beans (drained and rinsed)",
"marinated baked tofu",
"seitan",
"tempeh"
]
vegetables = [
"diced yellow onion, chopped carrot, halved new potatoes",
"chopped roma tomatoes, pearl onions, sliced yellow squash",
"cubed butternut squash, chopped cauliflower, pitted green olives",
"sliced red onion, broccoli, green peas",
"corn kernels, sliced red bell pepper, diced sweet potato"
]
liquid = [
"vegetable broth",
"diced tomatoes in their juices",
]
herbs = [
"chopped thyme, chopped parsley",
"chopped oregano, chopped rosemary",
"ground cumin, ground coriander",
"chopped basil, chopped mint",
"ground chile powder, chopped cilantro"
]
flavor = [
"tomato paste",
"grated parmesan",
"chopped lemon",
]
def random_food(l, adventure=None):
"""Return random item from list of foods.
Adventure is percent (0.0 - 1.0) of how adventurous you want to be.
"""
if not adventure:
return random.choice(l)
else:
assert 0 <= adventure <= 1
return l[int(round(random.triangular(
0, len(l) - 1, adventure * (len(l) - 1))))]
if __name__ == '__main__':
adventure = None
if sys.argv[1]:
adventure = float(sys.argv[1])
print("Cooking instructions")
print("====================")
print("Sear 1 lb. of {} in 1T canola or olive oil until caramelized, "
"then saute 1 cup {} each in 1T more oil until just tender.".format(
random_food(proteins, adventure),
random_food(vegetables, adventure)))
print("Add both to your slow cooker, along with 2 cups of {}, "
"2T each of {}, and 2T of {}.".format(
random_food(liquid, adventure),
random_food(herbs, adventure),
random_food(flavor, adventure)))
print("Cook on high heat for 4 hours or on low heat for 7.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment