def scale(value, input_low, input_high, output_low, output_high):
    """Scale a value from one range to another"""
    scaled_input = ((float(value) - input_low) / (input_high - input_low))
    return ((scaled_input) * (output_high - output_low)) + output_low