Skip to content

Instantly share code, notes, and snippets.

View tjmichael81's full-sized avatar

Timothy Michael tjmichael81

View GitHub Profile
@tjmichael81
tjmichael81 / gist:5fb2db28a61035339a19
Created May 7, 2014 20:00
Get public IP address with Python
import urllib
import json
conn = urllib.urlopen('http://httpbin.org/ip')
print json.load(conn)['origin']
@tjmichael81
tjmichael81 / gist:7982540
Created December 16, 2013 05:00
Export Esri geodatabase feature attachments with Python
def main():
pass
import arcpy
import os
#Script Variables
sourceAttachmentTable = r'C:\TEMP\Database.gdb\AttachmentTable__ATTACH'
targetOutputFolder = r'C:\TEMP\AttachmentExport'
filePathAttribute = 'FILE_PATH'