For the source text click/tap here: Sanhedrin 24
To download, click/tap here: PDF
The Mishna on our daf lists people who will not be accepted as witnesses in a Jewish court, because they are involved in monetary shenanigans that are forbidden by the Sages.
These people include dice players, money lenders who take interest, people who gamble on pigeon races, and those who market produce from the Sabbatical year. Rabbi Yehuda says: ba-meh devarim amurim – “under what circumstances is this rule taught?” When this is their livelihood.
If a person has another occupation and participates in these activities only occasionally, then he still could be trusted as a witness in court.