Skip to content

Instantly share code, notes, and snippets.

@jmelesky
jmelesky / runningavg.py
Created October 20, 2011 04:25 — forked from schmichael/runningavg.py
Handy script for calculating averages streamed via stdin
#!/usr/bin/env python
import sys
import math
CHUNK = 100
if len(sys.argv) > 1:
CHUNK = int(sys.argv[1])
s = 0
#!/usr/bin/env python
# on a unix-type system, it runs like this:
# ./parse_csv.py INPUTFILE > OUTPUTFILE
# where INPUTFILE is a .csv file like the dump we were given
# it creates OUTPUTFILE, which is a .csv file like the input file,
# but with the additional parsed-out fields (OWNER_ADDR,
# OWNER_APT_SUITE, SITE_ADDR, and SITE_APT_SUITE).
import sys
-- Make changes to the table that we created in the ESRI model builder script
-- Eden contains null values set metro empty values to null so they will match during union
UPDATE sde_vector.cowgis.GG_TEMP_TAXLOTS_METRO
SET RNO = NULL
WHERE RNO = ''
-- Eden contains null values set metro empty values to null so they will match during union
UPDATE sde_vector.cowgis.GG_TEMP_TAXLOTS_METRO
SET OWNER1 = NULL
WHERE OWNER1 = ''
-- Eden contains null values set metro empty values to null so they will match during union
-- Make changes to the table that we created in the ESRI model builder script
-- Eden contains null values set metro empty values to null so they will match during union
UPDATE sde_vector.cowgis.GG_TEMP_TAXLOTS_METRO
SET RNO = NULL
WHERE RNO = ''
-- Eden contains null values set metro empty values to null so they will match during union
UPDATE sde_vector.cowgis.GG_TEMP_TAXLOTS_METRO
SET OWNER1 = NULL
WHERE OWNER1 = ''
-- Eden contains null values set metro empty values to null so they will match during union