MPU6050 code explanation

Why doing you start by explaining to us all the lines that you do understand? Then perhaps someone will help with the rest.

Steve