def rle(iterable):
    iterable = iter(iterable)
    runlen = 1
    result = []
    try:
        previous = iterable.next()
    except StopIteration:
        return []
    for element in iterable:
        if element == previous:
            runlen = runlen + 1
            continue
        else:
            if isinstance(previous, (types.ListType, types.TupleType)):
                previous = rle(previous)
            result.append([previous, runlen])
        previous = element
        runlen = 1
    if isinstance(previous, (types.ListType, types.TupleType)):
        previous = rle(previous)
    result.append([previous, runlen])
    return result
Returns the slave prefix for this temperature sensor
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/python/dxprofile.py/rle--crossover with--dataset/ETHPy150Open timofurrer/w1thermsensor/w1thermsensor/core.py/W1ThermSensor.slave_prefix