Is this in retaliation for a federal judge ruling three days ago that Trump's pause on Diversity Visa processing was unlawful?

Or is this in retaliation for a federal judge ruling 6 days ago that Trump's ban on immigration from 75 countries was unlawful?

Yes.