Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(8)  |  Derive(0)  |  Import(5)

src/b/p/BplusPy-1.0/BplusPy/hBplusTreeBytes.py   BplusPy(Download)
"""
import types, BplusTreeLong, BplusTreeBytes, xBplusTreeBytes, string
from BplusTreeLong import BplusTreeException, BplusTreeBadKeyValue, BplusTreeKeyMissing, ENCODER, DECODER
 
def Initialize(treefilename, blockfilename, KeyLength,
    def PrefixForByteCount(this, s, maxbytecount):
        import md5
        if type(s) is types.UnicodeType:
            (s, dummy) = ENCODER(s)
        d = md5.new(s).digest()

src/b/p/BplusPy-1.0/BplusPy/xBplusTreeBytes.py   BplusPy(Download)
 
import types, string, BufferFile, BplusTreeBytes, BplusTreeLong
from BplusTreeLong import BplusTreeException, BplusTreeBadKeyValue, BplusTreeKeyMissing, ENCODER, DECODER
 
def Initialize(treefilename, blockfilename, KeyLength,
    def PrefixForByteCount(this, s, maxbytecount):
        #print "maxbytecount is", maxbytecount
        if len(s)<1:
            return u"";
        (bytes, count) = ENCODER(s)
        while len(bytes)>maxbytecount:
            s = s[:-1]
            (bytes, count) = ENCODER(s)
            thisValue = this.values[index]
            keyPrefix = BufferFile.StoreInt(len(thisKey))
            (keybytes, dummy) = ENCODER(thisKey)
            allbytes.append(keyPrefix)
            allbytes.append(keybytes)
            valuePrefix = BufferFile.StoreInt(len(thisValue))
            (valuebytes, dummy) = ENCODER(thisValue)

src/b/p/BplusPy-1.0/BplusPy/xBplusTree.py   BplusPy(Download)
"""
import types, BplusTreeLong, BplusTreeBytes, xBplusTreeBytes
from BplusTreeLong import BplusTreeException, BplusTreeBadKeyValue, BplusTreeKeyMissing, ENCODER, DECODER
 
def Initialize(treefilename, blockfilename, KeyLength,
    def __setitem__(this, key, value):
        if type(value) is not types.UnicodeType:
            (value, dummy) = DECODER(value)
        (bvalue, dummy) = ENCODER(value)
        this.xByteSet(key, bvalue)

src/b/p/BplusPy-1.0/BplusPy/hBplusTree.py   BplusPy(Download)
"""
import types, BplusTreeLong, BplusTreeBytes, xBplusTreeBytes, hBplusTreeBytes
from BplusTreeLong import BplusTreeException, BplusTreeBadKeyValue, BplusTreeKeyMissing, ENCODER, DECODER
 
def Initialize(treefilename, blockfilename, KeyLength,
    def __setitem__(this, key, value):
        if type(value) is not types.UnicodeType:
            (value, dummy) = DECODER(value)
        (bvalue, dummy) = ENCODER(value)
        this.hByteSet(key, bvalue)

src/b/p/BplusPy-1.0/BplusPy/BplusTree.py   BplusPy(Download)
"""
import types, BplusTreeLong, BplusTreeBytes
from BplusTreeLong import BplusTreeException, BplusTreeBadKeyValue, BplusTreeKeyMissing, ENCODER, DECODER
 
def Initialize(treefilename, blockfilename, KeyLength,
    def __setitem__(this, key, value):
        if type(value) is not types.UnicodeType:
            (value, dummy) = DECODER(value)
        (bvalue, dummy) = ENCODER(value)
        this.ByteSet(key, bvalue)