returns true if any of the keys is unique
336606
def any_unique(keys, axis=semantics.axis_default):
    """"""
    index = as_index(keys, axis)
    return np.any(index.count == 1)
592720
public function hasUniqueSlug()
    {
        $hash = $this->slugWorkingRecord->{$this->slugDbField} ?: $this->encrypt();
        $list = $this->slugWorkingRecord->get()->filter($this->slugDbField, $hash);

        if($this->slugWorkingRecord->ID) {
            $list = $list->exclude('ID', $this->slugWorkingRecord->ID);
        }
        else {
            $list = $list->exclude('ID', 0);
        }

        return !($list->exists());
    }
1016812
def is_set(self, key):
        """"""
        data = self.model.get_data()
        return isinstance(data[key], set)
708161
def distinct(keys):
    
    known = set()
    outlist = []
    for key in keys:
        if key not in known:
            outlist.append(key)
        known.add(key)
    return outlist
919919
def unique_justseen(iterable, key=None):
    
    return map(next, map(operator.itemgetter(1), groupby(iterable, key)))
10298
def has_key(cls, *args):
        
        key = args if len(args) > 1 else args[0]
        return key in cls._instances
860688
function hasDuplicateDependentKeys(callExp) {
  if (!isComputedProp(callExp)) return false;

  const dependentKeys = parseDependentKeys(callExp);
  const uniqueKeys = dependentKeys
    .filter((val, index, self) => self.indexOf(val) === index);

  return uniqueKeys.length !== dependentKeys.length;
}
382862
def unique_key(connection):
    
    while 1:
        key = str(uuid.uuid4().hex)
        if not connection.exists(key):
            break
    return key
126775
function hasKeys(obj) {
		return (!Array.isArray(obj) && _.isObject(obj) && _.keys(obj).length > 0);
	}
595551
function hasPrimaryKeyValues() {
		$pks = static::$_primaryKeys;
		if (!$pks)
			return false;

		foreach ($pks as &$pk)
			if ($this->$pk === null)
				return false;
		return true;
	}
925982
def _has(self, key, exact=0):

        """"""

        if not exact:
            try:
                key = self.getfullkey(key)
                return 1
            except KeyError:
                return 0
        else:
            return key in self.data
664886
def _findUniqueMappingKeys(mapping):
    

    uniqueMappingKeys = set()
    for key, entries in viewitems(mapping):
        if len(entries) == 1:
            uniqueMappingKeys.add(key)
    return uniqueMappingKeys
653898
function haveDifferentKeys(object1, object2) {
  var keys1 = Object.keys(object1);
  var keys2 = Object.keys(object2);

  if (keys1.length !== keys2.length) {
    return true;
  }

  return !keys1.every(function existsInKeys2 (key) {
    return keys2.indexOf(key) !== -1;
  });
}
670775
def is_unique(keys, *, scope=None, comparison_operators=None, present_optional=False,
                message=None):
    
    def check(pname, validator):
      """Checks that a value is unique in its column, with an optional scope."""
      # pylint: disable=too-many-branches
      model = validator.model
      data_access = validator.data_access
      pkname = model.primary_key_name
      pkey = model.primary_key

      if isinstance(keys, str):
        key = getattr(model, keys)

        if present_optional and key is None:
          return True

        if comparison_operators:
          if isinstance(comparison_operators, str):
            op = comparison_operators
          else:
            op = comparison_operators[0]
        else:
          op = " = "

        constraints = [(keys, key, op)]
      else:
        if comparison_operators:
          ops = comparison_operators
        else:
          ops = [" = "] * len(keys)

        constraints = list(zip(keys, [getattr(model, key) for key in keys], ops))

      if scope:
        if comparison_operators:
          ops = comparison_operators[len(constraints):]
        else:
          ops = [" = "] * len(scope)

        constraints.extend(zip(scope, [getattr(model, col) for col in scope], ops))

      dupe = data_access.find(model.table_name, constraints, columns=pkname)

      if dupe is None:
        return True
      if isinstance(pkname, str):
        return dupe[0] == pkey
      else:
        return tuple(dupe) == tuple(pkey)

    return Validation(check, keys, message or "is already taken", is_simple=False)
990404
def has_keys(self, keys):
        
        self.is_a(Mapping)
        self.contains_all_of(keys)
        return ChainInspector(self._subject)
1075138
def has(self, key, mtime=None):
        
        v = self.__values.get(key, None)
        if not v:
            return False
        if self.check_modified_time:
            mtime = self._get_mtime(key, mtime)
            if mtime != self.__modified_times[key]:
                del self[key]
                return False
        return True
958575
public boolean containsKey(Key<?> key) {
    for (int i = 0; i < size; i++) {
      if (bytesEqual(key.asciiName(), name(i))) {
        return true;
      }
    }
    return false;
  }