Code for TasP and Early Infection paper