Skip to content

Instantly share code, notes, and snippets.

@benanne
Created June 7, 2012 16:00
Show Gist options
  • Select an option

  • Save benanne/2889661 to your computer and use it in GitHub Desktop.

Select an option

Save benanne/2889661 to your computer and use it in GitHub Desktop.
Count number of users in the MSD challenge visible evaluation triplets file
s = set()
with open("kaggle_visible_evaluation_triplets.txt", 'r') as f:
for line in f:
user, _, _ = line.strip().split('\t')
s.add(user)
print "%d users" % len(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment