You could still see people doing this for tips in Rawalpindi, Pakistan back in the early 2000s. A buddy of mine snapped this while we watched. The trick is simple enough to figure out -- the snakes are curled in the baskets in a way that restricts them from striking. But I wouldn't want to do it myself.
I have a tip I can give them...