Skip to content

Instantly share code, notes, and snippets.

@lorin
Created October 28, 2015 04:14
Show Gist options
  • Save lorin/0719235506acc6762f30 to your computer and use it in GitHub Desktop.
Save lorin/0719235506acc6762f30 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
'''
Generate a random amazon instance id
'''
import random
# pyclip-copycat
import clipboard
population = '1234567890abcdef'
s = 'i-' + ''.join([random.choice(population) for _ in range(8)])
clipboard.copy(str.encode(s))
print(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment