Skip to content

Instantly share code, notes, and snippets.

@sureshvv
sureshvv / gist:e252b69bc5e0b12c701b
Created February 23, 2015 05:04
Instance startup error
Traceback (most recent call last):
File "/home/suresh/vnc/vnc-plone-buildout/parts/instance/bin/interpreter", line 419, in <module>
exec(compile(__file__f.read(), __file__, "exec"))
File "/home/suresh/vnc/vnc-plone-buildout/eggs/Zope2-2.13.21-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
run()
File "/home/suresh/vnc/vnc-plone-buildout/eggs/Zope2-2.13.21-py2.7.egg/Zope2/Startup/run.py", line 22, in run
starter.prepare()
File "/home/suresh/vnc/vnc-plone-buildout/eggs/Zope2-2.13.21-py2.7.egg/Zope2/Startup/__init__.py", line 86, in prepare
self.startZope()
File "/home/suresh/vnc/vnc-plone-buildout/eggs/Zope2-2.13.21-py2.7.egg/Zope2/Startup/__init__.py", line 262, in startZope
@sureshvv
sureshvv / gist:5483690
Last active December 16, 2015 19:18
eight queens
def solve():
board = [ [' ' for i in range(8) ] for j in range(8) ]
start = [ 0 ] * 8
row = 0
nq = 0
turn_on = False
while row < 8:
col = start[row]
while col < 8:
added = add_a_queen(board, row, col)
@sureshvv
sureshvv / test script
Created March 4, 2013 06:24
stable sort in python
from random import choice
from operator import attrgetter
years = range(1992, 1995)
months = range(1, 3)
day = range(1, 3)
idx = range(2)
class A(object):
def __init__(self):