The Raspberry Pi is a wonderful platform for DIY electronics and coding projects. This Raspberry Pi Card Shuffler is well worth checking out. It is a 3D printed smart card shuffler with OpenCV that can rig the deck to deal winning hands.
You are going to need 3x Nema 17 stepper motors, a Pi, 1 x Pi Camera, Adafruit Feather, LEDs, and a few other components to complete this project. The code is available on GitHub.