def hr_bytes(n):
    """  
    Human readable bytes value

    Notes:
        http://code.activestate.com/recipes/578019

    Args:
        n (int): bytes

    Returns:
        string: human readable bytes value
    """
    symbols = (u'K', u'M', u'G', u'T', u'P', u'E', u'Z', u'Y')
    prefix = {} 

    for i, s in enumerate(symbols):
        prefix[s] = 1 << (i + 1) * 10 

    for s in reversed(symbols):
        if n >= prefix[s]:
            value = float(n) / prefix[s]
            return u'%.1f%s' % (value, s)

    return u'%sB' % n