def get_actions():
    action1 = RankableAction(id='pasta',
                             features=[{
                                 "taste": "salty",
                                 "spice_level": "medium"
                             }, {
                                 "nutrition_level": 5,
                                 "cuisine": "italian"
                             }])
    action2 = RankableAction(id='ice cream',
                             features=[{
                                 "taste": "sweet",
                                 "spice_level": "none"
                             }, {
                                 "nutritional_level": 2
                             }])
    action3 = RankableAction(id='juice',
                             features=[{
                                 "taste": "sweet",
                                 'spice_level': 'none'
                             }, {
                                 'nutritional_level': 5
                             }, {
                                 'drink': True
                             }])
    action4 = RankableAction(id='salad',
                             features=[{
                                 'taste': 'salty',
                                 'spice_level': 'none'
                             }, {
                                 'nutritional_level': 2
                             }])
    return [action1, action2, action3, action4]
示例#2
0
def get_actions():
    action1 = RankableAction(id='Tutor 1', features=[{"spokenlanguage":"English", "codinglanguage":"Python"}])
    action2 = RankableAction(id='Tutor 2', features=[{"spokenlanguage":"Vietnamese", "codinglanguage":"C++"}])
    action3 = RankableAction(id='Tutor 3', features=[{"spokenlanguage":"Bahasa Indonesia", 'codinglanguage':'JavaScript'}])
    action4 = RankableAction(id='Tutor 4', features=[{"spokenlanguage":"Chinese", 'codinglanguage':'HTML'}])
    return [action1, action2, action3, action4]