A secular code for calculating the evolution of hierarchical triple systems