A python implementation of rating systems