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

All Samples(327)  |  Call(170)  |  Derive(0)  |  Import(157)

src/c/o/collective.notices-1.0/src/collective/notices/catalog.py   collective.notices(Download)
from datetime import datetime
 
from dateutil.tz import gettz
 
from BTrees.IFBTree import weightedIntersection, union, difference, IFSet
    def intersection(a, b):
        _, res = weightedIntersection(a or IFSet(), b or IFSet())
        return res
 
    @staticmethod
    def union(a, b):
        if a and b:
            return union(a, b)
        return a or b or IFSet()
        # filter out inactive items
        active_index = catalog['active']
        result = active_index.apply(dict(any_of=(True,))) or IFSet()
 
        all = IFSet(active_index.ids())

src/h/y/hypatia-0.1/benchmark/sortbench.py   hypatia(Download)
from pychart import text_box
 
from BTrees.IFBTree import IFSet
#from hypatia.indexes.field import fwscan_wins
from hypatia.indexes.field import nbest_ascending_wins
 
        for rlen in self.rlens:
            docids = IFSet(random.sample(all_docids,
                                         min(rlen, len(all_docids))))
            output('for %s' % rlen)

src/h/y/hypatia-HEAD/benchmark/sortbench.py   hypatia(Download)
from pychart import text_box
 
from BTrees.IFBTree import IFSet
#from hypatia.indexes.field import fwscan_wins
from hypatia.indexes.field import nbest_ascending_wins
 
        for rlen in self.rlens:
            docids = IFSet(random.sample(all_docids,
                                         min(rlen, len(all_docids))))
            output('for %s' % rlen)

src/b/t/BTrees-4.0.8/BTrees/check.py   BTrees(Download)
"""
 
from BTrees.IFBTree import IFBTree, IFBucket, IFSet, IFTreeSet
from BTrees.IFBTree import IFBTreePy, IFBucketPy, IFSetPy, IFTreeSetPy
from BTrees.IIBTree import IIBTree, IIBucket, IISet, IITreeSet

src/r/e/repoze.catalog-0.8.2/benchmark/sortbench.py   repoze.catalog(Download)
from pychart import text_box
 
from BTrees.IFBTree import IFSet
from repoze.catalog.indexes.field import fwscan_wins
from repoze.catalog.indexes.field import nbest_ascending_wins
 
        for rlen in self.rlens:
            docids = IFSet(random.sample(all_docids,
                                         min(rlen, len(all_docids))))
            output('for %s' % rlen)

src/z/t/ztfy.utils-0.4.9/src/ztfy/utils/catalog/index.py   ztfy.utils(Download)
    def apply(self, context=None):
        index = self.getIndex(context)
        return IFBTree.IFSet(index.apply(self.text))
 

src/c/o/cornerstone.soup-2.4.1.1/src/cornerstone/soup/ting.py   cornerstone.soup(Download)
        res = self._index.search(query, **kw).getDocids()
        if self._asIFSet:
            return BTrees.IFBTree.IFSet(res)
        return res

src/d/m/dm.incrementalsearch-2.0/dm/incrementalsearch/__init__.py   dm.incrementalsearch(Download)
from BTrees.OIBTree import OIBTree, OIBucket, OISet, OITreeSet
from BTrees.IIBTree import IIBTree, IIBucket, IISet, IITreeSet
from BTrees.IFBTree import IFBTree, IFBucket, IFSet, IFTreeSet
from BTrees.LOBTree import LOBTree, LOBucket, LOSet, LOTreeSet
from BTrees.OLBTree import OLBTree, OLBucket, OLSet, OLTreeSet

src/h/y/hypatia-0.1/hypatia/field/tests.py   hypatia(Download)
    def test_sort_default_nolimit(self):
        from BTrees.IFBTree import IFSet
        index = self._makeOne()
        self._populateIndex(index)
        c1 = IFSet([1, 2, 3, 4, 5])
        result = index.sort(c1)
        self.assertEqual(list(result), [5, 2, 1, 3, 4])
 
    def test_sort_default_withlimit(self):
        from BTrees.IFBTree import IFSet
    def test_sort_default_withlimit(self):
        from BTrees.IFBTree import IFSet
        index = self._makeOne()
        self._populateIndex(index)
        c1 = IFSet([1, 2, 3, 4, 5])
    def test_sort_optimal_means_None(self):
        from hypatia.interfaces import OPTIMAL
        from BTrees.IFBTree import IFSet
        index = self._makeOne()
        self._populateIndex(index)

src/h/y/hypatia-HEAD/hypatia/field/tests.py   hypatia(Download)
    def test_sort_default_nolimit(self):
        from BTrees.IFBTree import IFSet
        index = self._makeOne()
        self._populateIndex(index)
        c1 = IFSet([1, 2, 3, 4, 5])
        result = index.sort(c1)
        self.assertEqual(list(result), [5, 2, 1, 3, 4])
 
    def test_sort_default_withlimit(self):
        from BTrees.IFBTree import IFSet
    def test_sort_default_withlimit(self):
        from BTrees.IFBTree import IFSet
        index = self._makeOne()
        self._populateIndex(index)
        c1 = IFSet([1, 2, 3, 4, 5])
    def test_sort_optimal_means_None(self):
        from hypatia.interfaces import OPTIMAL
        from BTrees.IFBTree import IFSet
        index = self._makeOne()
        self._populateIndex(index)

  1 | 2  Next