Save the entire configuration files
196035
def save(self):
        
        self.projects.save()
        self.experiments.save()
        safe_dump(self.global_config, self._globals_file,
                  default_flow_style=False)
711341
def dump_config(self):
        """"""
        yaml_content = self.get_merged_config()
        print('YAML Configuration\n%s\n' % yaml_content.read())
        try:
            self.load()
            print('Python Configuration\n%s\n' % pretty(self.yamldocs))
        except ConfigError:
            sys.stderr.write(
                'config parse error. try running with --logfile=/dev/tty\n')
            raise
288632
def save_config(self, data: dict) -> Path:
        """"""
        out_dir = Path(self.families_dir) / data['family']
        out_dir.mkdir(parents=True, exist_ok=True)
        out_path = out_dir / 'pedigree.yaml'
        dump = ruamel.yaml.round_trip_dump(data, indent=4, block_seq_indent=2)
        out_path.write_text(dump)
        return out_path
90359
def save_config(self, cmd="write mem", confirm=False, confirm_response=""):
        """"""
        return super(OneaccessOneOSBase, self).save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )
1008560
def save
      # Don't save default values
      save_config = Rails.application.config.theme.reject { |k, _| @defaults.keys.include?(k) }
      full_config[Rails.env].merge!(save_config)
      File.open(config_pathname, 'w') { |f| f << full_config.to_yaml }
    end
106680
def save(self):
        
        with open(self._user_config_file, 'w', encoding='utf-8') as f:
            self.write(f)
1015747
public function Save () {
		$rawContent = $this->Dump();
		if ($rawContent === FALSE) 
			throw new \Exception('Configuration data was not possible to dump.');
		$app = self::$app ?: self::$app = & \MvcCore\Application::GetInstance();
		$toolClass = $app->GetToolClass();
		try {
			$toolClass::SingleProcessWrite(
				$this->fullPath, 
				$rawContent, 
				'w',	// Open for writing only; place pointer at the beginning and truncate to zero length. If file doesn't exist, create it.
				10,		// Milliseconds to wait before next lock file existence is checked in `while()` cycle.
				5000,	// Maximum milliseconds time to wait before thrown an exception about not possible write.
				30000	// Maximum milliseconds time to consider lock file as operative or as old after some died process.
			);
		} catch (\Exception $ex) {
			throw $ex;
		}
		return TRUE;
	}
1022109
def save_config(**kwargs):
    
    if kwargs == {}:
        kwargs = config._config
    current_config = _load_config()
    current_config.update(**kwargs)
    # write to disk
    fname = _get_config_fname()
    if fname is None:
        raise RuntimeError('config filename could not be determined')
    if not op.isdir(op.dirname(fname)):
        os.mkdir(op.dirname(fname))
    with open(fname, 'w') as fid:
        json.dump(current_config, fid, sort_keys=True, indent=0)
544612
def save_config(
        self, cmd="configuration write", confirm=False, confirm_response=""
    ):
        """"""
        output = self.enable()
        output += self.config_mode()
        output += self.send_command(cmd)
        output += self.exit_config_mode()
        return output
411995
function save_config(path, config) {
	debug.assert(path).is('string');
	debug.assert(config).is('object');
	return $Q.fcall(function stringify_json() {
		return JSON.stringify(config, null, 2);
	}).then(function write_to_file(data) {
		return FS.writeFile(path, data, {'encoding':'utf8'});
	});
}
1029980
def save_config(self, cmd="write mem", confirm=False, confirm_response=""):
        """"""
        return super(CiscoIosBase, self).save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )
1027512
def save_config(self, config_file_name):
        

        with open(config_file_name, 'w+') as f:
            f.write('P_RESET\n')
            for line in self.send_command_return_multilines('p_fullconfig', '?'):
                f.write(line.split(' ', 1)[1].lstrip())
284115
def save_config(template, params)
      config_file = File.join(config_dir, "#{template}.yml")
      config = File.read(config_file)

      params.map { |key, value| config = config.gsub(key, value) }

      File.open(config_file, 'w') { |file| file.write(config) }
    end
276177
def save_config(self, cmd="write memory", confirm=False, confirm_response=""):
        """"""
        return super(UbiquitiEdgeSSH, self).save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )
582448
public function saveAll()
    {
        $this->init();

        $parameters = [];

        foreach ($this->configurations as $configuration) {
            $parameters = array_merge($parameters, $this->getConfigurationParameters($configuration));
        }

        $this->parameterRepository->save($parameters);
    }
839334
private function saveFile(): void
    {
        $sourceCode = Helpers::tabsToSpaces((string) $this->DTOFile);

        $fullPath = implode('/', [
            dirname(__DIR__, 7) . '/src',
            $this->inputData['namespace'],
            $this->inputData['module'] . 'Module',
            $this->inputData['type'],
            $this->inputData['class'] . $this->inputData['type'] . '.php'
        ]);

        $dirname = dirname($fullPath);

        if (!is_dir($dirname)) {
            mkdir($dirname, 0755, true);
        }

        $handle = fopen($fullPath, 'w');
        fwrite($handle, $sourceCode);
        fclose($handle);
    }
1314081
def save_configs(self):
        

        if self.startup_config_content or self.private_config_content:
            startup_config_content, private_config_content = self.extract_configs()
            if startup_config_content:
                config_path = os.path.join(self.working_dir, "startup-config.cfg")
                try:
                    config = startup_config_content.decode("utf-8", errors="replace")
                    with open(config_path, "wb") as f:
                        log.info("saving startup-config to {}".format(config_path))
                        f.write(config.encode("utf-8"))
                except (binascii.Error, OSError) as e:
                    raise IOUError("Could not save the startup configuration {}: {}".format(config_path, e))

            if private_config_content and private_config_content != b'\nend\n':
                config_path = os.path.join(self.working_dir, "private-config.cfg")
                try:
                    config = private_config_content.decode("utf-8", errors="replace")
                    with open(config_path, "wb") as f:
                        log.info("saving private-config to {}".format(config_path))
                        f.write(config.encode("utf-8"))
                except (binascii.Error, OSError) as e:
                    raise IOUError("Could not save the private configuration {}: {}".format(config_path, e))