I'm looking for an algorithm / code that provides a stable match for two sets of unequally sized items (clubs and students) with an uneven set of preferences. There is a large group of students looking to join a club, and a relatively small group of clubs for those students to join. Each student ranks only the clubs they want to join in order of preference. In other words, each student will not be required to rank each available club. At the same time, each club has a maximum number of students that can accept and this number differs in each club. Therefore, both groups for the algorithm are unevenly sized, and each item within those groups (i.e. each club and student) could have a different number of preferences.
I have examined the Gale-Shapley algorithm and match without envy, but have not come across any code that provides stable match when there is so much variation in items / preferences. Does anyone know of any code that can accomplish this (preferably something like Python or Java)?