https://github.com/ozancansel/where-to-eat
Suggests a place for lunch to go based on the places you have given.
https://github.com/ozancansel/where-to-eat
Last synced: 2 months ago
JSON representation
Suggests a place for lunch to go based on the places you have given.
- Host: GitHub
- URL: https://github.com/ozancansel/where-to-eat
- Owner: OzanCansel
- License: mit
- Created: 2022-01-16T13:00:11.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-11T17:36:17.000Z (almost 3 years ago)
- Last Synced: 2025-03-21T19:12:42.497Z (2 months ago)
- Language: C++
- Size: 38.1 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# where-to-eat
Suggests a place for lunch to go based on the places and scores you have given.
No, it doesn't suggests a place randomly, it tries to be fair according to `points` of the `places`.
### How fair is it ?
`wte` treats the lowest scored place is the most desired place. So if you want to go some place more often, then decrease its points from `places` file.
### How to define `places` ?
`wte` reads places from the file which is named `places` within the working directory so manipulate it as you wish.
### `wte` is cumulative
`wte` doesn't forget the suggestions it gave, it writes every suggestions to `.placement` files, so it can be run again and again.
### Schedule next 20 days
Execute the script below in the build directory.
```sh
N_DAYS=20for (( i = 1; i < ${N_DAYS}; i++ ))
do
date -d "+${i} day" "+%A - %d %B %Y"
echo " " $(./wte)
echo
doneecho
echo "===================================="
echo "Total collected points for ${N_DAYS} days"
echo "===================================="
./wte summary
```#### Output
```console
Friday - 12 August 2022
1 26 sozeriSaturday - 13 August 2022
3 24 yesilvadiSunday - 14 August 2022
6 27 disardanMonday - 15 August 2022
2 11 bilkentTuesday - 16 August 2022
0 11 duverogluWednesday - 17 August 2022
5 25 adaliThursday - 18 August 2022
4 37 cepaFriday - 19 August 2022
7 10 hacettepeSaturday - 20 August 2022
7 10 hacettepeSunday - 21 August 2022
2 11 bilkentMonday - 22 August 2022
0 11 duverogluTuesday - 23 August 2022
7 10 hacettepeWednesday - 24 August 2022
2 11 bilkentThursday - 25 August 2022
3 24 yesilvadiFriday - 26 August 2022
0 11 duverogluSaturday - 27 August 2022
6 27 disardanSunday - 28 August 2022
5 25 adaliMonday - 29 August 2022
1 26 sozeriTuesday - 30 August 2022
7 10 hacettepe====================================
Total collected points for 20 days
====================================
place total desc
0 33 duveroglu
1 52 sozeri
2 33 bilkent
3 48 yesilvadi
4 37 cepa
5 50 adali
6 54 disardan
7 40 hacettepe
```### Credits
Thanks to __Ahmet Ilgin__ for the algorithm.