Skip to content

Instantly share code, notes, and snippets.

View altwitt's full-sized avatar

Harrison Witt altwitt

  • Geospatial Developer
  • Memphis, TN
  • 21:29 (UTC -06:00)
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@altwitt
altwitt / progress_bar.py
Created August 18, 2018 19:00
Awesome command-line animated progress bar written in python
#!/usr/bin/env python
#
# Corey Goldberg - 2010
# ascii command-line progress bar with percentage and elapsed time display
#
import sys
import time
@altwitt
altwitt / json_to_xml.py
Created August 18, 2018 18:54
Two-way conversion between json and xml
import json
import xmltodict
with open('sample.json', 'r') as f:
jsonString = f.read()
print('JSON input (sample.json):')
print(jsonString)
xmlString = xmltodict.unparse(json.loads(jsonString), pretty=True)