Save.

        Parameters
        ----------
        fp : `None`, optional
507236
def do_save(self, fp=None):
        
        if fp is not None:
            raise NotImplementedError()
        self.update_main_table()
        self.db.commit()
688872
def save(self, *args, **kwargs):
        
        writer = None
        if 'writer' in kwargs.keys():
            writer = kwargs.pop('writer')
        else: writer = default_writer
        super().save(*args, **kwargs, writer=writer)
1257184
def save(self, *args, **kwargs):
        
        super(ModelDiffMixin, self).save(*args, **kwargs)
        self.__initial = self._dict
1079276
def save(self):
        
        self.stack.append(self.dispatch_table)
        self.dispatch_table = self.default_table.copy()
560571
def save(self, filename=None):
        
        content = self.data.yaml()
        with open(Config.path_expand(ConfigDict.filename), 'w') as f:
            f.write(content)
34155
def save(cls, flow, fname):
        
        result = None
        try:
            f = open(fname, 'w')
            f.write(flow.to_json())
            f.close()
        except Exception, e:
            result = str(e)
        return result
1087051
def save(opts={})
    options = { :validate => true }.merge(opts)
    return false if !(new_record? || changed?)
    if options[:validate]
      return false if !valid?
    end
    begin
      save!(options)
    rescue
      return false
    end
    true
  end
1332679
def save(func):
    
    def aux(self, *args, **kwargs):
        out = func(self, *args, **kwargs)
        path = (hasattr(self, 'path') and self.path
                or os.path.join(os.getcwd(), '.td'))
        gpath = (hasattr(self, 'gpath') and self.gpath
                 or os.path.expanduser('~/.tdrc'))
        if os.path.exists(path):
            shutil.copy2(path, os.path.join(os.path.dirname(path), '.td~'))
        open(path, 'w').write(
            json.dumps({
                'items': self.data,
                'refs': self.refs,
                'options': self.options
            })
        )
        open(gpath, 'w').write(json.dumps(self.globalOptions))
        return out
    return aux
1054087
def do_save(self, fp=None):
        
        if fp is None:
            fp = sys.stdout
        data = {
            'settings': self.settings,
            'nodes': self.nodes,
            'backward': self.backward
        }
        json.dump(data, fp, ensure_ascii=False)
990337
def save(self, filename, wildcard='*', verbose=False):
        ''''''
        f = open(filename, mode='w')
        k = list(self.keys())
        k.sort()
        count = 0
        for p in k:
            if p and fnmatch.fnmatch(str(p).upper(), wildcard.upper()):
                f.write("%-16.16s %f\n" % (p, self.__getitem__(p)))
                count += 1
        f.close()
        if verbose:
            print("Saved %u parameters to %s" % (count, filename))
1293663
function (fp, opts) {
    var dest = path.resolve(this.dest(fp || this.path, opts));
    var file = { contents: this.content, path: dest };
    opts = extend({ ask: true, silent: false }, this.options, opts);

    utils.detect(file, opts, function (err) {
      if (file.contents) {
        utils.writeSync(dest, file.contents);
        utils.success('file written to', utils.bold(dest));
      } else {
        utils.copy.sync(this.path, dest);
        utils.success('file copied to', utils.bold(dest));
      }
    });
    return this;
  }
678853
def save(self, incoming_stream, size_limit=None, size=None,
             chunk_size=None, progress_callback=None):
        """"""
        fp = self.open(mode='wb')
        try:
            bytes_written, checksum = self._write_stream(
                incoming_stream, fp, chunk_size=chunk_size,
                progress_callback=progress_callback,
                size_limit=size_limit, size=size)
        except Exception:
            fp.close()
            self.delete()
            raise
        finally:
            fp.close()

        self._size = bytes_written

        return self.fileurl, bytes_written, checksum
1362140
def save(self, *args, **kwargs):
        
        try:
            prev_instance = self.__class__.objects.get(pk=self.pk)
        except self.DoesNotExist:
            prev_instance = None

        if prev_instance is None or (not prev_instance.is_active and self.is_active or
                                     self.schedule != prev_instance.schedule):
            self.update_next_trigger_at()

        super(ScheduleMixin, self).save(*args, **kwargs)
853682
def save(self, safe=None):
        
        self._session.insert(self, safe=safe)
        self._session.flush()
221807
def save(path, params = {})
            options =
            {
                delinearize: true,
                recompile: true,
                decrypt: false
            }
            options.update(params)

            if self.frozen? # incompatible flags with frozen doc (signed)
                options[:recompile] =
                options[:rebuild_xrefs] =
                options[:noindent] =
                options[:obfuscate] = false
            end

            if path.respond_to?(:write)
                fd = path
            else
                path = File.expand_path(path)
                fd = File.open(path, 'w').binmode
                close = true
            end

            load_all_objects unless loaded?

            intents_as_pdfa1 if options[:intent] =~ /pdf[\/-]?A1?/i
            self.delinearize! if options[:delinearize] and self.linearized?
            compile(options) if options[:recompile]

            fd.write output(options)
            fd.close if close

            self
        end
227268
def save(self, fn:PathOrStr):
        ""
        x = image2np(self.data*255).astype(np.uint8)
        PIL.Image.fromarray(x).save(fn)
323125
def save_to_file fn, talk=true
    FileUtils.mkdir_p File.dirname(fn)
    if File.exist? fn
      unless BufferManager.ask_yes_or_no "File \"#{fn}\" exists. Overwrite?"
        info "Not overwriting #{fn}"
        return
      end
    end
    begin
      File.open(fn, "w") { |f| yield f }
      BufferManager.flash "Successfully wrote #{fn}." if talk
      true
    rescue SystemCallError, IOError => e
      m = "Error writing file: #{e.message}"
      info m
      BufferManager.flash m
      false
    end
  end