A python lib for generate random string and digits and special characters or A combination of them

a python lib for generate random string and digits and special characters or A combination of them installation 🛠 pip install python-random-strings options 🖇 Random Lower Case Random Upper Case Random Letters Random Digits Random Hex Digits Random Oct Digits Random Punctuation Random Printable Sample Code ✏️ from python_random_strings import random_strings a = random_strings.random_lowercase(6) print(a) a = random_strings.random_uppercase(6) print(a) a = random_strings.random_letters(6) print(a) a = random_strings.random_digits(6) print(a) a = random_strings.random_hexdigits(6) print(a) a = random_strings.random_octdigits(6) print(a) a = random_strings.random_punctuation(6) print(a) a […]

Read more

SIMD-accelerated bitwise hamming distance Python module for hexidecimal strings

SIMD-accelerated bitwise hamming distance Python module for hexidecimal strings What does it do? This module performs a fast bitwise hamming distance of two hexadecimal strings. This looks like: DEADBEEF = 11011110101011011011111011101111 00000000 = 00000000000000000000000000000000 XOR = 11011110101011011011111011101111 Hamming = number of ones in DEADBEEF ^ 00000000 = 24 This essentially amounts to >>> import gmpy >>> gmpy.popcount(0xdeadbeef ^ 0x00000000) 24 except with Python strings, so >>> import gmpy >>> gmpy.popcount(int(“deadbeef”, 16) ^ int(“00000000”, 16)) 24 A few assumptions are made […]

Read more