Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
import web
urls = (
'/', 'index',
'/page/(*), 'page',
'/user/(*), 'user',
'/page/(*)/editor, 'editor',
'/page/(*)/save/(*), 'save', #Restful page export. CSV, HTML, XML
@jkern
jkern / infogami error
Created March 15, 2009 22:23
Error I get when I try and run infogami
[infogami@darkstar infogami]$ python run.py
0.0 (1): SELECT * FROM thing WHERE key='/type/type'
0.0 (2): SELECT * FROM thing WHERE key='/type/macro'
0.0 (3): SELECT data FROM data WHERE thing_id=32 AND revision=1
0.0 (4): SELECT * FROM thing WHERE key=<ref: u'/type/type'>
0.0 (5): SELECT data FROM data WHERE thing_id=1 AND revision=2
ERR: SELECT set_config('statement_timeout', 60000, false)
Traceback (most recent call last):
File "/home/infogami/infogami/infogami/infobase/server.py", line 50, in g
d = f(self, *a, **kw)
So ...
Problem 1:
First I get this error (after modifying my run.py to connect to the db)
http://gist.github.com/79560
Then I added the following line to line 16 of my run.py
[jkern@thumper blog]$ python hyde/hyde.py -g -s site/ -d deploy
INFO:Processing /index.html[2009-03-17 08:23:50,034]
INFO:Processing /.htaccess[2009-03-17 08:23:50,094]
INFO:Processing /about/about.html[2009-03-17 08:23:50,095]
INFO:Processing /blog/blog.html[2009-03-17 08:23:50,157]
INFO:Processing /blog/atom.xml[2009-03-17 08:23:50,189]
INFO:Processing /blog/2007/happy-christmas.html[2009-03-17 08:23:50,343]
INFO:Processing /blog/2007/listing.html[2009-03-17 08:23:50,355]
INFO:Processing /blog/2009/introducing-hyde.html[2009-03-17 08:23:50,367]
INFO:Processing /blog/2009/2009.html[2009-03-17 08:23:50,389]
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# woof -- an ad-hoc single file webserver
# Copyright (C) 2004-2009 Simon Budig <simon@budig.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#!/usr/bin/python
"""Iordan Iotov
WIS 290
Fall Block II"""
import random
#count=0
#!/usr/bn/python
""" Fibonacci Sequence
This program will output the first 100 Fibonacci numbers. Terms in fibonacci are
generated by adding the previous two terms
Robert Ford
WIS290
FALL 2008 Block II
# This is a good start. -- jkern
def fib():
"""A generator for Fibonacci numbers,that goes to the next number and adds it to the current"""
x = 0
y = 1
counter = 0
#while 1: # The trouble starts here. -- jkern
while counter < 100:
# return x # you don't need this -- jkern
x, y = y, x + y # nice! (where did you find this?) -- jkern
#!/usr/bin/python
""" This Program prints a horizontal histogram of 100 random digits
By: Larry Harvey
WIS 290
MidTerm Exam
import random # Let's just keep this line. And move on -- jkern
counter = 0 # So we want to count how many times we do something. -- jk
num0 = 0
while counter < 100: # Here let's do something until counter is 99. -- jk
number = random.randrange(0,9) # Now we're creating a random number. --jk
if number == 0: # You'll need to check for all the numbers. -- jk
num0 += 1
counter += 1