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
include $(GOROOT)/src/Make.$(GOARCH) | |
TARG=kademlia | |
GOFILES=\ | |
nodeid.go\ | |
routingtable.go\ | |
contact.go\ | |
kademlia.go | |
include $(GOROOT)/src/Make.pkg |
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
package main | |
import "fmt" | |
type state struct { | |
board [7][6]int; | |
heights [7]int; | |
} | |
type move struct { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Module> | |
<ModulePrefs title="Links from appengine.reddit.com" height="300"> | |
<Require feature="dynamic-height"/> | |
</ModulePrefs> | |
<Content type="html"><![CDATA[ | |
<style type="text/css"> | |
.rembeddit { | |
margin-bottom: 10px; | |
} |
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
"""Implements a distributed transaction for transfers of funds. | |
Invariant: The sum of all accounts, plus all partially applied transfers, is 0. | |
Steps: | |
1) In a transaction, an Account is debited, and a Transaction object is created, with the | |
appropriate amount and target, but no other transaction. | |
2) In a transaction, the target Account is credited, and a Transaction object is created with | |
a predefined key name, and the other transaction referencing the one created in step 1. | |
3) The original Transaction object created in step 1 is updated to reference the transaction |
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
A unit test helper library for App Engine. | |
Note that this is currently COMPLETELY UNTESTED. Consider it demo code only. | |
This library aims to make it easier to unit-test app engine apps and libraries | |
by handling the creation and registration of service stubs and so forth for you. | |
It also provides a custom implementation of the Capability service that allows | |
you to specify what capabilities you want it to report as disabled, and it wraps | |
all stubs in a wrapper that will throw a CapabilityDisabledError if you attempt | |
to use a disabled service or method. |
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
#include <assert.h> | |
#include <pthread.h> | |
#include <setjmp.h> | |
#include <signal.h> | |
#include <stdlib.h> | |
#include "eepy.h" | |
// Information about an active eepy process | |
typedef struct eepy_process { | |
jmp_buf context; |
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
import logging | |
from google.appengine.ext import db | |
class KindIterator(object): | |
def __init__(self, kind, filters=None, batch_size=100): | |
self.kind = kind | |
if filters: | |
self.filters = filters | |
else: | |
self.filters = [] |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Module> | |
<ModulePrefs title="Members" | |
description="Awaken your community with the members gadget which lets visitors join your site, sign in, and invite their friends. They can even explore the profiles of other members and make new friends." | |
author="Google" | |
author_email="[email protected]" | |
thumbnail="http://www.google.com/friendconnect/static/images/thumb/members.png" | |
screenshot="http://www.google.com/friendconnect/static/images/thumb/members.png" | |
> | |
<Require feature="dynamic-height"/> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Module> | |
<ModulePrefs title="Members" | |
description="Awaken your community with the members gadget which lets visitors join your site, sign in, and invite their friends. They can even explore the profiles of other members and make new friends." | |
author="Google" | |
author_email="[email protected]" | |
thumbnail="http://www.google.com/friendconnect/static/images/thumb/members.png" | |
screenshot="http://www.google.com/friendconnect/static/images/thumb/members.png" | |
> | |
<Require feature="dynamic-height"/> |
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
import logging | |
import os | |
import StringIO | |
from google.appengine.ext import db | |
BLOCK_NAME_FMT = '#%.8X' | |
class Inode(db.Model): | |
DEFAULT_BLOCK_SIZE = 524288 | |