Skip to content

Instantly share code, notes, and snippets.

@iffy
iffy / File 2
Created June 14, 2011 17:11
The description
This is the second file.
@iffy
iffy / style.css
Created June 16, 2011 15:36
TDD example
body {
margin: 0;
padding: 1em;
font-family: sans-serif;
}
h1, h2, h3, h4, h5 {
font-family: Arial;
margin-left: 12px;
margin-right: 12px;
@iffy
iffy / output
Created June 29, 2011 20:23
Buffer stuff
(1, <read-write buffer ptr 0x698860, size 4 at 0x698840>)
(2, u'0.00')
sqlite 2.4.1
storm 0.17
@iffy
iffy / output
Created July 1, 2011 00:41
axiom error
$ python test.py
2.4.1
[axiom, version 0.6.0]
('Darwin', 'bonabuhle.local', '10.7.0', 'Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386', 'i386')
Traceback (most recent call last):
File "test.py", line 11, in <module>
s = Store()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/axiom/store.py", line 1161, in __init__
self._initSchema()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/axiom/store.py", line 1264, in _initSchema
@iffy
iffy / output
Created July 27, 2011 14:22
blkandtx
$ python prob.py
2011-07-27 08:38:43-0600 [-] Log opened.
2011-07-27 08:38:43-0600 [-] Connected to process
2011-07-27 08:38:43-0600 [-] [Errno 61] Connection refused
2011-07-27 08:38:43-0600 [-] error connecting 0 sleep for 1 second
2011-07-27 08:38:44-0600 [-] [Errno 22] Invalid argument
2011-07-27 08:38:44-0600 [-] error connecting 1 sleep for 1 second
2011-07-27 08:38:45-0600 [-] [Errno 22] Invalid argument
2011-07-27 08:38:45-0600 [-] error connecting 2 sleep for 1 second
2011-07-27 08:38:46-0600 [-] [Errno 22] Invalid argument
@iffy
iffy / _description
Created August 22, 2011 22:13
How to implement
Customer's can purchase things, and employees can be paid a commission for assisting the customer in their purchase. What methods would you create to do this?

Hexagon Dots

depth

4

Challenge

Your challenge is to write a bot to play the Hexagon dots game. Your bot will

@iffy
iffy / hexagons.rst
Created September 12, 2011 15:22
Spec

Hexagon Dots

depth

4

Challenge

Your challenge is to write a bot to play the Hexagon dots game. Your bot will

@iffy
iffy / sample output
Created September 21, 2011 00:00
skool example
$ python
Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from storm.locals import Store, create_database
>>> from skmodel import Student, Class, Grade
>>>
>>> # use test db
... db = create_database('sqlite:test.db')
>>> store = Store(db)
def getRecords(kw=None):
"""
@param kw: A dictionary of narrowing criteria for the records. For example,
if you wanted to only show records for student's named "Bill" you would
pass::
{'first': 'Bill'}
"""
if not kw: