Skip to content

matthewdeanmartin/random_names

Repository files navigation

random_names

Convert int to random name, like tree_dance and convert it back to same int.

Like git-name which converts hashes to memorable names and back.

Also like the Mnemonic Major System which converts strings of numbers it phrases to aid in memorization, implemented here mnemonic-major-encoder In action here: https://major-system.info/en/

Usage

from random_names.make_names import number_to_name,number_from_name

# TODO: needs a user specified separator
name = number_to_name(100,"prefix","q")
print(name) # prefix_q_activated

number = number_from_name(name)
assert number==100

Why

Lets say that your users need to type in a long number, 48342342. It would be easier to type in tree_dance. But your app still needs that number, so you need to convert it back. This is similar to docker container names, except reversable.

How

I map 10,000 words to 4 digits, twice. That yields two words covering 100,000,000 numbers.

If you use a short word list, you can't generate enough names.

If you use any dictionary, you get a lot of funny, obscene or offensive names. So I ran the world list through cuss word detection & removed most of the worst.

Docs

Related Pypi Packages

Crypocurrency related

  • mnemonic Words to cryptocurrency "wallet"

Mneumonic Major System

Converting arabic numbers, e.g. 22, to spoken equivalent, e.g. twenty-two and back.

Converting numbers to a shorter string, like Ascii85

Random names, just random names. No way to convert to a number

  • pypi search To many to list, mostly just a function or two.

About

Convert int to random name, like tree_dance and convert it back to same int.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published