view lame.py @ 41:d129c3d0e920 draft default tip

planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
author richard-burhans
date Mon, 28 Jul 2025 14:35:28 +0000
parents
children
line wrap: on
line source

#!/usr/bin/env python3

for i in range(0, 16):
    hex_value = f"{i:0x}"
    bin_value = f"{i:04b}"
    ones = len(bin_value.replace("0", ""))

    print(f'{ones}')



# 0 0000 0
# 1 0001 1
# 2 0010 1
# 3 0011 2
# 4 0100 1
# 5 0101 2
# 6 0110 2
# 7 0111 3
# 8 1000 1
# 9 1001 2
# a 1010 2
# b 1011 3
# c 1100 2
# d 1101 3
# e 1110 3
# f 1111 4