Remove ticket directives like "(closes #123).

    >>> remove_ticket_directives('(closes #123)')
    '(#123)'
    >>> remove_ticket_directives('(foo #123)')
    '(foo #123)'
16389
def remove_ticket_directives(message):
    
    if message:
        message = re.sub(r'closes #', '#', message)
        message = re.sub(r'addresses #', '#', message)
        message = re.sub(r'references #', '#', message)
    return message
1256690
def unbind(self, exchange, source, routing_key='', nowait=True,
               arguments={}, ticket=None, cb=None):
        '''
        
        '''
        nowait = nowait and self.allow_nowait() and not cb

        args = Writer()
        args.write_short(ticket or self.default_ticket).\
            write_shortstr(exchange).\
            write_shortstr(source).\
            write_shortstr(routing_key).\
            write_bit(nowait).\
            write_table(arguments or {})
        self.send_frame(MethodFrame(self.channel_id, 40, 40, args))

        if not nowait:
            self._unbind_cb.append(cb)
            self.channel.add_synchronous_cb(self._recv_unbind_ok)
272720
def removeByIndex(self, index):
        """"""
        if index < len(self._invites) -1 and \
           index >=0:
            self._invites.remove(index)
851299
def purge(self, symbol):
        
        logger.warning("Deleting entire metadata history for %r from %r" % (symbol, self._arctic_lib.get_name()))
        self.delete_many({'symbol': symbol})
1268182
function removeBadFields(attrs){
	var badList = ['scores', 'table', 'headers'];
	for(var k in badList){
		if(attrs[badList[k]])
			delete attrs[badList[k]];
	}
}
1179594
function removeServer(provider) {
        var i;
        for (i = 0; i < _serverProviders.length; i++) {
            if (provider === _serverProviders[i]) {
                _serverProviders.splice(i, 1);
            }
        }
    }
702734
def remove_codeblock_syntax_sentinals(code_text):
    
    """
    flags = re.MULTILINE | re.DOTALL
    code_text_ = code_text
    code_text_ = re.sub(r'^ *# *REM [^\n]*$\n?', '', code_text_, flags=flags)
    code_text_ = re.sub(r'^ *# STARTBLOCK *$\n', '', code_text_, flags=flags)
    code_text_ = re.sub(r'^ *# ENDBLOCK *$\n?', '', code_text_, flags=flags)
    code_text_ = code_text_.rstrip()
    return code_text_
1271211
function remove(path, fn, callback) {
        var meta = {};
        resolvePath(path, function (err, realpath) {
            if (err) return callback(err);
            fn(realpath, function (err) {
                if (err) return callback(err);
                
                // Remove metadata
                resolvePath(WSMETAPATH + path, function (err, realpath) {
                    if (err) return callback(null, meta);
                    
                    fn(realpath, function(){
                        return callback(null, meta);
                    });
                });
            });
        });
    }
816891
function removeColon(protocol) {
    return protocol && protocol.length && protocol[protocol.length - 1] === ':'
        ? protocol.substring(0, protocol.length - 1) : protocol;
}
74546
def remove_rules(self, description):
        '''
        
        '''
        rm = []
        description = description.lower()

        for i in range(0, len(self.extract_rules)):
            if self.extract_rules[i]['regex'].search(description):
                rm.append(i)

        for i in rm:
            self.extract_rules.pop(i)

        return len(rm)
1021146
function (attrs) {
	var keys = attrs.keys, i = keys.length, max_priority = 0,
		definition, result;

	while (i--) {
		if (directives[keys[i]]) {
			definition = cache.resolve_directive(keys[i]);
			if (definition.priority > max_priority) {
				result = { name : keys[i], definition : definition };
			}
		}
	}

	if (result) {
		attrs.remove(result.name);
	}

	return result;
}
60005
def _clean(self, value):
        
        if value:
            value = str(value).replace('/library/metadata/', '')
            value = value.replace('/children', '')
            return value.replace(' ', '-')[:20]
1200210
function remove_rules( $nt ){
		if( ! isset($this->ntindex) ){
			$this->rebuild_index();
		}
		// remove this non-terminal's rules
		if( isset($this->ntindex[$nt]) ){
			foreach( $this->ntindex[$nt] as $i ){
				$sig = self::rule_signature( $nt, $this->rules[$i][1] );
				unset( $this->rules[$i] ); 
				unset( $this->uindex[$sig] );
			}
		} 
		// remove non terminal
		unset ( 
			$this->nts[$nt],
			$this->ntindex[$nt]
		);
	}
220096
def error_removed_option(message: str):
    
    def f(_, param, value):
        if value is not None:
            raise click.NoSuchOption(
                f'--{param.name.replace("_", "-")} is no longer a valid option. ' +
                message,
            )
    return f
205158
def ticket_form_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/ticket_forms/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
1374020
def remove(self, (s, p, o), context=None):
        
        named_graph = _get_named_graph(context)
        query_sets = _get_query_sets_for_object(o)

        filter_parameters = dict()
        if named_graph is not None:
            filter_parameters['context_id'] = named_graph.id
        if s:
            filter_parameters['subject'] = s
        if p:
            filter_parameters['predicate'] = p
        if o:
            filter_parameters['object'] = o

        query_sets = [qs.filter(**filter_parameters) for qs in query_sets]  # pylint: disable=W0142

        for qs in query_sets:
            qs.delete()
1313932
def remove(self, w):
        
        if w not in self.f2i:
            raise ValueError("'{}' does not exist.".format(w))

        if w in self.reserved:
            raise ValueError("'{}' is one of the reserved words, and thus"
                             "cannot be removed.".format(w))

        index = self.f2i[w]
        del self.f2i[w]
        del self.i2f[index]

        self.words.remove(w)