Did I find the right examples for you? yes no

All Samples(55)  |  Call(51)  |  Derive(0)  |  Import(4)

        def uniqify(seq, key=None):
    if key is None:
        def key(x): return x
    seen = {}
    result = []
    for item in seq:
        marker = key(item)
        if marker not in seen:
            seen[marker] = 1
            result.append(item)
    return result
        


src/n/e/neo4django-HEAD/neo4django/db/models/cypher.py   neo4django(Download)
from django.core import exceptions
 
from ...utils import not_none, uniqify
 
 
    def passing_identifiers(self):
        return uniqify(not_none([self.path_variable] + \
                list(itertools.chain.from_iterable(c.passing_identifiers
                                                   for c in self.components))))
 
    def passing_identifiers(self):
        return uniqify(itertools.chain.from_iterable(
            p.passing_identifiers if hasattr(p, 'passing_identifiers') else []
            for p in self.paths))
 
    def passing_identifiers(self):
        match_ids = self.match.passing_identifiers \
                if hasattr(self.match, 'passing_identifiers') else []
        return uniqify(self.field_dict.keys() + match_ids)
 
    def required_identifiers(self):
        return uniqify(itertools.chain.from_iterable(
            getattr(t, 'required_identifiers', []) for t in self.terms))
 
 

src/n/e/neo4django-HEAD/neo4django/db/models/query.py   neo4django(Download)
 
from .. import DEFAULT_DB_ALIAS, connections
from ...utils import Enum, uniqify, not_none
from ...constants import ORDER_ATTR
from ...decorators import (transactional,
    def as_groovy(self, using):
        filters = uniqify(self.filters)
 
        id_conditions = []
 
                        .append(lookup)
 
            columns = uniqify(exact_id_lookups_by_column.keys() + 
                              in_id_lookups_by_column.keys())
 
                id_set = reduce(and_, (set(c.value) for c in in_lookups)) if in_lookups else set([])
                if len(exact_lookups) > 0:
                    exact_ids = uniqify(e.value for e in exact_lookups)
                    if len(exact_ids) > 1:
                        raise ValueError("Conflicting id__exact lookups - a "

src/q/u/quodlibet-cli-HEAD/quodlibet_cli/__init__.py   quodlibet-cli(Download)
import os, re, uuid, urllib2
import unicodeutils
from .utils import isiter, uniqify
 
# Check if QuodLibet is available
    def dedupe(self, names=None):
        if names and not isiter(names): names = [names]
        for name, value in self.data.items():
            if names and name not in names: continue
            self.modify(name, uniqify(value))

src/n/e/neo4django-0.1.8/neo4django/db/models/query.py   neo4django(Download)
 
from .. import DEFAULT_DB_ALIAS, connections
from ...utils import Enum, uniqify
from ...constants import ORDER_ATTR
from ...decorators import transactional, not_supported, alters_data, \
    def as_groovy(self, using):
        conditions = uniqify(self.conditions)
 
        #TODO exclude those that can't be evaluated against (eg exact=None, etc)
        # TODO... those can probably be evaluated against now with Cypher!