def searx_bang(full_query):
<EOL>if len(full_query.getSearchQuery()) == <NUM_LIT:0>:<EOL><INDENT>return []<EOL><DEDENT>results = []<EOL>first_char = full_query.getSearchQuery()[<NUM_LIT:0>]<EOL>if first_char == '<STR_LIT:!>' or first_char == '<STR_LIT:?>':<EOL><INDENT>if len(full_query.getSearchQuery()) == <NUM_LIT:1>:<EOL><INDENT>results.append(first_char + "<STR_LIT>")<EOL>results.append(first_char + "<STR_LIT>")<EOL>results.append(first_char + "<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>engine_query = full_query.getSearchQuery()[<NUM_LIT:1>:]<EOL>for categorie in categories:<EOL><INDENT>if categorie.startswith(engine_query):<EOL><INDENT>results.append(first_char + '<STR_LIT>'.format(categorie=categorie))<EOL><DEDENT><DEDENT>for engine in engines:<EOL><INDENT>if engine.startswith(engine_query.replace('<STR_LIT:_>', '<STR_LIT:U+0020>')):<EOL><INDENT>results.append(first_char + '<STR_LIT>'.format(engine=engine.replace('<STR_LIT:U+0020>', '<STR_LIT:_>')))<EOL><DEDENT><DEDENT>for engine_shortcut in engine_shortcuts:<EOL><INDENT>if engine_shortcut.startswith(engine_query):<EOL><INDENT>results.append(first_char + '<STR_LIT>'.format(engine_shortcut=engine_shortcut))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>elif first_char == '<STR_LIT::>':<EOL><INDENT>if len(full_query.getSearchQuery()) == <NUM_LIT:1>:<EOL><INDENT>results.append("<STR_LIT>")<EOL>results.append("<STR_LIT>")<EOL>results.append("<STR_LIT>")<EOL>results.append("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>engine_query = full_query.getSearchQuery()[<NUM_LIT:1>:]<EOL>for lc in language_codes:<EOL><INDENT>lang_id, lang_name, country, english_name = map(unicode.lower, lc)<EOL>if lang_id.startswith(engine_query):<EOL><INDENT>if len(engine_query) <= <NUM_LIT:2>:<EOL><INDENT>results.append(u'<STR_LIT>'.format(lang_id=lang_id.split('<STR_LIT:->')[<NUM_LIT:0>]))<EOL><DEDENT>else:<EOL><INDENT>results.append(u'<STR_LIT>'.format(lang_id=lang_id))<EOL><DEDENT><DEDENT>if lang_name.startswith(engine_query) or english_name.startswith(engine_query):<EOL><INDENT>results.append(u'<STR_LIT>'.format(lang_name=lang_name))<EOL><DEDENT>if country.startswith(engine_query.replace('<STR_LIT:_>', '<STR_LIT:U+0020>')):<EOL><INDENT>results.append(u'<STR_LIT>'.format(country=country.replace('<STR_LIT:U+0020>', '<STR_LIT:_>')))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>result_set = set(results)<EOL>for query_part in full_query.query_parts:<EOL><INDENT>if query_part in result_set:<EOL><INDENT>result_set.remove(query_part)<EOL><DEDENT><DEDENT>return list(result_set)<EOL>
check if the searchQuery contain a bang, and create fitting autocompleter results