Skip to content

Instantly share code, notes, and snippets.

@rohitdholakia
Last active December 17, 2015 13:19
Show Gist options
  • Save rohitdholakia/5616430 to your computer and use it in GitHub Desktop.
Save rohitdholakia/5616430 to your computer and use it in GitHub Desktop.
Num Epic users
import sys
from lxml import etree
import Utils
with open(sys.argv[1]) as userXml:
context = etree.iterparse(userXml)
countEpic = 0
for event, elem in context:
name = Utils.getBadgeName(elem)
if(name=="Epic"):
countEpic += 1
Utils.clearElem(elem)
print countEpic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment