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

All Samples(154)  |  Call(96)  |  Derive(1)  |  Import(57)

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py   Products.ZCatalog(Download)
from App.Common import package_home
from App.special_dtml import DTMLFile
from BTrees.IIBTree import IITreeSet
from BTrees.IIBTree import difference
from BTrees.IIBTree import intersection
    def clear(self):
        """Start over fresh."""
        self._always = IITreeSet()
        self._since_only = IOBTree()
        self._until_only = IOBTree()
    def _insert_migrate(self, tree, key, value):
        treeset = tree.get(key, None)
        if treeset is None:
            tree[key] = IITreeSet((value, ))
            if isinstance(treeset, IITreeSet):
            elif isinstance(treeset, int):
                tree[key] = IITreeSet((treeset, value))
                tree[key] = IITreeSet((treeset, value))
                tree[key] = IITreeSet(treeset)

src/p/r/Products.AdvancedQuery-3.0.3/Products/AdvancedQuery/AdvancedQuery.py   Products.AdvancedQuery(Download)
from DateTime import DateTime
from BTrees.IIBTree import IISet, IITreeSet, \
     difference, union, multiunion, intersection
from BTrees.OOBTree import OOBTree
    *set* must be an 'IISet' or 'IITreeSet' of catalog record ids.
    if not isinstance(set, (IISet, IITreeSet)): set = IITreeSet(set)
    self._set = set
def _wrapLookup(r):
  if not isinstance(r, (IISet, IITreeSet)): r = IITreeSet(r.keys())
  return r
# overridden when IncrementalSearch is present
  def _getObjectIds(self):
    objs = self._objects
    if objs is None:
      objs = self._objects = IITreeSet(self._catalog.data.keys())
    return objs

src/p/r/Products.ManagableIndex-2.1.5/Products/ManagableIndex/SimpleTextIndex.py   Products.ManagableIndex(Download)
from types import StringTypes
from BTrees.IIBTree import IITreeSet, IISet, intersection, difference
from WordIndex import WordIndex
  def _update(self, documentId, val, oldval, threshold):
    val = IITreeSet(val); oldval = IITreeSet(self._unindexVal2Val(oldval))
    add= difference(val,oldval)
    rem= difference(oldval,val)
    if add: self._indexValue(documentId,add,threshold)
  def _indexValue(self, documentId, val, threshold):
    return super(SimpleTextIndex, self)._indexValue(
      documentId, IITreeSet(val), threshold
  def _unindexValue(self, documentId, val):
    return super(SimpleTextIndex, self)._unindexValue(
      documentId, IITreeSet(val)

src/p/r/Products.ZCTextIndex-2.13.5/src/Products/ZCTextIndex/BaseIndex.py   Products.ZCTextIndex(Download)
from BTrees.IOBTree import IOBTree
from BTrees.IIBTree import IIBTree
from BTrees.IIBTree import IITreeSet
from BTrees.IIBTree import difference
from BTrees.IIBTree import intersection
        new_wid2w, new_docw = self._get_frequencies(new_wids)
        old_widset = IITreeSet(old_wid2w.keys())
        new_widset = IITreeSet(new_wid2w.keys())

src/d/e/dewey-0.3.0/src/dewey/indices.py   dewey(Download)
import persistent
from BTrees.IIBTree import IIBTree, IISet, IITreeSet
from BTrees.IIBTree import difference, intersection, multiunion
from BTrees.IOBTree import IOBTree
            self.values[value] = IITreeSet([rid])
                self.beginnings[part] = IITreeSet([rid])
                    self.middles[part] = IITreeSet([rid])
                self.endings[part] = IITreeSet([rid])

src/p/r/Products.ZCatalog-3.0.2/src/Products/PluginIndexes/common/UnIndex.py   Products.ZCatalog(Download)
from BTrees.IIBTree import difference
from BTrees.IIBTree import intersection
from BTrees.IIBTree import IITreeSet
from BTrees.IIBTree import IISet
from BTrees.IIBTree import multiunion
            # We always use a set to avoid getting conflict errors on
            # multiple threads adding a new row at the same time
            self._index[entry] = IITreeSet((documentId, ))
                # Inline migration: index row with one element was an int at
                # first (before Zope 2.13).
                indexRow = IITreeSet((indexRow, documentId))
                self._index[entry] = indexRow

src/p/r/Products.ManagableIndex-2.1.5/Products/ManagableIndex/ManagableIndex.py   Products.ManagableIndex(Download)
from AccessControl import ClassSecurityInfo
from BTrees.IOBTree import IOBTree
from BTrees.IIBTree import IISet, IITreeSet, union, intersection, multiunion
from BTrees.OOBTree import OOBTree, OOTreeSet
from BTrees.Length import Length
      if self.ReverseOrder: self._reverseOrder.insert(reverseOrder(term))
    if _isInstance(dl,_IntType): dl= index[term]= IITreeSet((dl,))
  def _insertAux(self, index, term, docId):
    '''index *docId* under *term*.'''
    dl= index.get(term)
    if dl is None: index[term]= docId; return
    if isinstance(dl,int): dl= index[term]= IITreeSet((dl,))

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
                except AttributeError:
                    # index row is not a IITreeSet
                    indexRow = IITreeSet((indexRow, entry))
                    ci[cd] = indexRow

src/p/r/Products.ManagableIndex-2.1.5/Products/ManagableIndex/WordIndex.py   Products.ManagableIndex(Download)
from Acquisition import aq_base
from BTrees.IIBTree import IITreeSet, difference
from ManagableIndex import addForm, ManagableIndex
      sv= self._standardizeValue_(v, object)
      if not sv: continue
      if set is None: set = IITreeSet(sv)
      else: set.update(sv)
    return set
  def _standardizeValue(self, value, object):
    '''convert to an IITreeSet of standardized terms.'''
    terms = self._standardizeValue_(self, value, object)
    if terms: return IITreeSet(terms)

src/p/l/plone.app.upgrade-1.3.6/plone/app/upgrade/v41/betas.py   plone.app.upgrade(Download)
from Products.PluginIndexes.DateRangeIndex.DateRangeIndex import DateRangeIndex
from BTrees.IIBTree import IISet
from BTrees.IIBTree import IITreeSet
from zope.event import notify
            for k, v in tree.items():
                if isinstance(v, IISet):
                    tree[k] = IITreeSet(v)
                    i += 1
                elif isinstance(v, int):
                    tree[k] = IITreeSet((v, ))

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