Skip to content

Instantly share code, notes, and snippets.

View vehrka's full-sized avatar

Pedro-Juan Ferrer vehrka

View GitHub Profile
@jsanz
jsanz / README.md
Last active December 5, 2019 08:45
Docker wrapper for OGR commands

Simple wrappers around docker and OGR commands to expose ogr2ogr and ogrinfo using the latest builds. You need to be careful to always put absolute paths to your local data so the docker image can access it.

@gregburek
gregburek / rateLimitDecorator.py
Created December 7, 2011 01:51
Rate limiting function calls with Python Decorators
import time
def RateLimited(maxPerSecond):
minInterval = 1.0 / float(maxPerSecond)
def decorate(func):
lastTimeCalled = [0.0]
def rateLimitedFunction(*args,**kargs):
elapsed = time.clock() - lastTimeCalled[0]
leftToWait = minInterval - elapsed
if leftToWait>0: