2020-05-17 17:28:15 +02:00
|
|
|
from sweets import Sweets
|
|
|
|
|
|
|
|
|
2020-05-18 19:16:36 +02:00
|
|
|
def create_data_sweets():
|
2020-05-17 17:28:15 +02:00
|
|
|
allProducts = []
|
|
|
|
|
|
|
|
sweet = Sweets('Mars', 'czekoladowy', 'baton', 'sredni', 2.49)
|
|
|
|
allProducts.append(sweet)
|
|
|
|
sweet = Sweets('Mars', 'czekoladowy', 'czekolada', 'duzy', 4.99)
|
|
|
|
allProducts.append(sweet)
|
|
|
|
sweet = Sweets('Mars', 'czekoladowy', 'czekolada', 'ogromny', 11.26)
|
|
|
|
allProducts.append(sweet)
|
|
|
|
sweet = Sweets('M&M', 'czekoladowy', 'czekolada', 'duzy', 3.99)
|
|
|
|
allProducts.append(sweet)
|
|
|
|
sweet = Sweets('M&M', 'czekoladowy', 'baton', 'sredni', 2.89)
|
|
|
|
allProducts.append(sweet)
|
|
|
|
sweet = Sweets('Nestle', 'bananowy', 'landrynka', 'maly', 0.39)
|
|
|
|
allProducts.append(sweet)
|
|
|
|
sweet = Sweets('Nestle', 'truskawkowy', 'landrynka', 'maly', 0.39)
|
|
|
|
allProducts.append(sweet)
|
|
|
|
sweet = Sweets('Nestle', 'cola', 'landrynka', 'maly', 0.49)
|
|
|
|
allProducts.append(sweet)
|
|
|
|
sweet = Sweets('Wedel', 'czekoladowy', 'baton', 'sredni', 1.99)
|
|
|
|
allProducts.append(sweet)
|
|
|
|
sweet = Sweets('Maoam', 'truskawkowy', 'guma', 'maly', 0.25)
|
|
|
|
allProducts.append(sweet)
|
|
|
|
|
2020-05-19 13:14:19 +02:00
|
|
|
return allProducts
|
|
|
|
|
|
|
|
|
|
|
|
learning_data = [
|
|
|
|
# kolor, kształt, waga, rozmiar, nazwa
|
|
|
|
['black', 'rectangle', 51, 'small', 'Mars'],
|
|
|
|
['gold', 'pack', 100, 'big', 'Haribo'],
|
|
|
|
['purple', 'rectangle', 100, 'big', 'Milka'],
|
|
|
|
['brown', 'pack', 45, 'small', 'M&M'],
|
|
|
|
['blue', 'rectangle', 50, 'medium', 'Bounty'],
|
|
|
|
['blue', 'square', 40, 'small', 'Knoppers'],
|
|
|
|
['blue', 'rectangle', 35, 'small', 'Milky-way'],
|
|
|
|
['gold', 'rectangle', 40, 'medium', 'Twix'],
|
|
|
|
['gold', 'rectangle', 50, 'medium', 'Prince-polo'],
|
|
|
|
['brown', 'rectangle', 55, 'medium', 'Snickers'],
|
|
|
|
['brown', 'rectangle', 45, 'medium', 'Lion'],
|
|
|
|
['white', 'rectangle', 40, 'medium', 'Kinder-bueno'],
|
|
|
|
['red', 'rectangle', 50, 'medium', 'Kit-kat'],
|
|
|
|
['blue', 'rectangle', 115, 'big', 'Wedel'],
|
|
|
|
['white', 'rectangle', 15, 'small', 'Krowka'],
|
|
|
|
['red', 'pack', 70, 'medium', 'Skittles'],
|
|
|
|
['orange', 'rectangle', 45, 'medium', 'Reeses'],
|
|
|
|
['blue', 'rectangle', 55, 'medium', 'Oreo'],
|
|
|
|
['gold', 'rectangle', 120, 'big', 'Ferrero-rocher'],
|
|
|
|
['white', 'rectangle', 120, 'big', 'Rafaello'],
|
|
|
|
['white', 'jar', 600, 'big', 'Nutella'],
|
|
|
|
['white', 'rectangle', 25, 'small', 'Duplo'],
|
|
|
|
['brown', 'jar', 500, 'big', 'GoOn'],
|
|
|
|
['brown', 'jar', 470, 'big', 'Active Orzechowe'],
|
|
|
|
['red', 'jar', 250, 'medium', 'Strawberry Jam'],
|
|
|
|
['black', 'jar', 250, 'medium', 'Blackberry Jam'],
|
|
|
|
['orange', 'jar', 250, 'medium', 'Peach Jam'],
|
2020-05-19 13:25:53 +02:00
|
|
|
]
|
2020-05-18 19:43:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
def create_data_dict():
|
|
|
|
products_as_dict = []
|
|
|
|
|
|
|
|
sweet = Sweets('Mars', 'czekoladowy', 'baton', 'sredni', 2.49)
|
|
|
|
products_as_dict.append(vars(sweet))
|
|
|
|
sweet = Sweets('Mars', 'czekoladowy', 'czekolada', 'duzy', 4.99)
|
|
|
|
products_as_dict.append(vars(sweet))
|
|
|
|
sweet = Sweets('Mars', 'czekoladowy', 'czekolada', 'ogromny', 11.26)
|
|
|
|
products_as_dict.append(vars(sweet))
|
|
|
|
sweet = Sweets('M&M', 'czekoladowy', 'czekolada', 'duzy', 3.99)
|
|
|
|
products_as_dict.append(vars(sweet))
|
|
|
|
sweet = Sweets('M&M', 'czekoladowy', 'baton', 'sredni', 2.89)
|
|
|
|
products_as_dict.append(vars(sweet))
|
|
|
|
sweet = Sweets('Nestle', 'bananowy', 'landrynka', 'maly', 0.39)
|
|
|
|
products_as_dict.append(vars(sweet))
|
|
|
|
sweet = Sweets('Nestle', 'truskawkowy', 'landrynka', 'maly', 0.39)
|
|
|
|
products_as_dict.append(vars(sweet))
|
|
|
|
sweet = Sweets('Nestle', 'cola', 'landrynka', 'maly', 0.49)
|
|
|
|
products_as_dict.append(vars(sweet))
|
|
|
|
sweet = Sweets('Wedel', 'czekoladowy', 'baton', 'sredni', 1.99)
|
|
|
|
products_as_dict.append(vars(sweet))
|
|
|
|
sweet = Sweets('Maoam', 'truskawkowy', 'guma', 'maly', 0.25)
|
|
|
|
products_as_dict.append(vars(sweet))
|
|
|
|
|
2020-05-19 13:25:53 +02:00
|
|
|
return products_as_dict
|