Maximum entropy principles for disordered spins