Skip to content

Instantly share code, notes, and snippets.

Scaled_Residual,X,Y,Local_Std_Error,Vertical_Std_Error,Unscaled_Residual
97,314430.000,1605270.000,3048.00,3064.27,16.27
75,314550.000,1605270.000,3048.00,3064.27,16.27
33,314490.000,1605270.000,3048.00,3064.27,16.27
12,250410.000,1659810.000,3044.74,3047.10,2.36
12,244410.000,1670550.000,3035.15,3036.42,1.27
12,336090.000,1601070.000,13.61,14.79,1.18
-8,205650.000,1649130.000,32000.00,29985.86,-2014.14
-8,213690.000,1624110.000102000.00100047.75,-1952.25
import sys
from osgeo import ogr
def main(in_file, in_format, out_file, out_format):
in_ds = ogr.GetDriverByName(in_format).Open(in_file)
out_ds = ogr.GetDriverByName(out_format).CopyDataSource(in_ds, out_file)
if __name__ == '__main__':
main(*sys.argv[1:])
Python 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> my_list = 'one two tee'.split()
>>>
>>> my_list
['one', 'two', 'tee']
>>>
>>> [print x for x in my_list]
File "<stdin>", line 1
@maphew
maphew / gist:80ddc91daa44424cf951
Created February 27, 2015 16:45
simple ArcInfo GENERATE file
//Polygon
1, 0
253563.7471, 1327293.189, None, None
203563.7471, 1327293.189, None, None
203563.7471, 1377293.189, None, None
253563.7471, 1377293.189, None, None
253563.7471, 1327293.189, None, None
END
END
# ==========================================================================
#
# Script Name: Install-Programs.ps1
#
# Author: Andy Parkhill
#
# Date Created: 27/03/2014
#
# Description: A simple environment setup script for my personal laptop.
#
debug = True
try:
their_md5 = 'c38f03d2b7160f891fc36ec776ca4685'
my_md5 = 'c64e53bbb108a1c65e31eb4d1bb8e3b7'
if their_md5 != my_md5:
raise ValueError('md5 sum does not match!')
except:
if debug:
import sys
debug = True
def exceptionHandler(exception_type, exception, traceback, debug_hook=sys.excepthook):
'''Print user friendly error messages normally, full traceback if DEBUG on.
Adapted from http://stackoverflow.com/questions/27674602/hide-traceback-unless-a-debug-flag-is-set
'''
if debug:
print '\n*** Error:'
# raise
@maphew
maphew / apt-dev_2014-Nov-01.leo
Created November 4, 2014 18:12
apt-dev.leo 2014 Oct-31 and Nov-01
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by Leo: http://leoeditor.com/leo_toc.html -->
<?xml-stylesheet ekr_test?>
<leo_file xmlns:leo="http://leoeditor.com/namespaces/leo-python-editor/1.1" >
<leo_header file_format="2" tnodes="0" max_tnode_index="0" clone_windows="0"/>
<globals body_outline_ratio="0.5" body_secondary_ratio="0.5">
<global_window_position top="50" left="50" height="500" width="700"/>
<global_log_window_position top="0" left="0" height="0" width="0"/>
</globals>
<preferences/>
; 2014-Feb-27: as seen at http://www.autohotkey.com/board/topic/102227-gmailkeys-for-outlook-2013/
;*******************************************************************************
; Information
;*******************************************************************************
; AutoHotkey Version: 3.x
; Language: English
; Platform: XP/Vista/7
; Updated by: Toby Garcia
; Previously updated by: Ty Myrick
@maphew
maphew / simple_tissot.topojson
Created December 21, 2013 00:13
Tissot error ellipses (simple kind, not accurate)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.