This verse is from the Bhagavad Gita, Chapter 6, Verse 9. It is written in Sanskrit and translates to English as follows:
suhṛin-mitrāryudāsīna-madhyastha-dveṣhya-bandhuṣhu |
sādhuṣhvapi cha pāpeṣhu sama-buddhir viśhiṣhyate ||
"The yogis view everyone – whether they are supporters, allies, adversaries, the virtuous, or the sinful – with an unbiased mindset. A yogi who maintains an equal attitude towards friends, companions, and foes, remains neutral amidst enemies and relatives, and does not discriminate between the righteous and the sinful, is regarded as exceptional among humanity."
"The yogi is said to be integrated when they are satisfied within themselves with the knowledge and wisdom, remaining unshaken like a clod of earth, a stone, or gold, having conquered the senses."
su-hṛit—toward the well-wishers;
mitra—friends;
ari—enemies;
udāsīna—neutral persons;
madhya-stha—mediators;
dveṣhya—the envious;
bandhuṣhu—relatives;
sādhuṣhu—pious;
api—as well as;
cha—and;
pāpeṣhu—the sinners;
sama-buddhiḥ—of impartial intellect;
viśhiṣhyate—is distinguished