This file contains hidden or 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
| # | |
| # This code was written to copy all the contents of specific NAIP directory | |
| # paths into a GCS Bucket | |
| # | |
| # Caveats: | |
| # | |
| # * This code assumes you have added NAIP as a Shared Folder in the | |
| # Favorites collection in My Collections | |
| # * This code is posted so that someone else doesn't need to do the dirty | |
| # work of figuring out Box's API to download NAIP data |
This file contains hidden or 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
| # MIT License | |
| # | |
| # Copyright (c) 2017 Daniele Andreis <daniele.andreis@gmail.com> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
This file contains hidden or 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
| Note that all file names use backslash instead of forwardslash to represent directories. | |
| Scripts are provided for Docker images to build Tensorflow, deploy Tensorflow and deploy RasterVision | |
| The general build flow is: | |
| 1. build conda docker image (conda\Dockerfile-conda) | |
| 2. (optional) build docker image for compiling Tensorflow 1.7 for CPU and GPU (configured for AWS) (tensorflow\Dockerfile-build-cpu and tensorflow\Dockerfile-build-gpu) | |
| 3. (optional) build docker images containing Tensorflow 1.7 (tensorflow\Dockerfile-cpu and tensorflow\Dockerfile-gpu) | |
| 4. (required for RasterVision) build docker images for compiling Tensorflow 1.5 for CPU and GPU (tensorflow\v1.5\Dockerfile-build-cpu and tensorflow\v1.5\Dockerfile-build-gpu) |
This file contains hidden or 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
| WITH table_scans as ( | |
| SELECT relid, | |
| tables.idx_scan + tables.seq_scan as all_scans, | |
| ( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes, | |
| pg_relation_size(relid) as table_size | |
| FROM pg_stat_user_tables as tables | |
| ), | |
| all_writes as ( | |
| SELECT sum(writes) as total_writes | |
| FROM table_scans |
This file contains hidden or 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 simplejson | |
| import sqlalchemy | |
| from sqlalchemy import String | |
| from sqlalchemy.ext.mutable import Mutable | |
| class JSONEncodedObj(sqlalchemy.types.TypeDecorator): | |
| """Represents an immutable structure as a json-encoded string.""" | |
| impl = String |