compute_weights.py