Skip to content

Instantly share code, notes, and snippets.

@enachb
Created January 16, 2013 08:48
Show Gist options
  • Select an option

  • Save enachb/4545621 to your computer and use it in GitHub Desktop.

Select an option

Save enachb/4545621 to your computer and use it in GitHub Desktop.
usage: python ~/json_utc_prefix.py part-* | sort -nr -k 1,1 | less aka show me all the latest posts
import sys,json,fileinput
for line in fileinput.input():
obj = json.loads(line)
# if obj["pageId"] == "AmericanIdol":
print "%s %s" % (obj["utc"],obj["pageId"])
@enachb
Copy link
Author

enachb commented Jan 22, 2013

python ~/json_parse.py fbComment-377453.dmp fbComment-377454.tmp | awk '{print $1}' | sort | uniq -c | sort -n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment