Permalink
Browse files

quick and dirty HN-proofing

  • Loading branch information...
mazieres committed Jan 30, 2014
1 parent 3ec4a6f commit 1e164d569ba54911880cbecd2deded48a2f0a327
Showing with 6 additions and 1 deletion.
  1. +6 −1 hello.py
@@ -15,6 +15,8 @@
'blowjob,handjob,titjob,footjob'
]
hn_proof = {}

This comment has been minimized.

@rolorolo86
def format_query(query):
s = ''
for w in query.split(',')[:10]:
@@ -42,10 +44,13 @@ def get_data(query):
def index():
try:
q = format_query(request.args['q'])
res = get_data(q)
except:
q = choice(examples)
if q not in hn_proof.keys():
hn_proof[q] = get_data(q)
res = hn_proof[q]
res = get_data(q)
return render_template('index', q=q, res=res)
if __name__ == "__main__":

0 comments on commit 1e164d5

Please sign in to comment.