initial commit

This commit is contained in:
Jonas Weinz 2019-05-08 17:39:41 +02:00
commit e6c632ba50
5 changed files with 765 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
data
__pycache__
.ipynb_checkpoints

84
json_buffered_reader.py Normal file
View File

@ -0,0 +1,84 @@
#!/usr/bin/env python3
import json
class JSON_buffered_reader(object):
def __init__(self, filename: str, serialization_array_depth: int = 1):
self.filename = filename
self.n = 0
self.serialization_array_depth = serialization_array_depth
self.array_d = 0
self.object_d = 0
self.file_obj = None
self.buffer = r''
self.json_queue = []
self.eof = False
self._open()
def _open(self):
self.n = 0
self.array_d = 0
self.object_d = 0
self.file_obj = open(self.filename, 'r')
def _close(self):
self.file_obj.close()
def _process_next_line(self):
line = self.file_obj.readline()
if len(line) == 0:
self.eof = True
self._close()
return
for c in line:
if c == '[':
if self.array_d >= self.serialization_array_depth:
self.buffer += c
self.array_d += 1
continue
elif c == ']':
if self.array_d >= self.serialization_array_depth:
self.buffer += c
self.array_d -= 1
elif c == '{':
self.object_d += 1
self.buffer += c
continue
elif c == '}':
self.object_d -= 1
self.buffer += c
elif c == ',':
if self.array_d == self.serialization_array_depth and self.object_d == 0:
continue
self.buffer += c
elif c == '\n':
continue
else:
self.buffer += c
continue
assert self.object_d >= 0
assert self.array_d >= 0
if self.object_d == 0:
if self.array_d == self.serialization_array_depth:
self.json_queue.append(self.buffer)
self.buffer = r''
def __iter__(self):
return self
def __next__(self):
while len(self.json_queue) == 0:
if self.eof:
return None
self._process_next_line()
return json.loads(self.json_queue.pop(0))

9
recipe.py Normal file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env python3
from json_buffered_reader import JSON_buffered_reader as JSON_br
import numpy as np
class Recipe(object):
def __init__(self):
self.instructions = []
self.ingredients = []

665
sandbox.ipynb Normal file
View File

@ -0,0 +1,665 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import json \n",
"from pprint import pprint"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"from json_buffered_reader import JSON_buffered_reader as JSON_br"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"import settings"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* read in objects:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"recipes = JSON_br(settings.one_million_recipes_file)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"i = 0\n",
"json_recipes = []\n",
"for recipe in recipes:\n",
" i += 1\n",
" if i == 10:\n",
" break\n",
" json_recipes.append(recipe)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[{'text': 'Chop green onions; chop red peppers; peel and grate carrots (save two grated carrots for salads); place all in a medium bowl and toss to mix.'},\n",
" {'text': 'Preheat oven to 450 degrees Fahrenheit.'},\n",
" {'text': 'Place salmon fillet in middle of a large piece of heavy aluminum foil.'},\n",
" {'text': 'Sprinkle salmon with ginger and freshly ground black pepper if you wish.'},\n",
" {'text': 'Arrange bowl of veggies on top of salmon, and seal foil tightly to create a tightly sealed pocket.'},\n",
" {'text': 'Place in oven and bake for 20 minutes.'},\n",
" {'text': 'The veggies will give up some of their liquid, creating more than enough to cook the fish.'},\n",
" {'text': 'Cook rice per package instructions.'},\n",
" {'text': 'While fish bakes, prepare Salad a La SPORTZ by arranging crackers in single layer on cookie sheet; sprinkle with Parmesan topping.'},\n",
" {'text': 'Bake for 1 to 2 minutes in oven with fish, just until lightly browned.'},\n",
" {'text': 'Cool.'},\n",
" {'text': 'Toss greens (1/2 pound = 8 cups), carrots (grated), tomatoes (halved), and green onions (sliced) in large sized bowl.'},\n",
" {'text': 'Toss with dressing.'},\n",
" {'text': 'Sprinkle with crackers just before serving.'},\n",
" {'text': 'Slice banana and kiwi and toss gently; divide between four dessert cups.'},\n",
" {'text': 'Blend cinnamon and sugar into yogurt, and place one-fourth of mixture on each bowl of fruit.'}]"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"json_recipes[0]['instructions']"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----\n",
"\n",
" * experimenting a little bit with texts"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"ingredients = []\n",
"instructions = []"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"filling with first n datasets"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"n = 50"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"i = 0\n",
"\n",
"for recipe in recipes:\n",
" ing = []\n",
" ins = []\n",
" for ingredient in recipe['ingredients']:\n",
" ing.append(ingredient['text'])\n",
" \n",
" for instruction in recipe['instructions']:\n",
" ins.append(instruction['text'])\n",
" \n",
" ingredients.append(ing)\n",
" instructions.append(ins)\n",
" \n",
" i += 1\n",
" if i >= n:\n",
" break"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[['1 tablespoon cornstarch',\n",
" '2 tablespoons cold water',\n",
" '12 cup boiling water',\n",
" '1 teaspoon lemon juice or 1 teaspoon vanilla',\n",
" '3 egg whites',\n",
" '6 tablespoons sugar'],\n",
" ['2 eggs, scrambled',\n",
" '2 Tbsp. PHILADELPHIA Chive & Onion Cream Cheese Spread',\n",
" '1 English muffin, split, toasted',\n",
" '1 KRAFT Singles'],\n",
" ['1 lb pumpkin, chopped or 1 lb butternut squash',\n",
" '1 large onion, chopped',\n",
" '2 large garlic cloves, minced',\n",
" '1 tablespoon curry powder',\n",
" 'fresh stock (cubes work if needs must)',\n",
" '2 (13 1/2 ounce) cans coconut milk',\n",
" '200 g smoked salmon',\n",
" 'salt and pepper',\n",
" 'vegetable oil'],\n",
" ['3 x apples, Granny Smith',\n",
" '1 c. almonds, slivered',\n",
" '1/2 c. almonds, grnd',\n",
" '1 x Large eggs',\n",
" '1/2 c. sugar (caster)',\n",
" '50 gm butter',\n",
" '2 sht puff pastry',\n",
" '1 x Large eggs',\n",
" '1 Tbsp. almonds, slivered',\n",
" '1 Tbsp. sugar (caster)'],\n",
" ['8 ounces, weight Linguine',\n",
" '1 whole Red Bell Pepper, Julienned',\n",
" '2 Tablespoons Balsamic Vinegar',\n",
" '3 whole Garlic Cloves, Minced',\n",
" '1/2 teaspoons Salt',\n",
" '1/4 teaspoons Coarsely Ground Black Pepper',\n",
" '6 Tablespoons Extra Virgin Olive Oil',\n",
" '1 cup Fresh Basil Leaves, Thinly Sliced, Divided',\n",
" '2 cups Shredded, Cooked Chicken',\n",
" '1 cup Small Fresh Mozzarella Balls, Halved Or Regular Mozzarella Cut Into '\n",
" '3/4-inch Cubes',\n",
" '1/2 cups Goat Cheese Crumbles'],\n",
" ['1 cup all-purpose flour',\n",
" '1 teaspoon ground cinnamon',\n",
" '3/4 teaspoon baking powder',\n",
" '1/4 teaspoon baking soda',\n",
" '1/4 teaspoon salt',\n",
" '1/4 teaspoon ground nutmeg',\n",
" '1/3 cup margarine',\n",
" '3/4 cup firmly packed dark brown sugar',\n",
" '1 large egg',\n",
" '1 teaspoon vanilla extract',\n",
" '1 cup diced peeled Rome apple',\n",
" '3/4 cup regular oats, uncooked',\n",
" '1/2 cup dried currants',\n",
" 'Cooking spray',\n",
" '1 tablespoon powdered sugar'],\n",
" ['6 cups prepared sushi rice (see recipe)',\n",
" '2 Hass avocados in 1/2-inch strips',\n",
" 'Salt',\n",
" '1 pound cucumber, carrot or daikon, or a combination, cut into matchsticks',\n",
" '2 sheets nori (7 by 8 inches), cut into confetti',\n",
" '2 pounds fillets of fresh salmon, tuna, yellowtail, fluke or striped bass, '\n",
" 'in slices 3 inches by 1 inch by 1/4 inch thick',\n",
" '1 bunch scallions, cut in thin rings halfway up the green tops',\n",
" '2 teaspoons sesame seeds'],\n",
" ['1/2 pound grnd beef, ham or possibly chicken',\n",
" '1 egg, slightly beaten',\n",
" '1/2 c. lowfat milk',\n",
" '1/4 c. fine bread crumbs',\n",
" '1 1/2 tbsp. finely minced onion',\n",
" '1/2 teaspoon salt',\n",
" '1/4 teaspoon dry mustard',\n",
" 'Few grains pepper',\n",
" '2 tbsp. flour',\n",
" '1/4 c. Puritan oil',\n",
" '1 can condensed tomato or possibly mushroom soup',\n",
" '3/4 c. lowfat milk',\n",
" '1 1/2 c. cooked or possibly canned mixed vegetables',\n",
" '1/2 teaspoon salt'],\n",
" ['1- 1/2 cup All-purpose Flour',\n",
" '1 Tablespoon White Sugar',\n",
" '1/2 teaspoons Salt',\n",
" '1/2 cups Vegetable Oil',\n",
" '2 Tablespoons Milk'],\n",
" ['2 cups peeled, cooked, mashed sweet potatoes*',\n",
" '1 1/4 cups sugar',\n",
" '1/4 cup (1/2 stick) melted butter',\n",
" '2 eggs',\n",
" '1 teaspoon vanilla extract, or 1-2 tablespoons bourbon',\n",
" '1/4 teaspoon salt',\n",
" '1/4 teaspoon cinnamon',\n",
" '1/4 teaspoon ground ginger',\n",
" '1 cup milk',\n",
" 'One 9-inch unbaked pie crust',\n",
" '3 egg whites'],\n",
" ['1 pkg. (2-layer size) chocolate cake mix',\n",
" '14 Oreo Cookies, coarsely chopped',\n",
" '1 pkg. (4-serving size) Jell-O Vanilla Instant Pudding',\n",
" '1 cup cold milk',\n",
" '1/4 cup icing sugar',\n",
" '2 cups thawed Cool Whip Whipped Topping',\n",
" \"48 Baker's Semi-Sweet Chocolate Chips\"],\n",
" ['1 small butternut squash, peeled, diced (about 5 C.)',\n",
" '1 medium onion, large dice (1 cup)',\n",
" '1 tablespoon olive oil',\n",
" '1 apple, skinned, large dice (1 cup)',\n",
" '48 ounces chicken broth',\n",
" '1 cup half-and-half',\n",
" '2 tablespoons parsley, fresh, chopped',\n",
" '1 tablespoon thyme, fresh, chopped',\n",
" 'crouton (optional)',\n",
" 'sour cream (optional)'],\n",
" ['1 lb turkey, cut into bite size pieces',\n",
" '2 tablespoons Italian dressing',\n",
" '2 cups frozen mixed vegetables',\n",
" '1 (10 3/4 ounce) can98% fat free condensed cream of chicken soup',\n",
" '14 lb Velveeta cheese, cut into 1/2-inch cubes (or store brand)',\n",
" '1 sheet frozen puff pastry, thawed (1/2 of 17.3-oz. pkg.)',\n",
" '1 egg, beaten'],\n",
" ['1 12 cups whole wheat flour',\n",
" '3 teaspoons baking powder',\n",
" '14 cup extra virgin olive oil',\n",
" '2 eggs',\n",
" '1 cup skim milk',\n",
" '14 teaspoon salt',\n",
" '14 teaspoon cinnamon',\n",
" '14 teaspoon nutmeg',\n",
" '14 teaspoon ground cloves',\n",
" '14 teaspoon ginger',\n",
" '14 teaspoon vanilla',\n",
" '34 cup flax seed',\n",
" '3 tablespoons honey',\n",
" '1 12 cups blueberries (or any fruit desired)'],\n",
" ['1 lb leftover chopped corned beef',\n",
" '1 cup shredded cheddar cheese',\n",
" '2 tablespoons dried onion flakes',\n",
" '1 tablespoon dill or 1 tablespoon sweet relish',\n",
" '23 cup mayonnaise',\n",
" '6 hamburger buns, buttered and toasted'],\n",
" ['1/4 cup heavy cream',\n",
" \"1/2 (10 ounce) jar Dickinson's Lemon Curd, or any flavor Dickinson's Fruit \"\n",
" 'or Creme Curd',\n",
" '1 (4 ounce) package cream cheese, softened',\n",
" '1 (15 count) box phyllo dessert cups',\n",
" 'Fruit slices, cookie pieces, candy sprinkles, chocolate shavings '\n",
" '(optional)'],\n",
" ['4 large baking potatoes (2 lb./900 g) Safeway 2 pkg For $5.00 thru 02/09',\n",
" '1/2 cup sour cream',\n",
" \"1/4 cup Bull's-Eye Bold Original Barbecue Sauce\",\n",
" '2 green onions, sliced',\n",
" '1/4 cup French fried onions'],\n",
" ['2 tablespoons olive oil',\n",
" '2 shallots, thinly sliced',\n",
" '1 teaspoon minced peeled fresh ginger',\n",
" '1/2 cup chopped tart green apple(such as Granny Smith)',\n",
" '1/2 cup chopped zucchini',\n",
" '1/2 cup chopped seeded red bell pepper',\n",
" '1/2 cup chopped seeded green bell pepper',\n",
" '1/4 cup chopped carrot',\n",
" '1/2 pound crabmeat, drained well, picked over',\n",
" '1/4 cup mayonnaise',\n",
" '2 tablespoons chopped fresh chives',\n",
" '2 tomatoes, peeled, seeded, chopped',\n",
" '1/3 cup chopped fresh cilantro',\n",
" '2 tablespoons Sherry wine vinegar',\n",
" '1 garlic clove, chopped',\n",
" 'Pinch of cayenne pepper',\n",
" '1/2 cup olive oil',\n",
" '2 heads Belgian endive, trimmed, separated into spears',\n",
" 'Chopped fresh chives'],\n",
" ['2 12 lbs all-purpose flour',\n",
" '2 12 tablespoons Crisco',\n",
" '1 ounce yeast (2 packages)',\n",
" '1 teaspoon sugar',\n",
" '1 tablespoon salt',\n",
" '2 tablespoons anise seed',\n",
" '2 eggs',\n",
" '1 cup water',\n",
" '1 tablespoon vegetable oil'],\n",
" ['1/2 cup semi-sweet chocolate chips',\n",
" '1 tbsp water',\n",
" '1 tbsp rum',\n",
" '1 tbsp vanilla extract ( I add a bit extra)',\n",
" '1 3/4 cup powdered sugar',\n",
" '1 3/4 cup (7 ounces) ground walnuts',\n",
" '1 granulated or decorative sugar'],\n",
" ['1- 1/2 cup All-purpose Flour',\n",
" '1/4 cups Sugar',\n",
" '1/2 Tablespoons Baking Powder',\n",
" '1/4 cups Unsalted Butter, Cubed, Cold',\n",
" '1 whole Egg, Beaten',\n",
" '1/2 cups Ricotta Cheese',\n",
" '1 teaspoon Vanilla',\n",
" '2 teaspoons Cinnamon',\n",
" '2 whole Peaches, Cored, Diced',\n",
" '1 Tablespoon Turbinado Sugar',\n",
" '1 cup Confectioners Sugar',\n",
" '13 cups Milk',\n",
" '1/2 teaspoons Cinnamon'],\n",
" ['1 cup all-purpose flour',\n",
" '1/2 cup chopped walnuts',\n",
" '1/4 cup packed brown sugar',\n",
" '1/2 cup melted butter',\n",
" '2 1/2 cups strawberries, finely chopped',\n",
" '1/2 cup white sugar',\n",
" '1 tablespoon lemon juice',\n",
" '1 (16 ounce) container frozen whipped topping, thawed'],\n",
" ['34 cup peanut butter',\n",
" '12 cup sugar',\n",
" '1 teaspoon vanilla',\n",
" '12 teaspoon salt',\n",
" '1 34 cups milk',\n",
" '2 14 cups whole wheat flour',\n",
" '4 teaspoons baking powder'],\n",
" ['1/2 c. granulated sugar',\n",
" '3/4 c. salt free corn oil',\n",
" '1/4 c. egg beaters',\n",
" '1 teaspoon grated orange rind',\n",
" '1/4 teaspoon orange juice',\n",
" '1 tbsp. low sodium baking powder',\n",
" '3 1/2 c. flour, all purpose'],\n",
" ['1 large about 3 pounds cantaloupe',\n",
" '12 cup apple juice',\n",
" '1 12 tablespoons lime juice',\n",
" '1 12 tablespoons chopped of fresh mint',\n",
" '12 cup plain yogurt',\n",
" '1 tablespoon honey, if needed',\n",
" '1 pinch salt'],\n",
" ['3 cups cooked brown rice',\n",
" '1 lb ground turkey',\n",
" '1 medium onion, chopped',\n",
" '1 green bell pepper, seeded and chopped',\n",
" '1 (6 ounce) canof small pitted black olives, drained',\n",
" '12 cup raisins'],\n",
" ['12 chopped sweet melon',\n",
" '2 sliced bananas',\n",
" '2 chopped guavas',\n",
" '1 bunch grapes',\n",
" '1 diced apple',\n",
" '2 tablespoons orange juice',\n",
" '1 cup shelled pomegranate',\n",
" '1 cup fresh cream',\n",
" '12 teaspoon black pepper',\n",
" '1 teaspoon sugar',\n",
" 'few fresh mint leaves, for garnishing'],\n",
" ['1 12 cups wheat berries',\n",
" '8 cups water',\n",
" '14 cup chopped almonds, or',\n",
" '14 cup toasted pine nuts',\n",
" '3 tablespoons vegetable oil',\n",
" '1 chopped onion',\n",
" '2 minced garlic cloves',\n",
" '1 tablespoon mild curry paste',\n",
" '14 teaspoon salt',\n",
" '3 tablespoons white wine vinegar',\n",
" '1 chopped red pepper',\n",
" '12 cup chopped mozzarella cheese',\n",
" '2 tablespoons chopped parsley'],\n",
" ['1 12 cups old fashioned oats',\n",
" '1 cup flour, all-purpose',\n",
" '12 cup brown sugar, firmly packed',\n",
" '1 teaspoon cinnamon',\n",
" '12 teaspoon baking soda',\n",
" '14 teaspoon salt',\n",
" '1 cup orange juice',\n",
" '14 cup vegetable oil',\n",
" '1 egg, beaten',\n",
" '1 teaspoon vanilla',\n",
" '6 ounces dried mixed fruit, diced',\n",
" '2 tablespoons old fashioned oats'],\n",
" ['1-1/4 gal. popped corn',\n",
" '1 cup butter',\n",
" '2 cups brown sugar, packed',\n",
" '1/2 cup light corn syrup',\n",
" '1/2 tsp. baking soda',\n",
" '1/2 tsp. vanilla'],\n",
" ['3 13 lbs mangoes, chopped',\n",
" '4 teaspoons garlic',\n",
" 'salt',\n",
" '3 tablespoons chili powder',\n",
" '2 tablespoons cumin powder',\n",
" '1 tablespoon cround coriander',\n",
" '3 tablespoons masala (or curry powder)',\n",
" '1 12 cups honey (agave ok)',\n",
" '12 cup cornflour (or potato)',\n",
" '2 tablespoons mustard seeds',\n",
" 'curry leaf, handfull (if you can find them, I have a curry leaf tree)',\n",
" '1 12 cups olive oil'],\n",
" ['1 lb. boneless beef sirloin steak, thinly sliced',\n",
" '1/4 cup A.1. Original Sauce, divided',\n",
" '1/4 cup KRAFT Original Barbecue Sauce',\n",
" '1 tsp. GREY POUPON Dijon Mustard'],\n",
" ['10 lbs potatoes, peeled',\n",
" '2 onions, peeled',\n",
" '9 -10 large eggs (or 7-8 extra-large eggs)',\n",
" '1 12 tablespoons salt',\n",
" '14 cup oil'],\n",
" ['1 (10 ounce) package frozen chopped spinach, thawed and squeezed dry',\n",
" '1 cup dry breadcrumbs',\n",
" '1 small onion, finely chopped',\n",
" '2 eggs, lightly beaten',\n",
" '14 cup romano cheese, grated',\n",
" '2 teaspoons dried oregano',\n",
" '1 12 teaspoons garlic powder',\n",
" '12 teaspoon salt',\n",
" '1 teaspoon all purpose Greek seasoning (I found mine at Walmart)',\n",
" '2 lbs ground lamb or 2 lbs ground beef',\n",
" 'tzatziki, sauce (for a really good one, use Tzatziki Cucumber Dipping Sauce '\n",
" ')'],\n",
" ['2 12 lbs ground beef, your choice of cut',\n",
" '1 lb ground pork, I use Jones Sausage Roll*',\n",
" '1 cup large dice celery',\n",
" '1 cup large dice onion',\n",
" '6 -12 ounces pepperidge farm onion and garlic croutons',\n",
" '1 lb butter, you may not need it all',\n",
" 'poultry seasoning',\n",
" 'salt',\n",
" 'pepper'],\n",
" ['3 pounds Chicken Wings Or Drummettes',\n",
" '1 teaspoon Salt, Or To Taste',\n",
" '1/2 teaspoons Pepper Or To Taste',\n",
" '1 Tablespoon Oil',\n",
" '3 Tablespoons Butter',\n",
" '1/4 cups Sriracha Hot Sauce',\n",
" '2 Tablespoons Honey',\n",
" '1 Tablespoon Rice Wine Or Sherry',\n",
" '1 teaspoon Soy Sauce',\n",
" '1 teaspoon Hoisin Sauce',\n",
" '1/2 teaspoons Salt',\n",
" '2 Tablespoons Chopped Cilantro'],\n",
" ['1 c. Slivered almonds, toasted',\n",
" '2 Tbsp. Light brown sugar',\n",
" '2 Tbsp. Butter, room temperature',\n",
" '3/4 stk butter',\n",
" '3 ounce White chocolate, minced, into small pcs',\n",
" '2 lrg Large eggs, room temperature',\n",
" '1/2 c. Light brown sugar, packed',\n",
" '1/2 c. Granulated sugar',\n",
" '1/2 tsp Baking pwdr',\n",
" '2 x Tesa freshly grated lemon peel',\n",
" '1/2 tsp Vanilla',\n",
" '1/4 tsp Almond extract',\n",
" '1 1/4 c. Flour',\n",
" '1/4 c. Slivered almonds'],\n",
" ['2 eggs', 'pinch salt', 'pinch black pepper', '2 slices any cheese'],\n",
" ['2 can Pillsbury Grands Homestyle Refrigerated Buttermilk Biscuits (16.3 oz '\n",
" 'can)',\n",
" '3/4 cup butter',\n",
" '1/2 cup granulated sugar',\n",
" '1 tsp ground cinnamon',\n",
" '1 cup brown sugar'],\n",
" ['Meat from 1 whole chicken Or possibly canned chicken or possibly parts',\n",
" '1 can cream of chicken soup',\n",
" '1/2 c. green chili salsa',\n",
" '2 tbsp. quick cooking tapioca',\n",
" '1 med. onion, minced',\n",
" '1 1/2 c. grated cheese',\n",
" '1 doz. corn tortillas',\n",
" 'Black olives'],\n",
" ['12 cup corn kernel, - 1/2 cup',\n",
" '12 cup mushroom, chopped - 1/2 cup',\n",
" '3 onions, - 3',\n",
" '4 tomatoes, - 4',\n",
" 'red chili pepper',\n",
" 'coriander powder',\n",
" '6 cloves, - 6',\n",
" '1 bay leaf, - 1',\n",
" '2 star anise, - 2',\n",
" 'black pepper',\n",
" 'cornflour',\n",
" 'milk',\n",
" 'fresh cream',\n",
" 'coriander leaves',\n",
" '1 tablespoon oil, - 1 tablespoon',\n",
" 'salt'],\n",
" ['2 tablespoons extra virgin olive oil',\n",
" '1 large onion, chopped',\n",
" '1 jalapeno, seeded and minced',\n",
" '4 garlic cloves, minced',\n",
" '6 large red bell peppers, roasted, peeled, and seeded',\n",
" '1 tablespoon plus 1 teaspoon red wine vinegar',\n",
" '1 tablespoon balsamic vinegar',\n",
" '1 tablespoon light brown sugar',\n",
" '1 teaspoon ground cumin',\n",
" 'Salt to taste'],\n",
" ['2 pounds frozen cooked shrimp without tails, peeled and deveined',\n",
" '3/4 cup chopped green onions',\n",
" '1 1/2 cups chopped celery',\n",
" '3 tablespoons drained capers',\n",
" '1 cup black olives, sliced',\n",
" '1/2 cup oil and vinegar salad dressing',\n",
" '3/4 cup mayonnaise',\n",
" '1 tablespoon celery seed',\n",
" '1 dash lemon juice'],\n",
" ['500g lamb loin (backstrap) or fillet, thinly sliced',\n",
" '1 medium red onion, cut into thin wedges',\n",
" '1 large red capsicum, thickly sliced',\n",
" '1 large zucchini, cut into thick strips',\n",
" '150g whole button mushrooms',\n",
" '1/3 cup KRAFT* Greek Dressing',\n",
" '60g black olives',\n",
" 'To Serve',\n",
" 'chopped fresh oregano or italian parsley leaves',\n",
" 'grilled focaccia or turkish style bread'],\n",
" ['34 cup creamy peanut butter',\n",
" '12 cup Crisco shortening',\n",
" '1 14 cups firmly packed light brown sugar',\n",
" '3 tablespoons milk',\n",
" '1 tablespoon vanilla',\n",
" '1 egg',\n",
" '1 34 cups flour',\n",
" '34 teaspoon salt',\n",
" '34 teaspoon baking soda'],\n",
" ['3 chicken sausage',\n",
" '1 garlic clove, crushed',\n",
" '1 large onion, chopped',\n",
" '1 large green pepper, chopped',\n",
" '2 large carrots, julienned',\n",
" '3 tablespoons soy sauce'],\n",
" ['1 lb bacon, cooked and crumbled',\n",
" '5 garlic cloves, chopped (or more if you like)',\n",
" '2 (8 ounce) packages fresh mushrooms, sliced',\n",
" '2 tablespoons extra virgin olive oil',\n",
" '4 tablespoons butter',\n",
" \"2 (10 3/4 ounce) cans Campbell's Cream of Mushroom Soup (or the Cream of \"\n",
" 'Mushroom Soup with Roasted Garlic)',\n",
" '1 12 cups milk (or half and half)',\n",
" '14 teaspoon black pepper',\n",
" '2 (16 ounce) bags frozen French-cut green beans, thawed, drained and '\n",
" 'squeezed of extra water',\n",
" \"2 23 cups French's French fried onions\"],\n",
" ['1 egg, beaten',\n",
" '18 cup water',\n",
" '1 12 cups all-purpose flour',\n",
" '2 teaspoons fine sea salt',\n",
" '1 teaspoon ground black pepper',\n",
" 'vegetable oil, for frying',\n",
" '1 small cauliflower, cut into 1-inch florets',\n",
" '4 ounces green beans, halved',\n",
" '1 fennel bulb, trimmed and sliced into 1-inch pieces',\n",
" '1 cup garbanzo beans, drained and rinsed',\n",
" '1 lemon, cut into 1/4-inch slices',\n",
" '1 cup mayonnaise',\n",
" '2 tablespoons fresh lemon juice (from about 1/2 lemon)'],\n",
" ['1 -2 acorn squash',\n",
" '15 ounces black beans, rinsed and drained',\n",
" '15 ounces crushed tomatoes',\n",
" '2 medium onions',\n",
" '4 garlic cloves',\n",
" '1 quart vegetable broth',\n",
" '1 tablespoon olive oil',\n",
" '1 tablespoon cumin',\n",
" 'sea salt and pepper, to taste',\n",
" '1 avocado'],\n",
" ['1 (21 ounce) can cherry pie filling',\n",
" '1 (16 ounce) canpitted dark sweet cherries, drained',\n",
" '23 cup quick oats',\n",
" '12 cup Bisquick baking mix',\n",
" '12 cup packed brown sugar',\n",
" '14 cup chopped nuts (optional)',\n",
" '14 cup butter or 14 cup margarine',\n",
" '1 teaspoon cinnamon']]\n"
]
}
],
"source": [
"pprint(ingredients)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

4
settings.py Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env python3
data_root = "./data/1M_recipes/"
one_million_recipes_file = data_root + "layer1.json"