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
import codecs | |
import operator | |
from urllib import urlencode, quote | |
from cookielib import CookieJar | |
from urllib2 import build_opener, HTTPCookieProcessor | |
import logging | |
from HTMLParser import HTMLParser | |
from bs4 import BeautifulSoup |
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 attributes; | |
CREATE TABLE attributes( | |
key VARCHAR, | |
value VARCHAR, | |
entity_id INTEGER); | |
INSERT INTO attributes(key,value,entity_id) values ('j','raugaj',1); | |
INSERT INTO attributes(key,value,entity_id) values ('n','lion',7); | |
INSERT INTO attributes(key,value,entity_id) values ('f','wolf',19); | |
INSERT INTO attributes(key,value,entity_id) values ('c','fennec',233); |
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
""" | |
Improved prune_dirs for humblebee and beets. | |
Supports glob patterns for clutter. | |
""" | |
import os | |
import shutil | |
import fnmatch | |
def fnmatches(names, patterns): |
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
class Resource(object): | |
def get_script(self, *args): | |
if not args: | |
raise error.InvalidArgumentError('get_script requires a path') | |
scriptf = os.path.join(self.static_dir, os.sep.join(*args)) | |
return open(scriptf).read() | |
def index(self): | |
indexfile = os.path.join(self.static_dir, 'index.html') |