Skip to content

Instantly share code, notes, and snippets.

@miketaylr miketaylr/

Last active Aug 14, 2018
What would you like to do?
import webbrowser
# starting from
new_path = 2 ** 38
new_url = "{}.html".format(new_path)
# takes me to
import string
import webbrowser
scrambled = """
g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.
# k->m
# o->q
# e->g
# mapping from N to N+2 in the alphabet.
start = string.ascii_lowercase
finish = string.ascii_lowercase[2:] + string.ascii_lowercase[:2]
table = str.maketrans(start, finish)
#prints i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url.
url = "map"
new_url = "{}.html".format(url.translate(table))
# wowowow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.