Saves html explanation to file. .

        Params:
            file_path: file to save explanations to

        See as_html() for additional parameters.
965325
def save_to_file(self,
                     file_path,
                     labels=None,
                     predict_proba=True,
                     show_predicted_value=True,
                     **kwargs):
        
        file_ = open(file_path, 'w', encoding='utf8')
        file_.write(self.as_html(labels=labels,
                                 predict_proba=predict_proba,
                                 show_predicted_value=show_predicted_value,
                                 **kwargs))
        file_.close()
404550
def save_to_file(self, path, human=True):
        
        write_file(path, self.dump(human))
        slog.info("Save %a done.", path)
962796
def write_file(self, path, contents):
		
		path = self._get_dist_path(path)
		if not os.path.isdir(os.path.dirname(path)):
			os.makedirs(os.path.dirname(path))
		if isinstance(contents, bytes):
			mode = 'wb+'
		else:
			mode = 'w'
		with open(path, mode) as file:
			file.write(contents)
625512
def save(self, path="speech"):
        
        if self._data is None:
            raise Exception("There's nothing to save")

        extension = "." + self.__params["format"]
        if os.path.splitext(path)[1] != extension:
            path += extension

        with open(path, "wb") as f:
            for d in self._data:
                f.write(d)

        return path
1333479
def save(self):
        
        content = self.dumps()
        fileutils.save_text_to_file(content, self.file_path)
1011958
def save(path,data)
     
      File.open(path,'w') do |file|
        file.puts data
      end

      if File.exists?(path)
        `pl -input #{path} -output #{path}`
      end

    end
598458
def saveto(self, path, sortkey = True):
        
        with open(path, 'w') as f:
            self.savetofile(f, sortkey)
832273
def save(self, path):
        
        with open(path, 'w') as out_file:
            json.dump(self.to_dict(), out_file, indent=4)
1271907
def load_file(self, path):
        
        res = None

        if not path:
            IOError("No path specified to save")

        if not os.path.isfile(path):
            raise IOError("File not found {}".format(path))

        try:
            with io.open(path, "r", encoding="utf-8") as f:
                if path.endswith(".json"):
                    res = self._load_json_file(f)
                elif path.endswith(".yaml") or path.endswith(".yml"):
                    res = self._load_yaml_file(f)
        except IOError:
            raise
        except Exception as e:
            self.exception("Failed reading {}".format(path))
            raise IOError(e)
        return res
481383
def _serve_file(self, abspath, params):
    
    relpath = os.path.relpath(abspath, self._root)
    breadcrumbs = self._create_breadcrumbs(relpath)
    link_path = urlunparse(['', '', relpath, '', urlencode(params), ''])
    args = self._default_template_args('file.html')
    args.update({'root_parent': os.path.dirname(self._root),
                 'breadcrumbs': breadcrumbs,
                 'link_path': link_path})
    content = self._renderer.render_name('base.html', args).encode("utf-8")
    self._send_content(content, 'text/html')
1045290
def save(self, path=None, encoding=None, eol=None):
        
        path = path or self.path
        encoding = encoding or self.encoding

        save_file = codecs.open(path, 'w+', encoding=encoding)
        self.write_into(save_file, eol=eol)
        save_file.close()
831176
def export_html(path="./plot.html", to_png=false)
      path = File.expand_path(path, Dir::pwd)
      body = generate_html("../templates/iruby.erb")
      temp_path = File.expand_path("../templates/static_html.erb", __FILE__)
      template = File.read(temp_path)
      num = File.write(path, ERB.new(template).result(binding))
      "Plot was saved to " + path
    end
779811
def save(self, savepath, **kwargs):
        
        
        self.update_bbox()
        tempfile = open(savepath,"w")
        json.dump(self._data, tempfile, **kwargs)
        tempfile.close()
1167882
def save(path, prefix = '')
      FileUtils.mkdir_p(path)
      @edge_tab.save(File.expand_path(prefix + 'edges.tab', path))
      @node_tab.save(File.expand_path(prefix + 'nodes.tab', path))
    end
1228024
def save(yaml_dict, filepath):
    '''
    
    '''
    yamldict.dump(yaml_dict, open(filepath, 'w'), default_flow_style=False)
749430
def save_file(path, text):
    
    dir = os.path.dirname(path)
    if not os.path.exists(dir):
        os.makedirs(dir)

    fd = open(path, 'w')
    try:
        fd.write(text)
    finally:
        fd.close()
1154175
def save_file(self, filename = 'StockChart'):
        
        filename = filename + '.html'
        
        with open(filename, 'w') as f:
            #self.buildhtml()
            f.write(self.htmlcontent)
        
        f.closed