Skip to content

Instantly share code, notes, and snippets.

View Komzpa's full-sized avatar

Darafei Praliaskouski Komzpa

View GitHub Profile
#!/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), ... "
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)
#include "NewGameMenu.h"
const
int
BUTTON_HEIGHT
=
80
;
const
int
BUTTON_WIDTH
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
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}
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)