Those are the examples of Hands-On GPU Programming with Python and CUDA book ISBN 978-1-78899-391-3.
Th exampels are update for Python 3.7 and Cuda 10.2, as the original examples were for Python 2 and Cuda 8/9 I guess
or the book is also hosted on GitHub at /Hands-On-GPU-Programming-with-Python 3-and-CUDA 10.2
Python