This file contains hidden or 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
| # 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 |
This file contains hidden or 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/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 file contains hidden or 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/python | |
| """Iordan Iotov | |
| WIS 290 | |
| Fall Block II""" | |
| import random | |
| #count=0 |
This file contains hidden or 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 | |
| # -*- 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. |
This file contains hidden or 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
| [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] |
This file contains hidden or 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
| 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 | |
This file contains hidden or 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
| [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) |
This file contains hidden or 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/python | |
| import web | |
| urls = ( | |
| '/', 'index', | |
| '/page/(*), 'page', | |
| '/user/(*), 'user', | |
| '/page/(*)/editor, 'editor', | |
| '/page/(*)/save/(*), 'save', #Restful page export. CSV, HTML, XML |
NewerOlder