# Path: Qt.py



import random
import simplejson
import ts2.xobjects.xsettings
from Qt import QtCore
        return str(self._probaList)

    def list(self):
        """Returns the DurationProba list"""
        return self._probaList

    def isNull(self):
        """
        :return: True if the DurationProba instance has no data.
        :rtype bool:
        """
        return self._probaList is None

    def yieldValue(self):
        """Returns a random value in the bounds and probabilities given by
        this DurationProba instance.

        This is done in two steps:
        - First we take a random number to determine the segment (tuple) in
          which we should be according to our _probaList.
        - Then we take a second random number to get our value inside the
          selected segment (with even probability).
        """
        try:
            probas = list(cumsum([t[2] for t in self._probaList]))
            probas.insert(0, 0)
        except TypeError:
            # We have a value instead of a list
            return self._probaList
        except Exception as err:

# Path: Qt.py



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

        return str(self._probaList)

    def list(self):
        """Returns the DurationProba list"""
        return self._probaList

    def isNull(self):
        """
        :return: True if the DurationProba instance has no data.
        :rtype bool:
        """
        return self._probaList is None

    def yieldValue(self):
        """Returns a random value in the bounds and probabilities given by
        this DurationProba instance.

        This is done in two steps:
        - First we take a random number to determine the segment (tuple) in
          which we should be according to our _probaList.
        - Then we take a second random number to get our value inside the
          selected segment (with even probability).
        """
        try:
            probas = list(cumsum([t[2] for t in self._probaList]))
            probas.insert(0, 0)
        except TypeError:
            # We have a value instead of a list
            return self._probaList
        except Exception as err:

            QtCore.qDebug(str(err))