Skip to content

Instantly share code, notes, and snippets.

View lipeck's full-sized avatar
💖

lisa schloegel peck lipeck

💖
View GitHub Profile
@chrisjsimpson
chrisjsimpson / dms2dec.py
Created April 1, 2019 12:17 — forked from jeteon/dms2dec.py
Convert coordinates in DMS notation to decimal in Python.
#!/env/python
# coding=utf8
"""
Converting Degrees, Minutes, Seconds formatted coordinate strings to decimal.
Formula:
DEC = (DEG + (MIN * 1/60) + (SEC * 1/60 * 1/60))
Assumes S/W are negative.
@Grimthorr
Grimthorr / directory-inventory.py
Last active January 6, 2025 20:06
Python script to generate a text file listing all files from a given directory (including those in sub-folders).
#!/usr/bin/python
import os
# start editable vars #
outputfile = "~/inventory.txt" # file to save the results to
folder = "~/test" # the folder to inventory
exclude = ['Thumbs.db','.tmp'] # exclude files containing these strings
pathsep = "/" # path seperator ('/' for linux, '\' for Windows)
# end editable vars #