Removes magic constants from current replace list.
8145
def _unset_magic_constants(self):
        
        if '__FILE__' in self._replace:
            del self._replace['__FILE__']

        if '__ROUTINE__' in self._replace:
            del self._replace['__ROUTINE__']

        if '__DIR__' in self._replace:
            del self._replace['__DIR__']

        if '__LINE__' in self._replace:
            del self._replace['__LINE__']
940351
protected function cleanOriginalSource()
    {
        $patterns     = synapse()->memory->substitute()->keys()->all();
        $replacements = synapse()->memory->substitute()->values()->all();

        $this->source = mb_strtolower($this->original);
        $this->source = preg_replace($patterns, $replacements, $this->source);
        $this->source = preg_replace('/[^\pL\d\s]+/u', '', $this->source);
        $this->source = remove_whitespace($this->source);
    }
348961
private function removeObsoleteMetadata(): void
  {
    // 1 pass through $mySources make new array with routine_name is key.
    $clean = [];
    foreach ($this->sources as $source)
    {
      $routine_name = $source['routine_name'];
      if (isset($this->phpStratumMetadata[$routine_name]))
      {
        $clean[$routine_name] = $this->phpStratumMetadata[$routine_name];
      }
    }

    $this->phpStratumMetadata = $clean;
  }
790708
def clear_symbols(self, index):
        """"""
        try:
            del self.table[index:]
        except Exception:
            self.error()
        self.table_len = len(self.table)
536510
def strip_line_magic_v3(cls,line):
        """"""

        matches = re.findall("run_line_magic\(([^]]+)", line)
        if matches and matches[0]: # This line contains the pattern
            match = matches[0]
            if match[-1] == ')':
                match = match[:-1] # Just because the re way is hard
            magic_kind,stripped = eval(match)
        else:
            stripped = line
            magic_kind = ""
        return stripped,magic_kind
719249
def clean(self):
        """"""
        terms = list(self)

        for t in terms:
            self.doc.remove_term(t)
332268
def remove_prefix_refs(ref)
      regex = %r{\Arefs/(?<stripped_ref>.+)\Z}
      match = regex.match(ref)
      fail InvalidRefPrefixError, "ref: #{ref}" unless match
      match[:stripped_ref]
    end
978469
private void removePropertyStrings(Service s) {
        String type = s.getType();
        String algorithm = s.getAlgorithm();
        // use super() to avoid permission check and other processing
        super.remove(type + "." + algorithm);
        for (String alias : s.getAliases()) {
            super.remove(ALIAS_PREFIX + type + "." + alias);
        }
        for (Map.Entry<UString,String> entry : s.attributes.entrySet()) {
            String key = type + "." + algorithm + " " + entry.getKey();
            super.remove(key);
        }
        if (registered) {
          Security.increaseVersion();
        }
    }
106544
def _clean_bindings(self, bindings):
        
        return list(filter(lambda b: not isinstance(b, QueryExpression), bindings))
907931
def _remove_otiose(lst):
    """"""
    listtype = type([])
    while type(lst) == listtype and len(lst) == 1:
        lst = lst[0]

    return lst
86974
def __regrab(changes):
    
    for wid, mods, kc in __keybinds.keys():
        if kc in changes:
            ungrab_key(wid, mods, kc)
            grab_key(wid, mods, changes[kc])

            old = (wid, mods, kc)
            new = (wid, mods, changes[kc])
            __keybinds[new] = __keybinds[old]
            del __keybinds[old]
850037
function applyReplacements(str, replacements) {
    var result = "",
        replacement,
        i;

    for (i = 0; i < replacements.length; i++) {
        replacement = replacements[i];
        if (replacement) {
            result += replacement.newStr;
            i += replacement.oldStr.length - 1;
        } else {
            result += str.charAt(i);
        }
    }

    result += str.substr(i, str.length);

    return result;
}
1190772
def _remove_prefix(name):
    """"""
    if isinstance(name, str):
        return _do_remove_prefix(name)
    return [_do_remove_prefix(nm) for nm in name]
1037739
def filter_magic(source, magic, strip=True):
    
    filtered, magic_lines=[],[]
    for line in source.splitlines():
        if line.strip().startswith(magic):
            magic_lines.append(line)
        else:
            filtered.append(line)
    if strip:
        magic_lines = [el.replace(magic,'') for el in magic_lines]
    return '\n'.join(filtered), magic_lines
671060
def clean_meta(rst_content):
    """"""

    rst = rst_content.split('\n')
    for i, line in enumerate(rst):
        if line.startswith('#'):
            continue
        break
    return '\n'.join(rst[i:])
434374
def cleanup(self):
        
        empty_keys = [k for k, v in self.items() if not v]

        for k in empty_keys:
            del self[k]
455241
private void removeInstancePrefix() {
    Properties newProperties = new Properties();
    for (Map.Entry<Object, Object> entry : mProperties.entrySet()) {
      String key = entry.getKey().toString();

      if (key.startsWith("*") || key.startsWith("worker") || key.startsWith("master")) {
        String newKey = key.substring(key.indexOf('.') + 1);
        newProperties.put(newKey, entry.getValue());
      } else {
        newProperties.put(key, entry.getValue());
      }
    }
    mProperties = newProperties;
  }