Skip to content

Instantly share code, notes, and snippets.

<iframe width="100%" height="520" frameborder="0" src="http://alekandreev.cartodb.com/viz/4db10ea8-dd27-11e4-8070-0e0c41326911/embed_map" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>
<iframe src="https://www.google.com/maps/d/embed?mid=z4QiSwLUxGWI.kezVbbMc4oi0" width="100%" height="480"></iframe>
<iframe width="100%" height="520" frameborder="0" src="http://alekandreev.cartodb.com/viz/40eb2a54-dc5b-11e4-96f6-0e4fddd5de28/embed_map" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>
@aandr
aandr / README.md
Last active August 29, 2015 14:01
Scraper за протоколите от ЦИК за Избори за ЕП 2014

Инструкции

  1. Инсталирате нужните пакети:

    pip install pyquery

или в някои версии на Ubuntu:

 sudo apt-get install python-pyquery
@aandr
aandr / blink.css
Created August 9, 2013 08:55
Paste this in your CSS and you'll get the <blink> tag back!
@aandr
aandr / aop.py
Created May 5, 2011 13:41
Python AOP using Class Decorators
import inspect
def aspectize(arg):
def decorate_method(func):
func.__before = []
func.__after = []
def decorated(*args, **kwargs):
for f in func.__before:
res = f(*args, **kwargs)
/*
A dynamic version for the 960.gs CSS grid framework.
Usage:
.mydiv {
.grid(4); // 4 column box
.grid(4, -2); // 4 column box, 2 column pull (negative left margin)
.grid(8, 0, 2); // 8 column box, 2 column prefix (left padding)
.gird(8, 0, 0, 3); // 8 column box, 3 column suffix (right badding)
}
@aandr
aandr / banjo.py
Created May 3, 2011 21:08
Banjo: jQuery proxy for python
import json
class Banjo:
"""
jQuery proxy for Python
>>> from banjo import b, js
>>> b('#home').toggle()
$("#home").toggle()
>>> b.map(b('p.blue'), js.myJsMapFunc)
function showUser(str) {
// clear highlights
$('.highlight').removeClass('highlight');
$('#txtHint').load('author-ajax.php?q=' + str, function() {
$('#authors .' + str).addClass('highlight');
});
}
/*
======================================================================
ERROR: test_editing (pages.tests.PageEditorTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/django/test/testcases.py", line 256, in __call__
self._pre_setup()
File "/Library/Python/2.6/site-packages/django/test/testcases.py", line 223, in _pre_setup
self._fixture_setup()
File "/Library/Python/2.6/site-packages/django/test/testcases.py", line 502, in _fixture_setup
Site.objects.clear_cache()