Python script for computing metrics
some script examples from Yibiao Yang