bin/base36-to-uuid @ 36b1fd1bcdbd

Dont run things multiple times
author Steve Losh <steve@stevelosh.com>
date Wed, 25 Jul 2018 15:29:36 +0000
parents e6f6389e598f
children (none)
#!/usr/bin/env python

import sys, uuid

s = ''
if len(sys.argv) != 2 or sys.argv[1] == '-':
    s = sys.stdin.read().strip()
else:
    s = sys.argv[1]

print uuid.UUID(hex(int(s, 36))[2:-1].zfill(32))