Skip to content

Instantly share code, notes, and snippets.

@omas-public
Last active April 24, 2025 04:44
Show Gist options
  • Save omas-public/21249d9ebf60649f2053769db0744052 to your computer and use it in GitHub Desktop.
Save omas-public/21249d9ebf60649f2053769db0744052 to your computer and use it in GitHub Desktop.
# 1 ビット変換関数
to_bit = lambda c: '1' if c.isupper() else '0'
apply = lambda fun, text : map(fun, text)
to_matrix = lambda array: [array[i: i+ 8] for i in range(0, len(array), 8)]
to_byte = lambda matrix: [''.join(array) for array in matrix]
to_char = lambda byte: chr(int(byte, 2))
result = apply(to_char, )
text = 'tIvolFLgqDzvIUnifAwfnenAtJskbNBMpAAEIxUXpeFPJbnepKPWBcmBkAIzGAShjJdxkoynfXBDehUtiDVTLjeFaUnRQJCEjREfNWRwqRaGkAaHlKVrOOoGjpUJfBSygOLotGcJuMrHomUbpCJZGNaX'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment