https://github.com/smaranjitghose/autoprompicker
Using Python to set unbreakable pairs for prom night
https://github.com/smaranjitghose/autoprompicker
Last synced: 3 months ago
JSON representation
Using Python to set unbreakable pairs for prom night
- Host: GitHub
- URL: https://github.com/smaranjitghose/autoprompicker
- Owner: smaranjitghose
- License: mit
- Created: 2020-03-26T10:48:25.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-14T23:50:01.000Z (over 4 years ago)
- Last Synced: 2025-01-26T04:12:45.333Z (5 months ago)
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AutoPromPicker
Remember Prom Night? ๐ถOne of the major issues โ we faced was to ensure that all the handsome boys๐คต were paired to all the gorgeous girls๐ in a way that took care of everyone's priority ๐ and they don't break up for the night.
"Nah! That's just a fairytale scenario". Well I agree but python ๐can help out to a great extent.
As any other wizard๐งโโ๏ธ , python requires you to follow some rules โfor this spell to work:
- The number of boys and girls must be equal. We don't want anyone to be left out in the corner. ๐
- Everyone should be brutually honest when asked about ranking their counterparts in order of preferrence.
- The guys get to propose the girls ( We can flip this if required)# Some Theorical Background: ๐
Our situation is an application of the popular [Stable Marriage Problem](https://en.wikipedia.org/wiki/Stable_marriage_problem). It can be solved by the[Gayle-Shapely algorithm](https://en.wikipedia.org/wiki/Gale%E2%80%93Shapley_algorithm) given below:
```
Initialize all m โ M and w โ W to free
while โ free man m who still has a woman w to propose to do
w := first woman on m's list to whom m has not yet proposed
if w is free then
(m, w) become engaged
else some pair (m', w) already exists
if w prefers m to m' then
m' becomes free
(m, w) become engaged
else
(m', w) remain engaged
end if
end if
repeat
```# Usage:
Convinced..huh? ๐ and want this spell for yourself?

Here you go:
- clone or Download this repo โฌ
- Open the Terminal ๐ฑโ๐ป
- Move inside ๐ the repo
```cd AutoPromPicker```
- Open ```autoprompick.py``` and change the names of the girls,boys and preferences as desired๐งฑ
- Now, the climax you have been waiting for!๐. Run the script using Terminal
```python autoprompick.py```
- Abracadabra โก**I assume you have python installed on your system and set to path.**
# Further Work: ๐
- Tune this script to take in the number of girls and boys from the terminal,their names and preference of each
- Create a GUI for this
- Deploy๐ข the above using Streamlit
- Create an end to end auto prom picker system, where the ```N``` boys and ```N``` girls register themselves,put up their profile,rate each other and our script takes those values and gives them their best pair(s) as per precedence of ask out# License ๐
[MIT License](https://github.com/smaranjitghose/AutoPromPicker/blob/master/LICENSE)
# **Crafted with โค by Smaranjit Ghose**