def chunk(seq, count):
    """Splits given sequence to n chunks as evenly as possible.

    Args:
        seq: Sequence to split
        count: Number of chunks

    Returns:
        List of chunks
    """
    avg = len(seq) / float(count)
    res = []
    i = 0.0

    while i < len(seq):
        res.append(seq[int(i):int(i + avg)])
        i += avg

    return res