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
area[area:highway=motorway]{fill-color:#809bc0} | |
area[area:highway=trunk]{fill-color:#7fc97f} | |
area[area:highway=primary]{fill-color:#fb805f} | |
area[area:highway=secondary]{fill-color:#fdbf6f} | |
area[area:highway=tertiary]{fill-color:#f7f496} | |
area[area:highway=residential]{fill-color:#c0c0c0} | |
area[area:highway=service]{fill-color:#809bc0} | |
area[area:highway=footway]{fill-color:#00ff00} |
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
drop table place_point; | |
create table place_point as ( | |
select | |
osm_id, | |
place, | |
coalesce(tags->'short_name:en', tags->'name:en', tags->'int_name', name, tags->'name:ru', tags->'name:be', name) as name, | |
tags, | |
(case | |
when | |
((capital = '2') or |
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
#include "NewGameMenu.h" | |
const | |
int | |
BUTTON_HEIGHT | |
= | |
80 | |
; | |
const | |
int | |
BUTTON_WIDTH |
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
cpp_source = open("cpp.cpp").read() | |
# удаляем whitespace | |
cpp_source = cpp_source.replace('\t', ' ') | |
cpp_source = cpp_source.replace(' ', ' ') | |
# удаляем комментарии | |
cpp_source = re.sub('//.*?$|/\*.*\*/', '', cpp_source, flags= re.S | re.M) |
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/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import logging | |
import re | |
from itertools import islice | |
def window(seq, n=2): | |
"Returns a sliding window (of width n) over data from the iterable" | |
" s -> (s0,s1,...s[n-1]), (s1,s2,...,sn), ... " |
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
debian:/home/kom/svn/mapnik2# ldd /usr/lib/libboost_filesystem.so | |
linux-vdso.so.1 => (0x00007fffb17ff000) | |
libboost_system.so.1.46.1 => /usr/lib/libboost_system.so.1.46.1 (0x00007f9341520000) | |
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9341318000) | |
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f934100d000) | |
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9340d8b000) | |
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9340b75000) | |
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9340958000) | |
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f93405d4000) | |
/lib64/ld-linux-x86-64.so.2 (0x00007f934194f000) |
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
create or replace function _final_median(anyarray) | |
returns float8 as $$ | |
with q as | |
( | |
select val | |
from unnest($1) val | |
where VAL is not null | |
order by 1 | |
), | |
cnt as |
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
gis=> create or replace function 😼ify ( 😼 integer ) | |
gis-> returns text as $$ | |
gis$> select 😼::text||'😼' | |
gis$> $$ language 'sql' strict; | |
CREATE FUNCTION | |
gis=> | |
gis=> create operator 😼( | |
gis(> leftarg = integer, | |
gis(> procedure = 😼ify | |
gis(> ); |
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
create or replace function aaa(aaa integer) | |
returns text as $$ | |
begin | |
raise notice 'passed1'; | |
return aaa :: text || '😼'; | |
end | |
$$ language 'plpgsql' strict; | |
select case when aaa(1) = '1' | |
then null |
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
gis=> drop type if exists apple; | |
DROP TYPE | |
gis=> create type apple as (amount numeric(1,0)); | |
CREATE TYPE | |
gis=> select '(1)'::apple; | |
apple | |
------- | |
(1) | |
(1 row) |
OlderNewer