You can find the code that we present in this chapter at our GitHub repository, at https://github.com/PacktPublishing/OpenCV-4-with-Python-Blueprints-Second-Edition/tree/master/chapter8.
Other than that, you should download the Haar cascade files from the official OpenCV repository at https://github.com/opencv/opencv/blob/master/data/haarcascades/, or copy them from the installation directory of your machine to the project repository.