Add one or more private keys to each box. Also stores key paths
 in the set so when new boxes are added they will get the same keys,
 * +additional_keys+ is a list of file paths to private keys
 Returns the instance of Rye::Set
334419
def add_keys(*additional_keys)
      additional_keys = additional_keys.flatten.compact
      @opts[:keys] ||= []
      @opts[:keys] += additional_keys
      @opts[:keys].uniq!
      @boxes.each do |box|
        box.add_keys *additional_keys
      end
      self
    end
1194335
def key_paths
      trees.reduce(Set.new) { |result, tree| result.merge(tree.key_paths) }
    end
1291197
def update_keys!(&block)
      @copied_object = copied_object.each_with_object({}) do |pair, memo|
        key = pair.first
        new_key = block.call(key)
        value = pair.last
        if value.is_a?(Footing::Hash)
          memo[new_key] = value.update_keys!(&block)
        elsif value.is_a?(::Array)
          memo[new_key] = value.map do |val|
            if val.is_a?(Footing::Hash)
              val.update_keys!(&block)
            else
              val
            end
          end
        else
          memo[new_key] = value
        end
      end

      self
    end
1364122
async def setHiveKey(self, path, value):
        '''  '''
        perm = ('hive:set',) + path
        self.user.allowed(perm)
        return await self.cell.hive.set(path, value)
626999
def load_keys(path = nil)
        path ||= File.join(@path, @keydir)
        keys = Hash.new {|k,v| k[v] = DirtyProxy.new([])}

        list_keys(path).each do |key|
          new_key = SSHKey.from_file(File.join(path, key))
          owner = new_key.owner

          keys[owner] << new_key
        end
        #Mark key sets as unmodified (for dirty checking)
        keys.values.each{|set| set.clean_up!}

        keys
      end
1273829
def create_set(hostnames, opts={})
       hostnames ||= []
       
       ld "Creating set from:", hostnames.inspect
       
       opts = {
         :user => (current_machine_user).to_s,
         :parallel => @@global.parallel,
         :quiet => Rudy.quiet?
       }.merge(opts)
       set = ::Rye::Set.new current_machine_group, opts 
       
       opts.delete(:parallel)   # Not used by Rye::Box.new

       hostnames.each do |m| 

         if m.is_a?(Rudy::Machine)
           m.refresh! if m.dns_public.nil? || m.dns_public.empty?
           if m.dns_public.nil? || m.dns_public.empty?
             ld "Cannot find public DNS for #{m.name} (continuing...)"
             rbox = self.create_box('nohost', opts) 
           else
             ld [:dns_public, m.dns_public, m.instid]
             rbox = self.create_box(m.dns_public, opts) 
           end
           rbox.stash = m   # Store the machine instance in the stash
           rbox.nickname = m.name
         else
           # Otherwise we assume it's a hostname
           rbox = self.create_box(m)
         end
         rbox.add_key user_keypairpath(opts[:user])
         set.add_box rbox
       end

       ld "Machines Set: %s" % [set.empty? ? '[empty]' : set.inspect]

       set
     end
432262
function setCardCodes(set) {
  const codeSet = new Set()
  for (const v of set) codeSet.add(cardCode(v))
  return codeSet
}
563176
def extend(self, *keys, **kwargs):
        
        this = copy.deepcopy(self)

        value_type = kwargs.get('value_type', EnumValue)

        if not keys:
            raise EnumEmptyError()

        keys = tuple(keys)
        values = [None] * len(keys)

        for i, key in enumerate(keys):
            value = value_type(this, i, key)
            values[i] = value
            try:
                super(Enum, this).__setattr__(key, value)
            except TypeError:
                raise EnumBadKeyError(key)

        this.__dict__['_keys'] = this.__dict__['_keys'] + keys
        this.__dict__['_values'] += values

        return this
38594
private Set<Object> keySet(Set<Object> s, Object[] key, boolean useList) {
    if (depth == 1) {
      //System.out.println("key is long enough to add to set");
      Set<K> keys = map.keySet();
      for (Object oldKey: keys) {
        Object[] newKey = new Object[key.length + 1];
        if (key.length > 0) {
          System.arraycopy(key, 0, newKey, 0, key.length);
        }
        newKey[key.length] = oldKey;
        if (useList) {
          s.add(Arrays.asList(newKey));
        } else {
          s.add(newKey[0]);
        }
      }
    } else {
      Set<K> keys = map.keySet();
      //System.out.println("key length " + key.length);
      //System.out.println("keyset level " + depth + " " + keys);
      for (K o: keys) {
        Object[] newKey = new Object[key.length + 1];
        if (key.length > 0) {
          System.arraycopy(key, 0, newKey, 0, key.length);
        }
        newKey[key.length] = o;
        //System.out.println("level " + key.length + " current key " + Arrays.asList(newKey));
        conditionalizeHelper(o).keySet(s, newKey, true);
      }
    }
    //System.out.println("leaving key length " + key.length);
    return s;
  }
1103328
def fillkeys(Recs):
    
    keylist, OutRecs = [], []
    for rec in Recs:
        for key in list(rec.keys()):
            if key not in keylist:
                keylist.append(key)
    for rec in Recs:
        for key in keylist:
            if key not in list(rec.keys()):
                rec[key] = ""
        OutRecs.append(rec)
    return OutRecs, keylist
477700
def add(self, key, value):
        
        if not key in self.prefs:
            self.prefs[key] = []
        self.prefs[key].append(value)
1017028
def key_file=(*args)
      path, passphrase = args.flatten
      ssl_context.key = OpenSSL::PKey::RSA.new(File.open(path), passphrase)
    end
922541
private OrderedHashSet addGranteeAndRoles(OrderedHashSet set) {

        Grantee candidateRole;

        set.add(this);

        for (int i = 0; i < roles.size(); i++) {
            candidateRole = (Grantee) roles.get(i);

            if (!set.contains(candidateRole)) {
                candidateRole.addGranteeAndRoles(set);
            }
        }

        return set;
    }
3188
def add2(self, target, path_settings, method):
        
        return self.add(method, path_settings, target)
247504
def add2set(self, pid, key, value):
    """"""
    prop = self.property_entries[pid]

    current = prop.objects.get(key, None)
    current_local_key = prop.references.get(key, None)

    if current and current is not value:
        current.detach()

    if current_local_key is None:
        prop.references[key] = prop.next_free_key
        prop.next_free_key += 1

    prop.objects[key] = value

    if prop.parent.dir:
        ref = prop.index_ref_name(key)
        dir_entry = prop.parent.dir.get(ref)
        if dir_entry is None:
            dir_entry = prop.parent.dir.makedir(ref)
        if value.dir != dir_entry:
            value.attach(dir_entry)
        prop.mark_modified()
1273204
def _dir_additions(self):
        
        rv = set()
        for accessor in self._accessors:
            try:
                getattr(self, accessor)
                rv.add(accessor)
            except AttributeError:
                pass
        return rv
655715
def add_key(self, key, first=False):
        
        if first:
            self.keys = [key] + self.keys
        else:
            self.keys.append(key)
        if isinstance(key, VSpaceKey):
            self.space = key