How to use the formulas.update function in formulas

To help you get started, we’ve selected a few formulas examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sagefy / sagefy / simulation / sequencer.py View on Github external
else:
            prev_response = {
                'time': response['time'],
                'prev_learned': init_learned,
            }
            prev_card = {
                'transit': init_transit,
                'transit_weight': init_weight,
            }

        my_learner = get_learner(response['learner'], my_learners)
        my_card = get_card(response['card'], my_cards)

        response['prev_learned'] = my_learner['learned']

        c = update(learned=my_learner['learned'],
                   guess=my_card['guess'],
                   guess_weight=my_card['guess_weight'],
                   slip=my_card['slip'],
                   slip_weight=my_card['slip_weight'],
                   transit=my_card['transit'],
                   score=response['score'],
                   time=response['time'],
                   prev_time=prev_response['time'],
                   prev_transit=prev_card['transit'],
                   prev_transit_weight=prev_card['transit_weight'],
                   prev_card_pre_learned=prev_response['prev_learned'])

        my_learner['learned'] = c['learned']
        my_card['guess'] = c['guess']
        my_card['guess_weight'] = c['guess_weight']
        my_card['slip'] = c['slip']