This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/python | |
| import json | |
| import uuid | |
| import sys | |
| # Format the queries to the required format | |
| def format_json(queries): | |
| add_str = '"add":{"doc":{"autosuggest":"%(query)s","doctype":"TOP_SEARCH_QUERIES","uniqueId":"%(uid)s" }}' | |
| return "{" + ",".join([add_str%query for query in queries]) + "}" |