Remove tokens from list.
350973
def remove(self, *tokens: str) -> None:
        """"""
        from wdom.web_node import WdomElement
        _removed_tokens = []
        for token in tokens:
            self._validate_token(token)
            if token in self:
                self._list.remove(token)
                _removed_tokens.append(token)
        if isinstance(self._owner, WdomElement) and _removed_tokens:
            self._owner.js_exec('removeClass', _removed_tokens)
885344
def remove_by(keys, original):
    """"""
    for i in [
            original[index]
            for index, needed in enumerate(keys) if not needed
    ]:
        original.remove(i)
812371
def handle_unset_list(self, line: str, position: int, tokens: ParseResults) -> ParseResults:
        
        for key in tokens['values']:
            if key in {BEL_KEYWORD_EVIDENCE, BEL_KEYWORD_SUPPORT}:
                self.evidence = None
            else:
                self.validate_unset_command(line, position, key)
                del self.annotations[key]

        return tokens
270711
private function cleanup()
    {
        foreach ($this->tokens as $i => $t) {
            if ($t[0] === self::$deleteToken) {
                unset($this->tokens[$i]);
            }
        }
        $this->tokens = array_values($this->tokens);
    }
504736
def clean_value(self):
        
        result = []
        for mdl in self:
            result.append(super(ListNode, mdl).clean_value())
        return result
1112962
def whitespace_tokenize(text):
    """"""
    text = text.strip()
    if not text:
        return []
    tokens = text.split()
    return tokens
320088
def tokens(istr):
    

    # make a list of all alphanumeric tokens
    toks = re.findall(r'[^\*\\\+\-\^\(\)]+\(?', istr)

    # remove the functions
    return [t for t in toks if not t.endswith('(')]
1006301
def _clean_inheritance_tokens(self):
        """"""

        c = self._copy()
        x = c._data
        x.pop('self', None)
        x.pop('parent', None)
        x.pop('next', None)
        return c
496079
def tokenize(self, token_list):
    """"""
    return [
        self._vocab_dict.get(token, self._vocab_dict[self.UNK])
        for token in token_list
    ]
463080
def __remove_trailing_zeros(self, collection):
        """"""
        index = len(collection) - 1
        while index >= 0 and collection[index] == 0:
            index -= 1

        return collection[:index + 1]
941185
function removeFromList(i, L, R) {
    R[L[i]] = R[i];
    L[R[i]] = L[i];
    R[i] = i;
    L[i] = i;
}
899146
def tokenize(self, s):
    """"""
    s = tf.compat.as_text(s)

    if self.reserved_tokens:
      # First split out the reserved tokens
      substrs = self._reserved_tokens_re.split(s)
    else:
      substrs = [s]

    toks = []
    for substr in substrs:
      if substr in self.reserved_tokens:
        toks.append(substr)
      else:
        toks.extend(self._alphanum_re.split(substr))

    # Filter out empty strings
    toks = [t for t in toks if t]
    return toks
420212
def remove_token(self, token_stack, token):
        """"""
        token_stack.reverse()
        try:
            token_stack.remove(token)
            retval = True
        except ValueError:
            retval = False
        token_stack.reverse()
        return retval
446692
public static function ClearList(){
            $oThis = self::CreateInstanceIfNotExists();
            
            if(preg_match('/{list\:(.*?)}/', $oThis->sBuffer, $aMatches) == 1){
                $sListName = $aMatches[1]; 

                $iStart = strpos($oThis->sBuffer, "{list:{$sListName}}");

                if($iStart > 0)
                    $iEnd = strpos($oThis->sBuffer, "{end}", $iStart);

                if($iStart > 0 && $iEnd > 0)
                    $sList = substr($oThis->sBuffer, $iStart, $iEnd-$iStart)."{end}";

                $oThis->sBuffer = str_replace($sList, "", $oThis->sBuffer);
            }
        }
177032
private function removeWhitespace(): void
    {
        $string = preg_replace('/ {2,}/', Tokens::SPACE, $this->normalisedString);
        $lines = [];

        foreach (explode(Tokens::LINE_FEED, $string) as $line) {
            if ('' !== $line = trim($line)) {
                $lines[] = $line;
            }
        }
        $this->normalisedString = implode(Tokens::LINE_FEED, $lines);
    }
483887
def removeblanklines(astr):
    """"""
    lines = astr.splitlines()
    lines = [line for line in lines if line.strip() != ""]
    return "\n".join(lines)
1133831
def unregister(self, token_to_remove):
        
        for i, (_, token, _) in enumerate(self._filter_order):
            if token == token_to_remove:
                break
        else:
            raise ValueError("unregistered token: {!r}".format(
                token_to_remove))
        del self._filter_order[i]