Skip to content

Instantly share code, notes, and snippets.

View sharathk2u's full-sized avatar

Sharath K sharathk2u

  • Intuit
  • Bengaluru
View GitHub Profile
@sharathk2u
sharathk2u / .gitignore
Created August 3, 2016 17:00 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
#!/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]) + "}"