def _human_st_mode(self, mode):
        hr = ''
        if os.path.stat.S_ISREG(mode):
            hr = '-'
        elif os.path.stat.S_ISLNK(mode):
            hr = 'l'
        elif os.path.stat.S_ISSOCK(mode):
            hr = 's'
        elif os.path.stat.S_ISDIR(mode):
            hr = 'd'
        elif os.path.stat.S_ISBLK(mode):
            hr = 'b'
        elif os.path.stat.S_ISFIFO(mode):
            hr = 'p'
        elif os.path.stat.S_ISCHR(mode):
            hr = 'c'
        else:
            hr = '-'

        for who in 'USR', 'GRP', 'OTH':
            for perm in 'R', 'W', 'X':
                if mode & getattr(os.path.stat, 'S_I' + perm + who):
                    hr += perm.lower()
                else:
                    hr += '-'

        return hr
Resample omega from its conditional Polya-gamma distribution
dataset/ETHPy150Open ziirish/burp-ui/burpui/misc/backend/burp2.py/Burp._human_st_mode--crossover with--dataset/ETHPy150Open HIPS/pgmult/pgmult/distributions.py/PGLogisticNormalMultinomial.resample_omega