Skip to content

Instantly share code, notes, and snippets.

@austinschwartz
Created February 7, 2017 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save austinschwartz/1ca8e5359041429e2bd2d5837766bc94 to your computer and use it in GitHub Desktop.
Save austinschwartz/1ca8e5359041429e2bd2d5837766bc94 to your computer and use it in GitHub Desktop.
Tells you what lab you're in @ Purdue (Haas/Lawson)
#!/usr/bin/env python3
import socket
host=socket.gethostname().split(".")[0]
if host.startswith("pod"):
print("LWSN B148")
elif host.startswith("xinu"):
print("HAAS 257")
elif host.startswith("borg"):
print("HAAS G040")
elif host.startswith("moore"):
print("LWSN B146")
elif host.startswith("sslab"):
print("LWSN B158")
elif host.startswith("escher"):
print("HAAS G056")
else:
print("???")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment