Your company moved to a new office at the Gent Zuiderport. Its an openspace with 6 tables of 4 seats. As many of you are new colleagues, you come up with the idea of changing seats everyday and get to know each other better by working side by side with your new colleagues.
This script runs everyday to re-assign everybody to a new seat.
.
├── src/
│ ├── openspace.py
│ ├── table.py
│ └── utils.py
├── .gitignore
├── main.py
├── new_colleagues.csv
├── output.csv
└── README.md
- Clone the repository to your local machine.
2 .To run the script, you can execute the main.py
file from your command line:
```
python main.py
```
- The script reads your input file, and organizes your colleagues to random seat assignments. The resulting seating plan is displayed in your console and also saved to an "output.csv" file in your root directory.
input_filepath = "new_colleagues.csv"
output_filename = "output.csv"
# Creates a list that contains all the colleagues names
names = utils.read_names_from_csv(input_filepath)
# create an OpenSpace()
open_space = OpenSpace()
# assign a colleague randomly to a table
open_space.organize(names)
# save the seat assigments to a new file
open_space.store(output_filename)
# display assignments in the terminal
open_space.display()
This project took two days for completion.
This project was done as part of the AI Boocamp at BeCode.org.
Connect with me on LinkedIn.