Esempio n. 1
0
def tuplesListToPrettyText(points, distribution=[99, 90]):
    '''
    Convert a list of tuples -- data points -- to a list of colorized strings based
    on the provided distribution.
    '''
    lines = []
    for point in points:
        line = ""
        for i in range(len(point) - 1):
            line = line + str(point[i]) + " "
        line = line + str(point[-1])
        lines.append(LongBow.scoreBuilder(distribution, point[-1], line))
    return lines
Esempio n. 2
0
def tuplesListToPrettyText(points, distribution = [99, 90]):
    '''
    Convert a list of tuples -- data points -- to a list of colorized strings based
    on the provided distribution.
    '''
    lines = []
    for point in points:
        line = ""
        for i in range(len(point) - 1):
            line = line + str(point[i]) + " "
        line = line + str(point[-1])
        lines.append(LongBow.scoreBuilder(distribution, point[-1], line))
    return lines