"And the wise shall shine" (Daniel 12:3) - this refers to a judge who renders a true judgment in accordance with its truth. "And they that turn the many to righteousness" - these are the collectors of charity. In a baraita it was taught: "And the wise" - this is a judge and a charity collector; "and they that turn the many to righteousness" - these are the teachers of young children, such as Rav Shmuel bar Shilat. And the Rabbis, what do they say? Ravina said: "and they that love Him shall be as the sun when it goes forth in its might" (Judges 5:31).
The Wise Who Shine as Judges, Teachers, and Charity Collectors
Yalkut Shimoni on Nach 59:3
והמשכילים יזהירו זה דיין שדן דין אמת לאמתו. ומצדיקי הרבים אלו גבאי צדקה, במתניתא תאנא והמשכילים זה דיין וגבאי צדקה. ומצדיקי הרבים אלו מלמדי תינוקות כגון רב שמואל בר שילת. ורבנן מאי אמר רבינא ואוהביו כצאת השמש בגבורתו: