Tries to strip any xrefs information off the document.
968023
def remove_xrefs
            @revisions.reverse_each do |rev|
                if rev.xrefstm?
                    delete_object(rev.xrefstm.reference)
                end

                if rev.trailer.XRefStm.is_a?(Integer)
                    xrefstm = get_object_by_offset(rev.trailer.XRefStm)

                    delete_object(xrefstm.reference) if xrefstm.is_a?(XRefStream)
                end

                rev.xrefstm = rev.xreftable = nil
            end
        end
242292
def clean_up(self):
        """"""
        self.action_buffer = []
        self.sources = {}
        self.doc_to_get = {}
        self.doc_to_update = []
616136
function cleanDocs(docs) {
  for (var i = 0; i < docs.length; i++) {
    var doc = docs[i];
    if (doc._deleted) {
      delete doc._attachments; // ignore atts for deleted docs
    } else if (doc._attachments) {
      // filter out extraneous keys from _attachments
      var atts = Object.keys(doc._attachments);
      for (var j = 0; j < atts.length; j++) {
        var att = atts[j];
        doc._attachments[att] = pouchdbUtils.pick(doc._attachments[att],
          ['data', 'digest', 'content_type', 'length', 'revpos', 'stub']);
      }
    }
  }
}
175203
def strip_stop(tokens, start, result):
    """"""
    for e in result:
        for child in e.iter():
            if child.text.endswith('.'):
                child.text = child.text[:-1]
    return result
213106
def clean(inputline, strip=True, rem_indents=True, encoding_errors="replace"):
    """"""
    stdout_encoding = get_encoding(sys.stdout)
    inputline = str(inputline)
    if rem_indents:
        inputline = inputline.replace(openindent, "").replace(closeindent, "")
    if strip:
        inputline = inputline.strip()
    return inputline.encode(stdout_encoding, encoding_errors).decode(stdout_encoding)
1314666
private static void removeRedundant(Node nodeVersioning) throws Exception{
    VersionHistory versionHistory = nodeVersioning.getVersionHistory();
    String baseVersion = nodeVersioning.getBaseVersion().getName();
    String rootVersion = nodeVersioning.getVersionHistory().getRootVersion().getName();
    VersionIterator versions = versionHistory.getAllVersions();
    Date currentDate = new Date();
    Map<String, String> lstVersions = new HashMap<String, String>();
    List<String> lstVersionTime = new ArrayList<String>();
    while (versions.hasNext()) {
      Version version = versions.nextVersion();
      if(rootVersion.equals(version.getName()) || baseVersion.equals(version.getName())) continue;

      if (maxLiveTime!= DOCUMENT_AUTO_DEFAULT_VERSION_EXPIRED &&
              currentDate.getTime() - version.getCreated().getTime().getTime() > maxLiveTime) {
        versionHistory.removeVersion(version.getName());
      } else {
        lstVersions.put(String.valueOf(version.getCreated().getTimeInMillis()), version.getName());
        lstVersionTime.add(String.valueOf(version.getCreated().getTimeInMillis()));
      }
    }
    if (maxAllowVersion <= lstVersionTime.size() && maxAllowVersion!= DOCUMENT_AUTO_DEFAULT_VERSION_MAX) {
      Collections.sort(lstVersionTime);
      String[] lsts = lstVersionTime.toArray(new String[lstVersionTime.size()]);
      for (int j = 0; j <= lsts.length - maxAllowVersion; j++) {
        versionHistory.removeVersion(lstVersions.get(lsts[j]));
      }
    }
  }
1277994
def cleanLines(source, lineSep=os.linesep):
    
    stripped = (line.strip(lineSep) for line in source)
    return (line for line in stripped if len(line) != 0)
1198440
static Xdr removeRecordMarking(byte[] bytes) {
        Xdr toReturn = new Xdr(bytes.length);
        Xdr input = new Xdr(bytes);

        long fragSize;
        boolean lastFragment = false;

        input.setOffset(0);
        int inputOff = input.getOffset();

        while (!lastFragment) {

            fragSize = input.getUnsignedInt();
            lastFragment = isLastFragment(fragSize);
            fragSize = maskFragmentSize(fragSize);

            toReturn.putBytes(input.getBuffer(), input.getOffset(), (int) fragSize);
            inputOff += fragSize;
            input.setOffset(inputOff);
        }

        // get xid
        int off = toReturn.getOffset();
        toReturn.setOffset(0);
        int xid = toReturn.getInt();
        toReturn.setXid(xid);
        toReturn.setOffset(off);

        return toReturn;
    }
839591
def clean(ctx, dry_run=False):
    """"""
    basedir = ctx.sphinx.destdir or "build/docs"
    cleanup_dirs([basedir], dry_run=dry_run)
1001650
def _strip(text):
        """"""
        text = text.strip()
        text = text.replace('  ', ' ')  # remove duplicate spaces
        text = text.lower()
        for joiner in TextTitle.JOINERS:
            text = text.replace(joiner, 'and')
        for article in TextTitle.ARTICLES:
            if text.startswith(article + ' '):
                text = text[len(article) + 1:]
                break
        return text
983512
public void removeAll()
    {
        if (m_aCurrentRecord != null)
        {
            for (int index = m_iCurrentRecordStart; index < m_iCurrentRecordEnd; index++)
            {
                int iArrayIndex = this.bufferToArrayIndex(index);
                Object bookmark = m_aCurrentRecord[iArrayIndex];
                if ((bookmark != null) && (bookmark != gEmptyCell))
                    this.freeElement(bookmark);
                m_aCurrentRecord[iArrayIndex] = gEmptyCell;   // No record here
            }
        }
        m_iCurrentRecordStart = 0;      // The first
        m_iCurrentRecordEnd = 0;        // One after the last (Use array nomenclature)
    }
200602
def remove_files(self):
        """"""
        file_list = ["molecule.svg","lig.pdb","HIS.pdb","PHE.pdb","TRP.pdb","TYR.pdb","lig.mol","test.xtc"]
        for residue in self.topol_data.dict_of_plotted_res.keys():
            file_list.append(residue[1]+residue[2]+".svg")
        for f in file_list:
            if os.path.isfile(f)==True:
                os.remove(f)
871068
def delete_info(ctx, info):
    """"""
    head = ctx.parent.head
    vcf_handle = ctx.parent.handle
    outfile = ctx.parent.outfile
    silent = ctx.parent.silent
    
    if not info:
        logger.error("No info provided")
        sys.exit("Please provide a info string")
    
    if not info in head.info_dict:
        logger.error("Info '{0}' is not specified in vcf header".format(info))
        sys.exit("Please provide a valid info field")
    
    head.remove_header(info)
    
    print_headers(head, outfile=outfile, silent=silent)
    
    for line in vcf_handle:
        line = line.rstrip()
        new_line = remove_vcf_info(keyword=info, variant_line=line)
        print_variant(variant_line=new_line, outfile=outfile, silent=silent)
719249
def clean(self):
        """"""
        terms = list(self)

        for t in terms:
            self.doc.remove_term(t)
1210006
def _deleteObject(self, xref):
        """"""
        if self.isClosed:
            raise ValueError("operation illegal for closed doc")

        return _fitz.Document__deleteObject(self, xref)
685238
def clean_for_doc(nb):
    
    new_cells = []
    for cell in nb.worksheets[0].cells:
        # Remove the pylab inline line.
        if "input" in cell and cell["input"].strip() == "%pylab inline":
            continue
        # Remove output resulting from the stream/trace method chaining.
        if "outputs" in cell:
            outputs = [_i for _i in cell["outputs"] if "text" not in _i or
                       not _i["text"].startswith("<obspy.core")]
            cell["outputs"] = outputs
        new_cells.append(cell)
    nb.worksheets[0].cells = new_cells
    return nb
212481
def clear_content(self):
        
        if self.sectPr is not None:
            content_elms = self[:-1]
        else:
            content_elms = self[:]
        for content_elm in content_elms:
            self.remove(content_elm)