zeeguu/core/word_scheduling/arts/bookmark_priority_updater.py
def _calculate_bookmark_priority(cls, x, max_iterations):
        """Calculate the (new) priority of a bookmark-exercise pair

        :param x: An instance of the bookmark-exercise information (PriorityInfo)
        :param max_iterations: The current amount of iterations/learning sessions (in the ArtsRT algorithm known as D)
        :return: The bookmark-exercise information (PriorityInfo) with a updated priority
        """
        if x.exercise is not None:

            if x.exercise.solving_speed > 0:
                x.priority = cls.algorithm_wrapper.calculate(x.exercise, max_iterations)

            else:
                # solving speed is -1 for the cases where there was some feedback
                # from the user (either that it's too easy, or that there's something
                # wrong with it. we shouldn't schedule the bookmark in this case.
                # moreover, even if we wanted we can't since there's a log of reaction
                # time somewhere and it won't work with -1!
                x.priority = PriorityInfo.NO_PRIORITY
        else:
            x.priority = PriorityInfo.MAX_PRIORITY
        return x
Calculate the (new) priority of a bookmark-exercise pair

        :param x: An instance of the bookmark-exercise information (PriorityInfo)
        :param max_iterations: The current amount of iterations/learning sessions (in the ArtsRT algorithm known as D)
        :return: The bookmark-exercise information (PriorityInfo) with a updated priority
        
Calculate the (new) priority of a bookmark-exercise pair
Calculate the ( new ) priority of a bookmark - exercise pair
def _calculate_bookmark_priority(cls, x, max_iterations):
        if x.exercise is not None:
            if x.exercise.solving_speed > 0:
                x.priority = cls.algorithm_wrapper.calculate(x.exercise, max_iterations)
            else:
                x.priority = PriorityInfo.NO_PRIORITY
        else:
            x.priority = PriorityInfo.MAX_PRIORITY
        return x
def _calculate_bookmark_priority ( cls , x , max_iterations ) : if x . exercise is not None : if x . exercise . solving_speed > 0 : x . priority = cls . algorithm_wrapper . calculate ( x . exercise , max_iterations ) else : x . priority = PriorityInfo . NO_PRIORITY else : x . priority = PriorityInfo . MAX_PRIORITY return x
Calculate the (new) priority of a bookmark-exercise pair
Calculate the ( new ) priority of a bookmark - exercise pair
"""Calculate the (new) priority of a bookmark-exercise pair

        :param x: An instance of the bookmark-exercise information (PriorityInfo)
        :param max_iterations: The current amount of iterations/learning sessions (in the ArtsRT algorithm known as D)
        :return: The bookmark-exercise information (PriorityInfo) with a updated priority
        """ # solving speed is -1 for the cases where there was some feedback # from the user (either that it's too easy, or that there's something # wrong with it. we shouldn't schedule the bookmark in this case. # moreover, even if we wanted we can't since there's a log of reaction # time somewhere and it won't work with -1!
The bookmark-exercise information (PriorityInfo) with a updated priority
The bookmark - exercise information ( PriorityInfo ) with a updated priority
cls
x
An instance of the bookmark-exercise information (PriorityInfo)
An instance of the bookmark - exercise information ( PriorityInfo )
max_iterations
The current amount of iterations/learning sessions (in the ArtsRT algorithm known as D)
The current amount of iterations / learning sessions ( in the ArtsRT algorithm known as D )