Skip to content

Instantly share code, notes, and snippets.

@nachtmaar
Created December 9, 2021 20:04
Show Gist options
  • Save nachtmaar/9a09d9ee839278a0b72be690ed1403f6 to your computer and use it in GitHub Desktop.
Save nachtmaar/9a09d9ee839278a0b72be690ed1403f6 to your computer and use it in GitHub Desktop.
A script to randomly choose a hostname based on the list of star constellations
```python
# based on this list https://starchild.gsfc.nasa.gov/docs/StarChild/questions/88constellations.html
import random
x="Andromeda\tPrincess of Ethiopia\nAntlia\tAir pump\nApus\tBird of Paradise\nAquarius\tWater bearer\nAquila\tEagle\nAra\tAltar\nAries\tRam\nAuriga\tCharioteer\nBootes\tHerdsman\nCaelum\tGraving tool\nCamelopardalis\tGiraffe\nCancer\tCrab\nCanes Venatici\tHunting dogs\nCanis Major\tBig dog\nCanis Minor\tLittle dog\nCapricornus\tSea goat\nCarina\tKeel of Argonauts' ship\nCassiopeia\tQueen of Ethiopia\nCentaurus\tCentaur\nCepheus\tKing of Ethiopia\nCetus\tSea monster (whale)\nChamaeleon\tChameleon\nCircinus\tCompasses\nColumba\tDove\nComa Berenices\tBerenice's hair\nCorona Australis\tSouthern crown\nCorona Borealis\tNorthern crown\nCorvus\tCrow\nCrater\tCup\nCrux\tCross (southern)\nCygnus\tSwan\nDelphinus\tPorpoise\nDorado\tSwordfish\nDraco\tDragon\nEquuleus\tLittle horse\nEridanus\tRiver\nFornax\tFurnace\nGemini\tTwins\nGrus\tCrane\nHercules\tHercules, son of Zeus\nHorologium\tClock\nHydra\tSea serpent\nHydrus\tWater snake\nIndus\tIndian\nLacerta\tLizard\nLeo\tLion\nLeo Minor\tLittle lion\nLepus\tHare\nLibra\tBalance\nLupus\tWolf\nLynx\tLynx\nLyra\tLyre or harp\nMensa\tTable mountain\nMicroscopium\tMicroscope\nMonoceros\tUnicorn\nMusca\tFly\nNorma\tCarpenter's Level\nOctans\tOctant\nOphiuchus\tHolder of serpent\nOrion\tOrion, the hunter\nPavo\tPeacock\nPegasus\tPegasus, the winged horse\nPerseus\tPerseus, hero who saved Andromeda\nPhoenix\tPhoenix\nPictor\tEasel\nPisces\tFishes\nPiscis Austrinus\tSouthern fish\nPuppis\tStern of the Argonauts' ship\nPyxis\tCompass on the Argonauts' ship\nReticulum\tNet\nSagitta\tArrow\nSagittarius\tArcher\nScorpius\tScorpion\nSculptor\tSculptor's tools\nScutum\tShield\nSerpens\tSerpent\nSextans\tSextant\nTaurus\tBull\nTelescopium\tTelescope\nTriangulum\tTriangle\nTriangulum Australe\tSouthern triangle\nTucana\tToucan\nUrsa Major\tBig bear\nUrsa Minor\tLittle bear\nVela\tSail of the Argonauts' ship\nVirgo\tVirgin\nVolans\tFlying fish\nVulpecula\tFox"
print(random.choices(list(map(lambda xx: xx.split("\t")[0], x.split("\n"))))[0])
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment