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'],
|
2020-06-08 18:26:34 +02:00
|
|
|
['purple', 'rectangle', 100, 'big', 'Milka-czekolada'],
|
2020-05-19 13:14:19 +02:00
|
|
|
['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'],
|
2020-06-08 18:26:34 +02:00
|
|
|
['brown', 'rectangle', 45, 'medium', 'Lion'],
|
2020-05-19 13:14:19 +02:00
|
|
|
['white', 'rectangle', 40, 'medium', 'Kinder-bueno'],
|
|
|
|
['red', 'rectangle', 50, 'medium', 'Kit-kat'],
|
2020-06-08 18:26:34 +02:00
|
|
|
['blue', 'rectangle', 115, 'big', 'Wedel-czekolada'],
|
2020-05-19 13:14:19 +02:00
|
|
|
['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-06-08 18:26:34 +02:00
|
|
|
['brown', 'rectangle', 140, 'big', 'Jezyki classic'],
|
|
|
|
['blue', 'rectangle', 140, 'big', 'Jezyki kokos'],
|
|
|
|
['white', 'rectangle', 100, 'big', 'Kinder Chocolate'],
|
|
|
|
['yellow', 'rectangle', 300, 'big', 'belVita'],
|
|
|
|
['blue', 'rectangle', 380, 'big', 'Wedel-Ptasie Mleczko'],
|
|
|
|
['purple', 'rectangle', 330, 'big', 'Milka-Alpejskie Mleczko'],
|
|
|
|
['blue', 'rectangle', 294, 'big', 'Delicje'],
|
|
|
|
['silver', 'pack', 280, 'big', 'Wawel-Michalki'],
|
|
|
|
['red', 'rectangle', 50, 'medium', 'Krakuski Petit Beurre'],
|
|
|
|
['white', 'egg', 20, 'small', 'Kinder Niespodzianka'],
|
|
|
|
['brown', 'rectangle', 180, 'big', 'Familijne Wafle'],
|
|
|
|
['red', 'rectangle', 235, 'big', 'dr Gerard PryncyPałki'],
|
|
|
|
['white', 'rectangle', 25, 'medium', 'Nestlé Cini Minis Batonik'],
|
|
|
|
['black', 'pack', 70, 'big', 'Korsarz Draże'],
|
|
|
|
['white', 'rectangle', 50, 'medium', 'Góralki'],
|
|
|
|
['white', 'rectangle', 24, 'medium', 'Kinder Country'],
|
|
|
|
['red', 'rectangle', 46, 'medium', '3Bit'],
|
|
|
|
['yellow', 'rectangle', 25, 'medium', 'Nestlé Nesquik Batonik'],
|
|
|
|
['yellow', 'rectangle', 47, 'medium', 'Wedel WW'],
|
|
|
|
['brown', 'rectangle', 30, 'medium', 'Lubisie'],
|
|
|
|
['purple', 'rectangle', 22, 'small', 'Maoam'],
|
|
|
|
['brown', 'rectangle', 294, 'medium', 'Grześki'],
|
|
|
|
['white', 'rectangle', 250, 'big', 'merci'],
|
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
|