def add_top_pairs(dry_run=False, pair_now=False):
    """ Pairs up the top twenty models against each other.
    #1 plays 2,3,4,5, #2 plays 3,4,5,6 etc. for a total of 15*4 matches.

    Default behavior is to add the pairs to the working pairlist.
    `pair_now` will immediately create the pairings on the cluster.
    `dry_run` makes it only print the pairings that would be added
    """
    top = ratings.top_n(15)
    new_pairs = []
    for idx, t in enumerate(top[:10]):
        new_pairs += [[t[0], o[0]] for o in top[idx+1:idx+5]]

    if dry_run:
        print(new_pairs)
        return

    if pair_now:
        maybe_enqueue(new_pairs)
    else:
        _append_pairs(new_pairs)
def add_top_pairs ( dry_run = False , pair_now = False ) : top = ratings . top_n ( 15 ) new_pairs = [ ] for idx , t in enumerate ( top [ : 10 ] ) : new_pairs += [ [ t [ 0 ] , o [ 0 ] ] for o in top [ idx + 1 : idx + 5 ] ] if dry_run : print ( new_pairs ) return if pair_now : maybe_enqueue ( new_pairs ) else : _append_pairs ( new_pairs )
Pairs up the top twenty models against each other.
    #1 plays 2,3,4,5, #2 plays 3,4,5,6 etc. for a total of 15*4 matches.

    Default behavior is to add the pairs to the working pairlist.
    `pair_now` will immediately create the pairings on the cluster.
    `dry_run` makes it only print the pairings that would be added