save the current interpretation temporarily (not to a file)
351009
def on_save_interpretation_button(self, event):
        
        if "specimen_int_uT" not in self.Data[self.s]['pars']:
            return
        if 'deleted' in self.Data[self.s]['pars']:
            self.Data[self.s]['pars'].pop('deleted')
        self.Data[self.s]['pars']['saved'] = True

        # collect all interpretation by sample
        sample = self.Data_hierarchy['specimens'][self.s]
        if sample not in list(self.Data_samples.keys()):
            self.Data_samples[sample] = {}
        if self.s not in list(self.Data_samples[sample].keys()):
            self.Data_samples[sample][self.s] = {}
        self.Data_samples[sample][self.s]['B'] = self.Data[self.s]['pars']["specimen_int_uT"]

        # collect all interpretation by site
        # site=thellier_gui_lib.get_site_from_hierarchy(sample,self.Data_hierarchy)
        site = thellier_gui_lib.get_site_from_hierarchy(
            sample, self.Data_hierarchy)
        if site not in list(self.Data_sites.keys()):
            self.Data_sites[site] = {}
        if self.s not in list(self.Data_sites[site].keys()):
            self.Data_sites[site][self.s] = {}
        self.Data_sites[site][self.s]['B'] = self.Data[self.s]['pars']["specimen_int_uT"]

        self.draw_sample_mean()
        self.write_sample_box()
        self.close_warning = True
1229856
def save(self, filename, callback=_noop_callback):
        
        with open(filename, 'wb') as fp:
            self._save(fp, callback)
915798
def save(self, filename, addnormalised=False):
        """"""
        f = io.open(filename,'w',encoding='utf-8')
        for line in self.output("\t", addnormalised):
            f.write(line + '\n')
        f.close()
988818
def save_global(self, verbose=False):
        
        self.save(os.path.expanduser(os.path.join('~', GLOBALCONFIG)), verbose)
450548
def _save(self, stateName, path):
        """"""
        print('saving...')

        state = {'session': dict(self.opts),
                 'dialogs': self.dialogs.saveState()}

        self.sigSave.emit(state)
        self.saveThread.prepare(stateName, path, self.tmp_dir_session, state)
        self.saveThread.start()

        self.current_session = stateName

        r = self.opts['recent sessions']
        try:
            # is this session already exists: remove it
            r.pop(r.index(path))
        except ValueError:
            pass
        # add this session at the beginning
        r.insert(0, path)
1032697
def save(self, outfile):
        """"""
        if isinstance(outfile, compat.string_type):
            outfile = open(outfile, 'wb')
        outfile.write(self._contents)
267096
def SaveDataToFD(self, raw_data, fd):
    """"""
    fd.write(yaml.Dump(raw_data).encode("utf-8"))
635157
def save_to(path, options = {})
      options[:quotes] ||= %w({ })

      File.open(path, 'w:UTF-8') do |f|
        f.write(to_s(options))
      end

      self
    end
742776
def saveget(self,con):
    ""
    k,v=self.kv()
    oldv=con.getset(k,v)
    if self.TTL is not None: con.expire(k,self.TTL)
    return None if oldv is None else msgpack.loads(oldv)
531779
def save(self, fname):
        """"""
        out = etree.tostring(self.root, xml_declaration=True,
                             standalone=True,
                             pretty_print=True)
        with open(fname, 'wb') as fid:
            fid.write(out)
1365964
def save(self, filename):
        """"""
        proxies = {'http': [], 'https': []}
        for protocol in ['http', 'https']:
            for proxy in self.proxies[protocol]:
                serializable_proxy = self.proxies[protocol][proxy].to_dict()
                proxies[protocol].append(serializable_proxy)
        with open(filename, 'w') as fout:
            json.dump(proxies, fout)
74917
def __generic_save(self):
        """"""
        page = self._get_page()
        f = page.editor.f
        if not f:
            return True
        if not page.editor.flag_valid:
            a99.show_error("Cannot save, {0!s} has error(s)!".format(f.description))
            return True
        if f.filename:
            f.save_as()

            self.add_log("Saved '{}'".format(f.filename))
            page.flag_changed = False
            self._update_gui_text_tabs()

            if hasattr(page.editor, "update_gui_label_fn"):
                page.editor.update_gui_label_fn()  # duck typing
            return True
        else:
            return self.__generic_save_as()
1052369
def save(self):
        """"""
        self._connection.run(['change', '-i'], stdin=format(self), marshal_output=False)
        self._dirty = False
639286
def save(
        self,
        filename: Optional[str] = None,
        show_link: bool = True,
        auto_open: bool = False,
        output: str = 'file',
        plotlyjs: bool = True,
    ) -> str:
        """"""
        if filename is None:
            filename = NamedTemporaryFile(prefix='plotly', suffix='.html', delete=False).name
        # NOTE: this doesn't work for output 'div'
        py.plot(
            self,
            show_link=show_link,
            filename=filename,
            auto_open=auto_open,
            output_type=output,
            include_plotlyjs=plotlyjs,
        )
        return filename
1262053
function saveTransformedData(uri) {
  return function (data) {
    return db.put(uri, JSON.stringify(data))
      .then(function () {
        // If the Promise resolves it means we saved,
        // so let's return the data
        return data;
      });
  };
}
863181
def save_to_temp(content, file_name=None):
    """"""

    #output = "results.html"
    temp_dir = tempfile.gettempdir()
    #tempfile.TemporaryDirectory()
    #tempfile.NamedTemporaryFile(mode='w+t') as f:
    out_file = os.path.join(temp_dir, file_name)
    #if os.path.exists(output) and os.path.isfile(output):
    file = open(out_file, 'w')
    file.write(content)
    file.close()
    #print("results saved in results.html file.")
    #return output
    #output = str(pathlib.Path(f.name))
    return out_file
64153
def temporary_prompt(prompt) #:doc:
      raise Shells::NotRunning unless running?
      old_prompt = prompt_match
      begin
        self.prompt_match = prompt
        yield if block_given?
      ensure
        self.prompt_match = old_prompt
      end
    end