Skip to content

Instantly share code, notes, and snippets.

from kartograph import Kartograph
CSS_FILENAME = 'test.css'
k = Kartograph()
country = {"iso_a3": "GBR"}
Traceback (most recent call last):
File "country_shape_generator.py", line 67, in <module>
K.generate(config, outfile='./mymap.svg', stylesheet=stylesheet)
File "/Users/timfernando/.virtualenvs/kartograph/src/kartograph/kartograph/kartograph.py", line 46, in generate
_map = Map(opts, self.layerCache, format=format)
File "/Users/timfernando/.virtualenvs/kartograph/src/kartograph/kartograph/map.py", line 73, in __init__
me._crop_layers()
File "/Users/timfernando/.virtualenvs/kartograph/src/kartograph/kartograph/map.py", line 377, in _crop_layers
% crop_at_layer)
kartograph.errors.KartographError: Kartograph-Error: you want to substract from layer "countries" which cannot be found
{
"layers": {
"countries": {
"src": "ne_10m_admin_0_countries.shp"
},
"graticule": {
"special": "graticule",
"latitudes": "3",
"longitudes": "3"
}
@timfernando
timfernando / oxford-branding-variables.less
Created May 15, 2012 15:19
LESS of official Oxford University Branding Colours
// Official Oxford Pantone palette
@pantone282: rgb(0, 33, 71);
@pantone279: rgb(72, 145, 220);
@pantone291: rgb(159, 206, 235);
@pantone5405: rgb(68, 104, 125);
@pantone549: rgb(95, 155, 175);
@pantone551: rgb(161, 196, 208);
@pantone562: rgb(0, 119, 112);
@pantone624: rgb(123, 162, 150);
@pantone559: rgb(188, 210, 195);
@timfernando
timfernando / gist:1836400
Created February 15, 2012 15:01
List comprehension fizzbuzz
fizzbuzz = (x) ->
if x%3 is 0 and x%5 is 0
"fizz bang"
else if x%3 is 0
"fizz"
else if x%5 is 0
"bang"
else ->
x
@timfernando
timfernando / gist:657043
Created October 31, 2010 19:45
Enabling colours on a Mac OS X shell
# Via: http://stackoverflow.com/questions/973899/how-to-configure-mac-terminal-to-have-color-ls-output
# Add the following to your ~/.profile to enable colour in the Mac OS X Shell
export CLICOLOR=1
# Use the following line with a white background
export LSCOLORS=ExFxCxDxBxegedabagacad
# Or this one with a black backdrop
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx