Code for finding the core/periphery split of a network