# Returns a list of the items that occur multiple times in set_of_sets
deffind_duplicates(set_of_sets):
seen=set()
duplicates=set()
forasetinset_of_sets:
foriteminaset:
ifiteminseen:
duplicates.add(item)
else:
seen.add(item)
returnsorted(list(duplicates))
#
# Parse command-line arguments.
#
parser=argparse.ArgumentParser(description="This script is used to create student repositories for cs447/ece453/se465.")
parser.add_argument('group_name',help="The name of the Gitlab group to create projects in.")
parser.add_argument('membership_file',help="Path to a CSV containing group memberships, with fields: Timestamp, WatIAM user id for member 1, WatIAM user id for member 2 (optional), WatIAM user id for member 3 (optional), Group number (optional)")
print("\nWARNING: Student %s is in group %s {%s} on git.uwaterloo.ca, but CSV file %s has the student in group {%s}. Please check the members list on git.uwaterloo.ca and the CSV file. It's possible that people in the group just haven't accepted the invitation on git.uwaterloo.ca yet."