def buildMatrixFromLists(lists, dtype=numpy.float, default=None):

    all_rows = collections.defaultdict()
    for l in lists:
        all_rows.update([(x[0], 0) for x in l])
    for x, v in enumerate(all_rows.iteritems()):
        all_rows[v[0]] = x

    matrix = numpy.zeros((len(all_rows), len(lists)), dtype=dtype)
    if default:
        matrix.fill(default)

    for col, l in enumerate(lists):
        for row, value in l:
            matrix[all_rows[row], col] = value
    return matrix, all_rows.keys()
Return detection of any Game Console
dataset/ETHPy150Open CGATOxford/cgat/CGAT/MatrixTools.py/buildMatrixFromLists--crossover with--dataset/ETHPy150Open viewfinderco/viewfinder/backend/www/mdetect.py/UAgentInfo.detectGameConsole