def cooc_simple(model, given_items):
    # here we check that this is right type of model
    R = model.P()

    P = np.true_divide ( rated_X_and_Y(R,given_items) , 
                           rated_X(R,given_items) )

    # cooccurence algorithms assume the given items aren't scored
    # -1 is used because if there's less than n suggestions, 0s can also be recommended
    P[range(len(given_items)),given_items] = -1

    return P
Mark the status of instance disks active.
dataset/ETHPy150Open ksavenkov/recsys-001/recsys/score.py/cooc_simple--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/config/__init__.py/ConfigWriter.MarkInstanceDisksActive