Symbolizes keys. Changes `database` key to `database_dir`.
516838
def symbolise(data)
      return {} unless data
      # Symbolize keys.
      Hash[data.map { |k, v| [k.to_sym, v] }]
    end
638564
def _key(key=''):
    '''
    
    '''
    if not isinstance(key, datastore.Key):
        # Switchboard uses ':' to denote one thing (parent-child) and datastore
        # uses it for another, so replace ':' in the datastore version of the
        # key.
        safe_key = key.replace(':', '|')
        key = datastore.Key(os.path.join(NAMESPACE, safe_key))
    return key
835373
def symbolize_keys(hash)
      hash.inject({}) do |h, (key, value)|
        h[key.to_sym] = value.is_a?(Hash) ? symbolize_keys(value) : value
        h
      end
    end
1333510
def main(database_dir, target_dir):
    """"""
    if not os.path.isdir(database_dir):
        raise click.ClickException("Database directory does not exist!")
    try:
        os.makedirs(target_dir)
    except:
        pass
    try:
        parse(database_dir, target_dir)
    except CronosException as ex:
        raise click.ClickException(ex.message)
679954
def symbolize_hash_keys(hash)
      hash.inject({}) do |new_hash, (key, value)|
        new_hash[(key.to_sym rescue key) || key] = value
        new_hash
      end
      hash
    end
723956
def symbolize_key(key)
      return key unless key.respond_to?(:split)
      key.split(':').last.underscore.to_sym
    end
1269406
def apply_to(self,
                 db: Union[BaseDB, ABC_Mutable_Mapping],
                 apply_deletes: bool = True) -> None:
        
        for key, value in self._changes.items():
            if value is DELETED:
                if apply_deletes:
                    try:
                        del db[key]
                    except KeyError:
                        pass
                else:
                    pass
            else:
                db[key] = value
53191
def symbolize(allowed_keys: nil, allowed_vals: nil)
      keys = allowed_keys || self.class.allowed[:keys]

      map do |v|
        v = v.to_sym unless !v.respond_to?(:to_sym) || keys.include?(v.class)
        !v.respond_to?(:symbolize) ? v : v.symbolize({
          :allowed_keys => allowed_keys,
          :allowed_vals => allowed_vals
        })
      end
    end
848096
def _conn_key(self, instance, db_key, db_name=None):
        ''' 
        '''
        dsn, host, username, password, database, driver = self._get_access_info(instance, db_key, db_name)
        return '{}:{}:{}:{}:{}:{}'.format(dsn, host, username, password, database, driver)
639024
function move(key, index, req) {
  var val = this.getKey(key)
    , db = this.store.getDatabase(index, this.options);
  //console.dir(val);
  if(!val || db.keyExists(key)) return 0;
  db.setKey(key, val);
  this.delKey(key);
  return 1;
}
1280840
def set_dir(self, dir_):
        """"""

        self.__lock_set_dir(dir_)
        self.__lock_auto_load()
        self.__lock_update_table()
        self.__update_info()
        self.__update_window_title()
647385
def replace_keys(d, keymap, force_snake_case):
    
    return {
        to_snake(keymap.get(k, k)) if force_snake_case else keymap.get(k, k):
            v for k, v in d.items()
    }
774363
def symbolify_keys(hash)
      hash.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
    end
1244069
def reorder_keys(self, keys):
        ''''''
        if len(keys) != len(self._set):
            raise ValueError('The supplied number of keys does not match.')
        if set(keys) != self._set:
            raise ValueError('The supplied keys do not match the current set of keys.')
        self._keys = list(keys)
1262492
function rename(key, newkey, req) {
  var val = this.getKey(key);
  this.delKey(key);
  this.setKey(newkey, val);
  return OK;
}
297544
def prefix(self, keys):
        
        assert isinstance(keys, tuple)

        self._prefix = keys
        self._load_prefix_binding()
1243776
def _fix_key(self, key):
        
        if not key.startswith(self.GCONF_DIR):
            return self.GCONF_DIR + key
        else:
            return key