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

All Samples(319)  |  Call(239)  |  Derive(0)  |  Import(80)

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/common/UnIndex.py   Products.ZCatalog(Download)
from BTrees.IIBTree import intersection
from BTrees.IIBTree import IITreeSet
from BTrees.IIBTree import IISet
from BTrees.IIBTree import multiunion
from BTrees.IOBTree import IOBTree
                continue
            elif isinstance(s, int):
                s = IISet((s, ))
            setlist.append(s)
        return multiunion(setlist)
                result = setlist[0]
                if isinstance(result, int):
                    result = IISet((result,))
                if not_parm:
                    exclude = self._apply_not(not_parm, resultset)
                for s in setlist:
                    if isinstance(s, int):
                        s = IISet((s,))
                    tmp.append(s)
                r = multiunion(tmp)
                for s in setlist:
                    if isinstance(s, int):
                        s = IISet((s,))
                    tmp.append(s)
                if len(tmp) > 2:

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/BooleanIndex/BooleanIndex.py   Products.ZCatalog(Download)
 
from App.special_dtml import DTMLFile
from BTrees.IIBTree import IIBTree, IITreeSet, IISet
from BTrees.IIBTree import union, intersection, difference
import BTrees.Length
                # Otherwise, remove from resultset or _unindex
                if resultset is None:
                    return (union(difference(self._unindex, index), IISet([])),
                            (self.id, ))
                else:
                    return (difference(resultset, index), (self.id, ))
        return (IISet(), (self.id, ))
    def items(self):
        # return a list of value to int set of rid tuples
        indexed = self._index_value
        items = [(bool(indexed), self._index)]
        false = IISet()

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/PathIndex/PathIndex.py   Products.ZCatalog(Download)
from OFS.SimpleItem import SimpleItem
from BTrees.IIBTree import IITreeSet
from BTrees.IIBTree import IISet
from BTrees.IIBTree import intersection
from BTrees.IIBTree import multiunion
            return res, (self.id,)
        else:
            return IISet(), (self.id,)
 
    def numObjects(self):
        if level + len(comps) - 1 > self._depth:
            # Our search is for a path longer than anything in the index
            return IISet()
 
        if len(comps) == 0:
            return IISet(self._unindex.keys())
            tree = self._index.get(comp, None)
            if tree is None:
                return IISet()
            tree2 = tree.get(level + i, None)
            if tree2 is None:

src/c/o/collective.recipe.zope2wsgi-0.1/collective/recipe/zope2wsgi/utilities/check_catalog.py   collective.recipe.zope2wsgi(Download)
import os,sys,re,getopt
from types import IntType
from BTrees.IIBTree import IISet,difference,intersection
 
def checkCatalog(path,indexes):
 
            # check forward entries
            RIDS = IISet()
            for key, rids in idx._index.items():
                if isinstance(rids,IntType):
                    RIDS.insert(  rids  )
                else:
                    map(RIDS.insert , rids.keys())
 
            diff = difference(RIDS, IISet(_cat.data.keys()))
                print '\tERR: too much forward entries:', diff
            else:
                print '\tOK:  Forward entries (%d entries)'  % (len(RIDS))
 
 

src/e/x/experimental.catalogqueryplan-3.2.8/experimental/catalogqueryplan/unindex.py   experimental.catalogqueryplan(Download)
from cgi import escape
from BTrees.IIBTree import union, multiunion
from BTrees.IIBTree import intersection
from Products.PluginIndexes.common.util import parseIndexRequest
from BTrees.IIBTree import IISet
            result = setlist[0]
            if isinstance(result, int):
                result = IISet((result,))
            return result, (self.id,)
 
            for s in setlist:
                if isinstance(s, int):
                    s = IISet((s,))
                tmp.append(s)
            if len(tmp) > 2:
                    continue
                # If intersection, we can't possibly get a smaller result
                return IISet(), (self.id,)
            elif isinstance(s, int):
                s = IISet((s,))

src/z/o/Zope2-2.13.22/src/Zope2/utilities/check_catalog.py   Zope2(Download)
import os,sys,re,getopt
from types import IntType
from BTrees.IIBTree import IISet,difference,intersection
 
def checkCatalog(path,indexes):
 
            # check forward entries
            RIDS = IISet()
            for key, rids in idx._index.items():
                if isinstance(rids,IntType):
                    RIDS.insert(  rids  )
                else:
                    map(RIDS.insert , rids.keys())
 
            diff = difference(RIDS, IISet(_cat.data.keys()))
                print '\tERR: too much forward entries:', diff
            else:
                print '\tOK:  Forward entries (%d entries)'  % (len(RIDS))
 
 

src/u/n/unimr.compositeindex-0.1rc1-r84937/unimr/compositeindex/CompositeIndex.py   unimr.compositeindex(Download)
from time import time
 
from BTrees.IIBTree import IIBTree, IITreeSet, IISet, union, intersection, difference
from BTrees.OOBTree import OOBTree
from BTrees.IOBTree import IOBTree
        if set_func == intersection:
            for key in k:
                set=self._index.get(key, IISet())
                rank.append((len(set),key))
 
            set=self._index.get(key, None)
            if set is None:
                set = IISet(())
            elif isinstance(set, int):
                set = IISet((set,))
 
 
        if isinstance(res, int):  r=IISet((res,))
 
        if res is None:

src/p/r/Products.BooleanIndex-1.0.2/Products/BooleanIndex/BooleanIndex.py   Products.BooleanIndex(Download)
    VALUETYPES = []
 
from BTrees.IIBTree import IIBTree, IITreeSet, IISet
from BTrees.IIBTree import union, intersection, difference
import BTrees.Length
                # Otherwise, remove from res or _unindex
                if res is None:
                    return union(difference(self._unindex, index), IISet([])), (self.id,)
                else:
                    return difference(res, index), (self.id,)
        return IISet(), (self.id,)
    def items(self):
        items = []
        for v,k in self._unindex.items():
            if isinstance(v, int):
                v = IISet((v,))

src/e/x/experimental.catalogqueryplan-3.2.8/experimental/catalogqueryplan/dateindex.py   experimental.catalogqueryplan(Download)
from BTrees.IIBTree import union, multiunion
from BTrees.IIBTree import intersection
from Products.PluginIndexes.common.util import parseIndexRequest
from BTrees.IIBTree import IISet
 
            if set is not None:
                if isinstance(set, int):
                    set = IISet((set,))
                else:
                    # set can't be bigger than res
                    set = intersection(set, res)
                r = set_func(r, set)
 
    if isinstance(r, int):
        r = IISet((r,))
 
    if r is None:
        return IISet(), (self.id,)
    else:
        return r, (self.id,)

src/e/x/experimental.catalogqueryplan-3.2.8/experimental/catalogqueryplan/extendedpathindex.py   experimental.catalogqueryplan(Download)
from BTrees.IIBTree import union, multiunion
from BTrees.IIBTree import intersection
from Products.PluginIndexes.common.util import parseIndexRequest
from BTrees.IIBTree import IISet
 
        return result, (self.id,)
    else:
        return IISet(), (self.id,)
 
 
    if navtree and navtree_start > min(pathlength + depth, self._depth):
        # This navtree_start excludes all items that match the depth
        return IISet()
    if pathlength > self._depth:
        # Our search is for a path longer than anything in the index
        return IISet()
            # Specific object search
            res = self._index_items.get(path)
            return res and IISet([res]) or IISet()
        else:
            # Single depth search

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8  Next