Python programs for calculating degree distributions of graphs and applying for several issues