A ruby version of calculating chatango server weights