Skip to content

Instantly share code, notes, and snippets.

@davidvhill
davidvhill / gdal_mmap.py
Last active July 14, 2016 18:31 — forked from jleinonen/gdal_mmap.py
GDAL in memory results
# also: https://pcjericks.github.io/py-gdalogr-cookbook/vector_layers.html#load-data-to-memory
# another, maybe better approach to this is to use the gdal 'MEM' driver and then use
# sds.ReadRaster() and sds.WriteRaster() to get at the bytes.
# >>> from osgeo import gdal
# >>> driver = gdal.GetDriverByName('MEM')
# >>> sds = driver.Create('', 200, 300, 4)
# >>> sds.ReadRaster()
# If specifying gzip encoding and transferring the image results via body this way,
@davidvhill
davidvhill / ants.clj
Created February 2, 2018 00:41 — forked from michiakig/ants.clj
Clojure ant sim from Rich Hickey
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
;dimensions of square world