Skip to content

Instantly share code, notes, and snippets.

mkrentovskiy@mkrentovskiy-Inspiron-1470:~/tmp$ ls
linux-3.0.1 linux-3.0.1.tar.bz2
mkrentovskiy@mkrentovskiy-Inspiron-1470:~/tmp$ cd linux-3.0.1/
mkrentovskiy@mkrentovskiy-Inspiron-1470:~/tmp/linux-3.0.1$ git init
Initialized empty Git repository in /home/mkrentovskiy/tmp/linux-3.0.1/.git/
mkrentovskiy@mkrentovskiy-Inspiron-1470:~/tmp/linux-3.0.1$ time git add .
real 0m24.748s
user 0m20.520s
def listStreams(self):
r = "Streams:\n"
c = self.db.cursor()
c.execute('SELECT id, url, type, en, state FROM streams ORDER BY en, id')
for i in c.fetchall():
num = "%05d" % i[0]
if i[3] == 1: en = "+";
else: en = "-"
if i[2] == 1: t = " RSS"
else: t = "PAGE"