Restore `self.redir_file` to its original state.
168430
def restore(self):
        
        # NOTE: dup2 makes `self._from_fd` inheritable unconditionally
        self.redir_file.flush()
        os.dup2(self.orig_file.fileno(), self._from_fd)
175376
def rebase(image)
      new_path = @router.baseline_dir(image.name)

      create_path_for_file(new_path)
      FileUtils.move(image.path, new_path)

      Monet::Image.new(new_path)
    end
117020
public function restore()
    {
        $this->offsetRef = $this->offset;
        $this->lineRef = $this->line;
        $this->rowRef = $this->row;
    }
1335875
def restore_directory_state(self, fname):
        """"""
        root = osp.normpath(to_text_string(fname))
        if not osp.exists(root):
            # Directory has been (re)moved outside Spyder
            return
        for basename in os.listdir(root):
            path = osp.normpath(osp.join(root, basename))
            if osp.isdir(path) and path in self.__expanded_state:
                self.__expanded_state.pop(self.__expanded_state.index(path))
                if self._to_be_loaded is None:
                    self._to_be_loaded = []
                self._to_be_loaded.append(path)
                self.setExpanded(self.get_index(path), True)
        if not self.__expanded_state:
            self.fsmodel.directoryLoaded.disconnect(self.restore_directory_state)
173103
def reset(cls):
        """"""
        cls._codecs = {}
        c = cls._codec
        for (name, encode, decode) in cls._common_codec_data:
            cls._codecs[name] = c(encode, decode)
825277
def reset(self):
        
        self._fgcolor = self.default_fgcolor
        self._bgcolor = self.default_bgcolor
474252
def _replace_old_image(self):
        ''' 
        '''
        try:
            old_obj = self.__class__.objects.get(pk=self.pk)
            if old_obj.image.path != self.image.path:
                path = old_obj.image.path
                default_storage.delete(path)
        except self.__class__.DoesNotExist:
            pass
1302337
def monkey_restore():
    """"""
    for k, v in originals.items():
        setattr(time_mod, k, v)
    
    global epoch
    epoch = None
196057
def reset(self):
        ""

        self.zf = zipfile.ZipFile(self.file_name, 'r')
        self._doc = None
232543
def restore(self):
        """"""
        if self.current_editor is not None:
            self.collapseAll()
            editor_id = self.editor_ids[self.current_editor]
            self.root_item_selected(self.editor_items[editor_id])
1012354
def _rescan(self, skip_to_end = True):
      """"""
      # Get listing of matching files.
      paths = []
      for single_glob in self._globspec:
          paths.extend(glob.glob(single_glob))

      # Remove files that don't appear in the new list.
      for path in self._tailedfiles.keys():
         if path not in paths:
            self._tailedfiles[path]._close()
            del self._tailedfiles[path]

      # Add any files we don't have open yet.
      for path in paths:
         try:
            # If the file has been rotated, reopen it.
            if self._tailedfiles[path].hasBeenRotated():
               # If it can't be reopened, close it.
               if not self._tailedfiles[path].reopen():
                  del self._tailedfiles[path]
         except KeyError:
            # Open a file that we haven't seen yet.
            self._tailedfiles[path] = TailedFile(path, skip_to_end = skip_to_end, offset = self._offsets.get(path, None))
388382
def restore(xml_file, options = {})
      options = options.clone
      line_params = RRD.to_line_parameters(options, RESTORE_FLAGS)
      Wrapper.restore(xml_file, rrd_file, *line_params)
    end
963702
def reset():
    
    shutil.rmtree(session['img_input_dir'])
    shutil.rmtree(session['img_output_dir'])
    session.clear()
    return jsonify(ok='true')
1284132
def restore(self):
        """"""
        if not self._snapshot:
            return
        yield from self.set_muted(self._snapshot['muted'])
        yield from self.set_volume(self._snapshot['volume'])
        yield from self.set_stream(self._snapshot['stream'])
        self.callback()
        _LOGGER.info('restored snapshot of state of %s', self.friendly_name)
843438
def reparse(self, filepath):
        """"""
        #The easiest way to do this is to touch the file and then call
        #the regular parse method so that the cache becomes invalidated.
        self.tramp.touch(filepath)
        self.parse(filepath)
1121441
def restore(self):
        """"""
        current, self.nlp.pipeline = self.nlp.pipeline, self.original_pipeline
        unexpected = [name for name, pipe in current if not self.nlp.has_pipe(name)]
        if unexpected:
            # Don't change the pipeline if we're raising an error.
            self.nlp.pipeline = current
            raise ValueError(Errors.E008.format(names=unexpected))
        self[:] = []
758624
def reset(cls):
        
        cls.hide()

        cls.values = None
        cls.filename = "fn"
        cls.dc_out_el.text = ""
        cls.oai_out_el.text = ""
        cls.mrc_out_el.text = ""