Skip to content

Instantly share code, notes, and snippets.

@ocavue
Created July 18, 2018 05:51
Show Gist options
  • Select an option

  • Save ocavue/e611fc0c588f9c5e69288918e9cd1163 to your computer and use it in GitHub Desktop.

Select an option

Save ocavue/e611fc0c588f9c5e69288918e9cd1163 to your computer and use it in GitHub Desktop.
import random
from itertools import permutations
import json
def main():
chars = [chr(i) for i in range(ord("A"), ord("Z") + 1)]
random.seed("ABCD")
keys = ["".join(pair) for pair in permutations(chars, 3)]
random.shuffle(keys)
values = ["".join(pair) for pair in permutations(chars, 3)]
random.shuffle(values)
keys = keys[:1000]
values = values[:1000]
result = {}
for k, v in zip(keys, values):
result[k] = v
with open('./__logo.json', 'w') as f:
f.write(json.dumps(result))
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment