Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
ENCRYPTED_MESSAGE = ""
DECRYPTION_KEY_TOP = "A|B|C|D|E|F|G|H|I|J|K|L|M"
DECRYPTION_KEY_BOTTOM = "N|O|P|Q|R|S|T|U|V|W|X|Y|Z"
decrypted_message = ""
for letter in ENCRYPTED_MESSAGE:
find_1 = DECRYPTION_KEY_BOTTOM.find(letter.upper())
find_2 = DECRYPTION_KEY_TOP.find(letter.upper())
@kingds
kingds / protrails_to_gpx.py
Created September 19, 2016 01:08
Python script for converting sets of GPS coordinates from protrails.com into a GPX file which can be loaded onto a GPS device.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This is a script for converting coordinates from a protrails.com trail description into a
# gpx file that can be loaded onto a GPS device.
# In order to use it, copy and paste the coordinates from the protrails map page (not the
# main page for the hike, but the page with the link "Interactive GPS Topo Map") into an input
# file. Run the script with # python protrails_to_gpx.py <input file> <output file> <route name>
from lxml import etree as tree