Randomness versus quasi-periodicity