Ahmad Ibn Harb رحمه الله said:
“There is nothing more beneficial to a Muslim’s heart than to mix with the righteous and to watch their actions, while nothing is more harmful to the heart than mixing with the sinners and watching their actions.”
[Al-Bayhaqi, Al-Zuhd Al-Kabeer, p.100]