Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 24 lines (18 sloc) 0.718 kB
c1e0b1c cool stuff
Justine Tunney authored
1
2 import re
3
4 import sys
5 sys.exit()
6
7 import os
8 os.environ['DJANGO_SETTINGS_MODULE'] = 'occupywallst.settings'
9
10 from occupywallst import models as db
11 from datetime import datetime, timedelta
12
13 res = []
14 for user in set(c.user for c in db.Comment.objects.select_related('user').order_by('-published')[:10000] if c.user):
15 comments = user.comment_set.all()[:]
16 if len(comments) < 5:
17 continue
18 span = (max(c.published for c in comments) - min(c.published for c in comments)).seconds
19 dups = len(comments) - len(set(c.content for c in comments))
20 res.append([user.username, span, len(comments), len(comments) / float(span), dups])
21 res.sort(key=lambda a: a[4], reverse=True)
22 for row in res:
23 print row
Something went wrong with that request. Please try again.