This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys,re | |
# more hacks | |
# remove the last two lines from the saved output | |
# psql | |
# > create database pkgs1; | |
# > \c pkgs1 | |
# pkgs1=# create table raw_parse (script_name text, action text, pkg_name text); | |
# pkgs1=# copy raw_parse from '/home/user/out1.csv' with CSV delimiter E'\t'; | |
# pkgs1=# select pkg_name from raw_parse group by pkg_name having every(action <> 'REMOVE') order by pkg_name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
##=========================================================== | |
## Import ACS 2012 1 year extension | |
## GPLv3 Oct 2013 -dbb | |
## | |
## Useage: python import_master_20121yr_8.py Sequence_Number_and_Table_Number_Lookup.txt work_dir | |
## assumes an existing database 'census_acs_2012' ; currently writes to public schema | |
## | |
## Note: results in ~1480 tables plus 1478 more per state, so | |
## max_locks_per_transaction must be manually increased |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
##=========================================================== | |
## Import ACS 2012 1 year extension | |
## GPLv3 Oct 2013 -dbb | |
## | |
## Useage: python import_master_20121yr_9.py Sequence_Number_and_Table_Number_Lookup.txt work_dir | |
## assumes an existing database 'census_acs_2012' ; currently writes to public schema | |
## | |
## Note: results in ~1480 tables plus 1478 more per state, so | |
## max_locks_per_transaction must be manually increased |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tSQL = ''' | |
drop table if exists region_{0}_grid cascade; | |
create table region_{0}_grid as | |
select distinct on (g.gridcode) g.gridcode as gid, | |
st_transform( ST_GeometryN(g.the_geom,1), 4326)::geometry(Polygon,4326) as geom | |
from grid150m_uniq g, | |
tl_2010_06_county10_3310 c, region_defs r | |
where st_intersects( g.the_geom, c.geom ) AND | |
c.countyfp10 = r.fips AND | |
r.region_id = {0}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psycopg2 | |
import random | |
conn = psycopg2.connect( 'dbname=ta_test' ) | |
curs = conn.cursor() | |
tSQL_create0 = ''' | |
drop table if exists tta cascade; | |
create table tta ( tta_item integer, pkey serial); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2013 Brian Hamlin - darkblueb | |
# Copyright (c) 2013 The Open Source Geospatial Foundation. | |
# Licensed under the GNU LGPL version >= 2.1. | |
# | |
# This library is free software; you can redistribute it and/or modify it | |
# under the terms of the GNU Lesser General Public License as published | |
# by the Free Software Foundation, either version 2.1 of the License, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psycopg2 | |
import time | |
conn = psycopg2.connect("dbname=text_test0") | |
curs = conn.cursor() | |
base_chars = ( 'A','C','G','T','U') | |
base_strs_t = ( | |
'AACGTAACGTAACGTAACGTAACGTAACGTAACGTAACGT', |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cartopy,click | |
imposm | |
iris | |
descartes | |
eoxserver | |
fiona | |
geoexplorer,geolinks | |
geopandas,geoserver | |
gps,geonode | |
kmlbase,kmldom,kmlengine |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer