Store the given options into the file. Existing options with the same keys
 will be overwritten.
500624
def store(options)
      @options = self.options.merge(options)
      FileUtils.touch(@path)
      File.open(@path, 'w') do |file|
        YAML.dump(@options, file)
      end
    end
1243383
def save fname, options={}
      File.open(fname,"wb"){ |f| f << export(options) }
    end
1293117
def write_options_to_YAML(self, filename):
        
        fd = open(filename, "w")
        yaml.dump(_options_to_dict(self.gc), fd, default_flow_style=False)
        fd.close()
1121681
def append_file(self, file, **options):
		
		self.append(PNG.open_any(file), **options)
53431
def store(self, filename=None, label=None, desc=None, date=None):
        
        date = datetime.now() if date is None else date
        filename = filename if filename else date.replace(microsecond=0).isoformat() + '.mat'

        def storeWithFileLikeObject(file_like):
            content = {
                'elapsed_time': self.elapsed_time,
                'solution': self.solution,
                'version': version(),
            }
            self.model.store(file_like, label, desc, date)
            savemat(file_like, content, appendmat=True)

        if isinstance(filename, file):
            storeWithFileLikeObject(filename)
        else:
            with open(filename, 'wb') as f:
                storeWithFileLikeObject(f)
1276625
def save(filename=ConfigPath):
    """"""
    default_values = defaults()
    parser = configparser.RawConfigParser()
    parser.optionxform = str # Force case-sensitivity on names
    try:
        save_types = basestring, int, float, tuple, list, dict, type(None)
        for k, v in sorted(globals().items()):
            if not isinstance(v, save_types) or k.startswith("_") \
            or default_values.get(k, parser) == v: continue # for k, v
            try: parser.set("DEFAULT", k, json.dumps(v))
            except Exception: pass
        if parser.defaults():
            with open(filename, "wb") as f:
                f.write("# %s %s configuration written on %s.\n" % (Title, Version,
                        datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")))
                parser.write(f)
        else: # Nothing to write: delete configuration file
            try: os.unlink(filename)
            except Exception: pass
    except Exception:
        logging.warn("Error writing config to %s.", filename, exc_info=True)
1058382
def save(self):
        
        with open(self._filename, "w") as f:
            self.config.write(f)
299240
public static void storeProperties(Properties p, File file) throws IOException {
        FileOutputStream fos = new FileOutputStream(file);
        try {
            p.store(fos,"");
        } finally {
            ArchiveUtils.closeQuietly(fos);
        }
    }
743835
def save config_file
      config_file ||= @config_file
      File.open(config_file, 'w') do |f|
        f.puts self.to_s
      end
    end
1105445
def store_extra_info(self, key: str, value: Any) -> None:
        
        self.extra_keys[key] = value
260171
def options_from_file(args):
    
    logger.debug("updating options from config files")
    updated_from_file = []
    for config_file in CONFIG_FILES:
        logger.debug("updating from: %s", config_file)
        parser = ConfigParser()
        parser.read(config_file)
        try:
            items = parser.items('fades')
        except NoSectionError:
            continue

        for config_key, config_value in items:
            if config_value in ['true', 'false']:
                config_value = config_value == 'true'
            if config_key in MERGEABLE_CONFIGS:
                current_value = getattr(args, config_key, [])
                if current_value is None:
                    current_value = []
                current_value.append(config_value)
                setattr(args, config_key, current_value)
            if not getattr(args, config_key, False) or config_key in updated_from_file:
                # By default all 'store-true' arguments are False. So we only
                # override them if they are False. If they are True means that the
                # user is setting those on the CLI.
                setattr(args, config_key, config_value)
                updated_from_file.append(config_key)
                logger.debug("updating %s to %s from file settings", config_key, config_value)

    return args
544924
def save(self, key, kw):
        
        if key not in self:
            obj = hdf5.LiteralAttrs()
        else:
            obj = self[key]
        vars(obj).update(kw)
        self[key] = obj
        self.flush()
513830
private void save(OneOrOther<File, Path> configFile) throws IOException {
		if (configFile.isOne()) {
			File config = configFile.getOne();
			this.saveToWriter(getFileWriter(config));
		} else {
			Path config = configFile.getOther();
			this.saveToWriter(getPathWriter(config));
		}
	}
583843
def munge_options(options)
      keys_to_munge = [:build_directory, :tayfile]
      munged = {}
      options.keys.each do |key|
        if keys_to_munge.include?(key)
          new_key = key.to_s.gsub(/_/, '-')
        end
        munged[new_key || key] = options[key]
      end
      munged
    end
1010124
def set(self, key, value):
        

        data = self._load_file()
        data[key] = value
        self._save_file(data)
590946
def save(self):
		
		with open(self.configuration_file, 'w') as file_h:
			file_h.write(self._serializer('dumps', self._storage))
830807
private function store()
    {
        $settings = [];
        foreach ($this->settings as $key => $value) {
            $settings[$key] = serialize($value);
        }
        file_put_contents($this->cacheFile, json_encode($settings));
    }