Process post-flash.
767591
def ingest_flash(self):
        """"""

        self.flash = extract_flash(self.hdulist[0].header, self.hdulist[1])

        # Set post-flash to zeros
        if self.flash is None:
            self.flash = np.zeros_like(self.science)
            return

        # Apply the flash subtraction if necessary.
        # Not applied to ERR, to be consistent with ingest_dark()
        if self.flshcorr != 'COMPLETE':
            self.science = self.science - self.flash
69290
def image_postprocess(imagefile, output, size, crop, render):
    
    try:
        from PIL import Image
    except ImportError:
        import Image

    img = Image.open(imagefile)
    size_crop = None
    img_resized = img
    if size and crop and crop.lower() == 'true':
        width_raw, height_raw = img.size
        width, height = size
        height_better = int(height_raw * (float(width) / width_raw))
        if height < height_better:
            size_crop = (0, 0, width, height)

    try:
        if size_crop:
            size_better = width, height_better
            img_better = img.resize(size_better, Image.ANTIALIAS)
            img_resized = img_better.crop(size_crop)
        elif size:
            img_resized = img.resize(size, Image.ANTIALIAS)

        # If save with 'bmp' use default mode('RGBA'), it will raise:
        # "IOError: cannot write mode RGBA as BMP".
        # So, we need convert image mode
        # from 'RGBA' to 'RGB' for 'bmp' format.
        if render == 'bmp':
            img_resized = img_resized.convert('RGB')
        # Fix IOError: cannot write mode RGBA as XBM
        elif render == 'xbm':
            img_resized = img_resized.convert('1')
        # Works with either filename or file-like object
        img_resized.save(output, render)
    except KeyError:
        raise UnsupportedImageFormat
    except IOError as e:
        raise CaptureError(e)
239803
public function postFlush()
    {
        foreach ($this->redirections as $redirection) {
            $redirectionEvent = new BuildRedirectionEvent($redirection['from'], $redirection['to'], true);
            $this->dispatcher->dispatch(RedirectionEvents::BUILD, $redirectionEvent);
        }

        $this->redirections = [];
    }
731292
def flash(
    categories, param_file, project_dir, plugin, target,
    status_update_interval, board
):
    
    _init(board, project_dir)
    _run(
        categories, param_file, project_dir, plugin, target,
        status_update_interval
    )
    print "Done"
506201
protected function postProcessing(): void
    {
        if (isset($this->value)) {
            $this->value = array_map(function ($item) {
                if (ctype_digit($item)) {
                    return intval($item);
                } else {
                    return $item;
                }
            }, $this->value);
        }
    }
1243553
def postprocess_html(html, metadata):
  """"""
  if metadata.get('build_lists') and metadata['build_lists'] == 'true':
    html = html.replace('<ul>', '<ul class="build">')
    html = html.replace('<ol>', '<ol class="build">')
  return html
895872
function postProcess (output) {
  var self = this;
  this.rules.forEach(function (rule) {
    if (typeof rule.append === 'function') {
      output = join(output, rule.append(self.options));
    }
  });

  return output.replace(/^[\t\r\n]+/, '').replace(/[\t\r\n\s]+$/, '')
}
896152
protected function moveFlash()
    {
        if (!isset($_SESSION[static::FLASH_NEXT])) {
            $_SESSION[static::FLASH_NEXT] = [];
        }
        $_SESSION[static::FLASH_NOW] = $_SESSION[static::FLASH_NEXT];
        $_SESSION[static::FLASH_NEXT] = [];
        $this->flashMoved = true;
    }
1264553
public function after()
    {

        // ~ Display footer script timer
        $this->time += microtime(true);
        $style = new Style(' *** END SCRIPT - Time taken: ' . round($this->time, 2) . 's - ' . date('Y-m-d H:i:s') . ' ***');
        $style->color('fg', Style::COLOR_GREEN);

        Out::std($style->get());
    }
1135960
def flash(function, links, thread_count):
    """"""
    # Convert links (set) to list
    links = list(links)
    threadpool = concurrent.futures.ThreadPoolExecutor(
            max_workers=thread_count)
    futures = (threadpool.submit(function, link) for link in links)
    for i, _ in enumerate(concurrent.futures.as_completed(futures)):
        if i + 1 == len(links) or (i + 1) % thread_count == 0:
            print('%s Progress: %i/%i' % (info, i + 1, len(links)),
                    end='\r')
    print('')
1305962
public void processHighlighter () {
		if (highlights == null) return;
		highlights.clear();
		if (highlighter != null) highlighter.process(this, highlights);
		chunkUpdateScheduled = true;
	}
799796
public function runAfterView() {
        if($this->_afterView !== null) {
            foreach($this->_afterView as $hookProvider) {
                $hookProvider->doAfterView();
            }
        }
    }
753399
def after(self, context):
        ""
        self._invoke(self._after, context)
        run.after_each.execute(context)
10851
protected function _cleanup_flash()
	{
		foreach($this->flash as $key => $value)
		{
			if ($value['state'] === 'expire')
			{
				unset($this->flash[$key]);
			}
		}
	}
248834
public void postProcess() {
		if (foreignColumnName != null) {
			foreignAutoRefresh = true;
		}
		if (foreignAutoRefresh && maxForeignAutoRefreshLevel == NO_MAX_FOREIGN_AUTO_REFRESH_LEVEL_SPECIFIED) {
			maxForeignAutoRefreshLevel = DatabaseField.DEFAULT_MAX_FOREIGN_AUTO_REFRESH_LEVEL;
		}
	}
943613
private void postProcess(ProcessMethodCallback callback, TransactionContext txContext,
                           InputDatum input, ProcessMethod.ProcessResult result) {
    InputContext inputContext = input.getInputContext();
    Throwable failureCause = null;
    FailureReason.Type failureType = FailureReason.Type.IO_ERROR;
    try {
      if (result.isSuccess()) {
        // If it is a retry input, force the dequeued entries into current transaction.
        if (input.getRetry() > 0) {
          input.reclaim();
        }
        txContext.finish();
      } else {
        failureCause = result.getCause();
        failureType = FailureReason.Type.USER;
        txContext.abort();
      }
    } catch (Throwable e) {
      LOG.error("Transaction operation failed: {}", e.getMessage(), e);
      failureType = FailureReason.Type.IO_ERROR;
      if (failureCause == null) {
        failureCause = e;
      }
      try {
        if (result.isSuccess()) {
          txContext.abort();
        }
      } catch (Throwable ex) {
        LOG.error("Fail to abort transaction: {}", inputContext, ex);
      }
    }

    try {
      if (failureCause == null) {
        callback.onSuccess(result.getEvent(), inputContext);
      } else {
        callback.onFailure(result.getEvent(), inputContext,
                           new FailureReason(failureType, failureCause.getMessage(), failureCause),
                           createInputAcknowledger(input));
      }
    } catch (Throwable t) {
      LOG.error("Failed to invoke callback.", t);
    }
  }
84395
public function postLoad()
    {
        $tmpModified = $this->_modified;
        $this->isloaded = true;
        $this->initData();
        $this->_modified = $tmpModified;
    }