How to remove the gravity from accelerometer

What I am trying to say is that for example, I am not sure about which one of your codes that you gently give me I have to use( MPU6050_MahonyIMU.ino or MPU6050_Mahony_calgyro.ino or MPU6050_gyro_only.ino). Furthermore, I think that I have to change the adresses of MPU that you use because my sensor is different, isn't right? And for this reason why, maybe I have to include also the LSM6DS3 library.
I know, maybe they could be stupid questions, but I am still not so flexible in this way. Forgive me.