Did I find the right examples for you? yes no

All Samples(15)  |  Call(11)  |  Derive(0)  |  Import(4)

src/l/e/lesswrong-HEAD/r2/r2/lib/db/thing.py   lesswrong(Download)
import tdb_sql as tdb
import sorts
from .. utils import iters, Results, tup, to36, Storage
from r2.config import cache
from r2.config.databases import tz
        if self._dirty:
            if keys:
                keys = tup(keys)
                to_set = dict((k, self._dirties[k])
                              for k in keys if self._dirties.has_key(k))
    def _load_multi(cls, need):
        need = tup(need)
        need_ids = [n._id for n in need]
        datas = cls._get_data(cls._type_id, need_ids)
        to_save = {}
    def _byID(cls, ids, data=False, return_dict=True, extra_props=None):
        ids, single = tup(ids, True)
        prefix = thing_prefix(cls.__name__)
 
        def items_db(ids):
    def _by_fullname(cls, names,
                     return_dict = True, 
                     data=False, extra_props=None):
        names, single = tup(names, True)
 

src/r/e/reddit-HEAD/r2/r2/lib/jsontemplates.py   reddit(Download)
import calendar
 
from utils import to36, tup, iters
from wrapped import Wrapped, StringTemplate, CacheStub, CachedVariable, Templated
from mako.template import Template
    def thing_attr(self, thing, attr):
        if attr == "pref_clickgadget":
            return bool(thing.pref_clickgadget)
        elif attr == "pref_content_langs":
            return tup(thing.pref_content_langs)

src/r/e/reddit-HEAD/r2/r2/lib/utils/thing_utils.py   reddit(Download)
 
from datetime import datetime
from utils import tup
import pytz
 
def last_modified_multi(things, action):
    from pylons import g
    cache = g.permacache
 
    things = tup(things)

src/l/e/lesswrong-HEAD/r2/r2/lib/jsontemplates.py   lesswrong(Download)
# CondeNet, Inc. All Rights Reserved.
################################################################################
from utils import to36, tup, iters
from wrapped import Wrapped
from mako.template import Template