def create_weighted_list(peoplex, no_showx):
    """
    Function to create a list using weights (avoiding no shows)
    :param peoplex:
    :param no_showx:
    :return:
    """
    jc_listx = []
    for name in peoplex:
        if peoplex[name] == 0:
            continue
        if peoplex[name] in no_showx:
            continue
        else:
            jc_listx += [name] * peoplex[name]
    return jc_listx