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 bash | |
LIGHTTPD_ROOT='/django/__proxy__/' | |
DIRS=( "static" "site_media" "site-media" ) | |
OK_COLOR="\e[0;32m" | |
INFO_COLOR="\e[1;33m" | |
RESET="\033[0;0m" | |
echo -e "$INFO_COLOR Checking symlinks...$RESET" |
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
# randomator plugin for Pidgin / libpurple | |
# @author starenka moc.liamg@0aknerats (backwards) 2008 | |
use Purple; | |
%PLUGIN_INFO = ( | |
perl_api_version => 2, | |
name => "randomator", | |
version => "0.1", | |
summary => "Sets a random message on pidgin start.", |
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 datetime | |
from pyquery import PyQuery as pq | |
doc = pq(url='http://www.jinakrajina.cz/cz/poledni-menu') | |
noms = doc.find('td > p') | |
print '\n%s'%noms[0].text_content()[2:] | |
for i,nom in enumerate(noms[1:-1:2],1): | |
print '[%d] %s'%(i,nom.text_content().strip()) |
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 -*- | |
# @depends: pip install git+git://github.com/facebook/python-sdk.git#egg=facebook | |
import sys, time, datetime, csv, logging, os | |
from optparse import OptionParser | |
import facebook | |
usage = "python facepalm.py -i /where/to/get/input/file" |
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 re | |
RE_SPLIT = re.compile(r'\W+') | |
file_obj = open('/junk/in') | |
def parse_file(file_obj,re_split): | |
for line in file_obj: | |
yield re.split(re_split,line)[1:-1] |
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
activities = ( | |
{'freq':4,'texts':['Spím', | |
'Zdá se mi o pytlíku slunečnicovejch semínek', | |
'Odpočívám', | |
'Nabírám energii na další spánek dne']}, | |
{'freq':3,'texts':['Hlodám', | |
'Koušu kabel. Nedáš si taky?', | |
'Zírám do blba', | |
'Čenichám', | |
'Snifuju', |
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
*.pyc | |
.idea/* |
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
# Scrapuje Respekt.cz, aby to shráblo aktuální číslo v HTML. | |
# Nestahuje to obrázky, ale vidět jsou, protože maj absolutní URL, | |
# tohle se dá spravit pomocí pář řádků. | |
# | |
# Bohužel hapruje diakritika, bude tam někde potřeba pořešit přes iconv nebo tak něco. | |
import mechanize | |
from pyquery import PyQuery as pq | |
usr = "username" |
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
.idea/* | |
*.pyc |