Removes YAML frontmatter
11182
def strip_frontmatter(source)
      frontmatter = /
        # From the start of the string
        \A
        # First-capture match --- followed by optional whitespace up
        # to a newline then 0 or more chars followed by an optional newline.
        # This matches the --- and the contents of the frontmatter
        (---\s*\n.*?\n?)
        # From the start of the line
        ^
        # Second capture match --- or ... followed by optional whitespace
        # and newline. This matches the closing --- for the frontmatter.
        (---|\.\.\.)\s*$\n?/mx

      if config['skip_frontmatter'] && match = source.match(frontmatter)
        newlines = match[0].count("\n")
        source.sub!(frontmatter, "\n" * newlines)
      end

      source
    end
1262173
function() {
      var t = this,
          components = t.model.get('components');
      components.remove(components.models);
      t.showSettings();
    }
521981
public function yamlFrontMatter($text)
    {
        list($text, $frontmatter) = $this->extractFrontMatter($text, "---\n", "...\n");

        if (!empty($frontmatter)) {
            $frontmatter = $this->yamlParse("---\n$frontmatter...\n");
        }

        return [
            "text" => $text,
            "frontmatter" => $frontmatter
        ];
    }
634047
def remove(spy)
      if @constant_spies[spy.constant_name] == spy
        @constant_spies.delete(spy.constant_name)
      else
        raise NoSpyError, "#{spy.constant_name} was not stubbed on #{base_module.name}"
      end
      self
    end
802968
protected function cleanUpProjectTemplate() {
    // Remove files leftover from acquia/blt-project.
    $result = $this->taskFilesystemStack()
      ->remove($this->getConfigValue('repo.root') . '/.travis.yml')
      ->remove($this->getConfigValue('repo.root') . '/LICENSE.txt')
      ->remove($this->getConfigValue('repo.root') . '/README.md')
      ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE)
      ->run();

    if (!$result->wasSuccessful()) {
      throw new BltException("Could not remove deprecated files provided by acquia/blt-project.");
    }
  }
31174
def unload_fixture(apps, schema_editor):
    
    appmodel = apps.get_model(APP_LABEL, COUNTRY_MODELNAME)
    appmodel.objects.all().delete()
512345
function(e) {
            Y.each(_wrappers, function(v, k) {
                v.detachAll();
                remove(v.el, v.type, v.fn, v.capture);
                delete _wrappers[k];
                delete _el_events[v.domkey][k];
            });
        }
632300
def remove_excluded(self):
        
        # import yaml
        # print yaml.dump({k:v.__json__() for k,v in self.sources.items()}, default_flow_style=False)
        sources = list(self.sources.values())
        for src in sources:
            if src.excluded:
                del self.sources[src.name]
            src.imports = [m for m in src.imports if not self._exclude(m)]
            src.imported_by = [m for m in src.imported_by if not self._exclude(m)]
71969
def clean(args):
    
    p = OptionParser(clean.__doc__)
    opts, args = p.parse_args(args)

    for link_name in os.listdir(os.getcwd()):
        if not op.islink(link_name):
            continue
        logging.debug("remove symlink `{0}`".format(link_name))
        os.unlink(link_name)
1105056
function cleanupAtContainer(container) {
  ReactDOM.unmountComponentAtNode(container)
  if (container.parentNode === document.body) {
    document.body.removeChild(container)
  }
  mountedContainers.delete(container)
}
986242
def delete_deps(self, conf, images):
        """"""
        for dependency_name, _ in conf.dependency_images():
            image = images[dependency_name]
            if image.deleteable_image:
                log.info("Removing un-needed image {0}".format(image.image_name))
                conf.harpoon.docker_api.remove_image(image.image_name)
278699
def cmd_fw_manifest_purge(self):
        ''''''
        for filepath in self.find_manifests():
            os.unlink(filepath)
        self.manifests_parse()
1252304
def Clean():
  """"""
  # Find all the compiled proto files and unlink them.
  for (root, _, files) in os.walk(ROOT):
    for filename in files:
      full_filename = os.path.join(root, filename)
      if full_filename.endswith("_pb2.py") or full_filename.endswith(
          "_pb2.pyc"):
        os.unlink(full_filename)
1107985
def remove(self, name, func):
        '''  '''
        was_empty = self._empty()
        if name in self.hooks and func in self.hooks[name]:
            self.hooks[name].remove(func)
        if self.app and not was_empty and self._empty(): self.app.reset()
56669
def uninit_ui(self):
        
        self.lay.removeWidget(self.tool_pb)
        self.tooltip.deleteLater()
        self.tool_pb.deleteLater()
140560
def pop_front(self):
        ''''''
        backend = self.backend
        return backend.execute(backend.structure(self).pop_front(),
                               self.value_pickler.loads)
455408
function removeExisting ()
{
    if (fs.existsSync("web/assets"))
    {
        var stat = fs.lstatSync("web/assets");

        if (stat.isFile() || stat.isSymbolicLink())
        {
            fs.unlinkSync("web/assets");
        }
        else
        {
            wrench.rmdirSyncRecursive("web/assets");
        }
    }
}