I hereby claim:
- I am zacharyvoase on github.
- I am meat (https://keybase.io/meat) on keybase.
- I have a public key whose fingerprint is EB8F 83DF B7F7 7478 5826 635C 8C5B 7543 A8AB F545
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#! /usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# | |
# exposure.rb => Break a position down into multiple spreads. | |
# Copyright (C) 2009 Zachary Voase | |
# | |
# 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. |
# -*- coding: utf-8 -*- | |
import eventlet | |
import eventlet.api | |
import eventlet.coros | |
def call_cc(function): | |
ev = eventlet.coros.event() | |
function(ev.send) | |
return ev.wait() |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (c) 2009 Zachary Voase | |
# | |
# Permission is hereby granted, free of charge, to any person | |
# obtaining a copy of this software and associated documentation | |
# files (the "Software"), to deal in the Software without | |
# restriction, including without limitation the rights to use, | |
# copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the |
Index: django/db/models/base.py | |
=================================================================== | |
--- django/db/models/base.py (revision 10088) | |
+++ django/db/models/base.py (working copy) | |
@@ -188,7 +188,11 @@ | |
new_class._prepare() | |
register_models(new_class._meta.app_label, new_class) | |
- | |
+ |
# -*- coding: utf-8 -*- | |
""" | |
Models with signals. | |
Example:: | |
from django.db import models | |
import modsig | |
class MyModel(modsig.Model): |
# -*- coding: utf-8 -*- | |
""" | |
Managers for pre-defined queries. | |
Example:: | |
from django.db import models | |
from qmanager import QManager |
*.pyc |
-- An implementation of call-with-current-continuation in Lua. | |
-- (c) 2009 Zachary Voase | |
function callcc (fun) | |
function coro () | |
-- The coroutine which will hold the value with which it is called, then | |
-- yield it back again later. | |
local val = coroutine.yield() | |
coroutine.yield() |
The following shows how you might go about using the processed data which is | |
output from parse_humsavar.py. | |
We’ll begin by reading it out from JSON; this involves importing the JSON | |
library, opening the file, and then just using ``json.load()``:: | |
# If you’re using Python 2.5, you probably have the bottom one (so you can | |
# just run `import simplejson as json`); if you’re using Python 2.6 then you | |
# definitely have the top one, so you can just do `import json`. | |
>>> import json |