shi'aa

Do not care when you associate with the intelligent even if you are deprived of his generosity. You may benefit by his intelligence, but be cautions of his ill manners.
Do not neglect associating with the generous even if you are deprived of benefiting by his intelligence. You may benefit by his generosity for your mind.
Escape as remote as possible from the mean foolish individuals.
— 

Imam Ali Amirul Mu'mineen (as)

Tuhaf al Uqool