# Path: Qt.py



import random
import simplejson
import ts2.xobjects.xsettings
from Qt import QtCore
    """File format exception."""
    def __init__(self, arg):
        """Constructor of the FormatException class."""
        super().__init__(arg)


class MissingDependencyException(Exception):
    """Exception raised when a dependency is missing (e.g. TSL file)."""
    def __init__(self, arg):
        """Constructor of the MissingDependencyException class."""
        super().__init__(arg)


def cumsum(lis):
    """Cumulated sum of a list

    :param: the list to cumulatively sum.
    :return: an iterator with each item being the cumulated sum of all the
             items of the original list up to this index.
    """
    summ = 0
    for x in lis:
        summ += x
        yield summ


class DurationProba(QtCore.QObject):
    """A DurationProba is a probability distribution for a duration in
    seconds. This class is used to have random delays of trains."""


# Path: Qt.py



# Path: ts2/utils.py
import random
import simplejson
import ts2.xobjects.xsettings
from Qt import QtCore

    """File format exception."""
    def __init__(self, arg):
        """Constructor of the FormatException class."""
        super().__init__(arg)


class MissingDependencyException(Exception):
    """Exception raised when a dependency is missing (e.g. TSL file)."""
    def __init__(self, arg):
        """Constructor of the MissingDependencyException class."""
        super().__init__(arg)


def cumsum(lis):
    """Cumulated sum of a list

    :param: the list to cumulatively sum.
    :return: an iterator with each item being the cumulated sum of all the
             items of the original list up to this index.
    """
    summ = 0
    for x in lis:
        summ += x
        yield summ


class DurationProba(QtCore.QObject):
    """A DurationProba is a probability distribution for a duration in
    seconds. This class is used to have random delays of trains."""


    def __init__(self, data):