ICP/SNS staking rewards calculation?

Anybody have the calculation scripts for ICP and SNS projects?