Better algorithm: not always available → rank higher
This commit is contained in:
parent
dea50d6e69
commit
9873a319c4
2 changed files with 49 additions and 47 deletions
92
README
92
README
|
@ -1,82 +1,84 @@
|
||||||
whats_hot.py is wat je wil.
|
whats_hot.py is wat je wil.
|
||||||
|
|
||||||
|
Het toont wat deze maand hot is.
|
||||||
|
|
||||||
Voor oktober staat hieronder de output. Maar in de terminal staan de niet-huidige maanden grijs
|
Voor oktober staat hieronder de output. Maar in de terminal staan de niet-huidige maanden grijs
|
||||||
voor beter overzicht! Zeker doen.
|
voor beter overzicht! Zeker doen.
|
||||||
|
|
||||||
Fruit
|
Fruit
|
||||||
J F M A M J J A S O N D
|
J F M A M J J A S O N D
|
||||||
|
░ ░ █ █ ░ Stekelbes
|
||||||
▓ ▓ Cassisbes
|
▓ ▓ Cassisbes
|
||||||
▓ ▓ Kers
|
▓ ▓ Kers
|
||||||
░ ░ █ █ ░ Stekelbes
|
|
||||||
█ █ ▓ ░ Pruim
|
|
||||||
▓ █ █ ▓ ░ ░ Rode bes
|
▓ █ █ ▓ ░ ░ Rode bes
|
||||||
|
█ █ ▓ ░ Pruim
|
||||||
░ ░ ▓ █ █ █ █ █ █ ▓ ▓ ░ Aardbei
|
░ ░ ▓ █ █ █ █ █ █ ▓ ▓ ░ Aardbei
|
||||||
░ ▓ █ █ ▓ ▓ ▓ Blauwe bes
|
|
||||||
░ ▓ █ █ █ ▓ ▓ ▓ ░ Braambes
|
░ ▓ █ █ █ ▓ ▓ ▓ ░ Braambes
|
||||||
░ ▓ █ █ █ ▓ ▓ ░ Framboos
|
░ ▓ █ █ █ ▓ ▓ ░ Framboos
|
||||||
░ █ ▓ Kiwibes
|
░ ▓ █ █ ▓ ▓ ▓ Blauwe bes
|
||||||
▓ ▓ ▓ ▓ Kweepeer
|
▓ ▓ ▓ ▓ Kweepeer
|
||||||
|
░ █ ▓ Kiwibes
|
||||||
▓ ▓ ▓ Veenbes
|
▓ ▓ ▓ Veenbes
|
||||||
█ █ █ █ █ █ ▓ ▓ █ █ █ █ Appel
|
█ █ █ █ █ █ ▓ ▓ █ █ █ █ Appel
|
||||||
█ █ █ ▓ ▓ ▓ ░ ░ █ █ █ █ Peer
|
█ █ █ ▓ ▓ ▓ ░ ░ █ █ █ █ Peer
|
||||||
|
|
||||||
Groenten
|
Groenten
|
||||||
J F M A M J J A S O N D
|
J F M A M J J A S O N D
|
||||||
▓ █ ▓ ░ Asperge (groen)
|
|
||||||
░ ▓ ▓ █ ▓ ░ Asperge (wit)
|
░ ▓ ▓ █ ▓ ░ Asperge (wit)
|
||||||
|
▓ █ ▓ ░ Asperge (groen)
|
||||||
░ █ ▓ ░ Erwtjes
|
░ █ ▓ ░ Erwtjes
|
||||||
▓ ▓ ░ ░ ░ ▓ █ Aardpeer
|
|
||||||
░ ░ ▓ █ █ █ ▓ ▓ ░ ░ Aubergine
|
|
||||||
░ ░ ▓ ▓ █ █ ▓ ░ Groene boontjes
|
|
||||||
░ ░ ▓ █ █ █ █ █ ▓ ░ ░ ░ Komkommer
|
░ ░ ▓ █ █ █ █ █ ▓ ░ ░ ░ Komkommer
|
||||||
|
░ ░ ▓ █ █ █ ▓ ▓ ░ ░ Aubergine
|
||||||
░ ▓ ▓ █ █ █ ▓ ░ Paprika
|
░ ▓ ▓ █ █ █ ▓ ░ Paprika
|
||||||
░ ░ ▓ █ █ █ ▓ ░ ░ Rabarber
|
░ ░ ▓ █ █ █ ▓ ░ ░ Rabarber
|
||||||
▓ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▓ Sjalot
|
|
||||||
░ ▓ ▓ ▓ ▓ ░ Warmoes / snijbiet
|
|
||||||
█ █ █ ▓ ░ ▓ █ Zoete aardappel
|
█ █ █ ▓ ░ ▓ █ Zoete aardappel
|
||||||
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Ajuin
|
░ ░ ▓ ▓ █ █ ▓ ░ Groene boontjes
|
||||||
▓ ▓ ▓ ▓ ▓ Artisjok
|
▓ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▓ Sjalot
|
||||||
░ ▓ ▓ █ █ █ ▓ Augurk
|
▓ ▓ ░ ░ ░ ▓ █ Aardpeer
|
||||||
░ ░ ░ ░ ▓ █ ▓ ▓ █ ▓ ░ ░ Bloemkool
|
░ ▓ ▓ ▓ ▓ ░ Warmoes / snijbiet
|
||||||
█ █ ▓ ░ ▓ ▓ ▓ Boerenkool
|
|
||||||
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Boontjes
|
|
||||||
░ ▓ ▓ ▓ █ ▓ ░ ░ Broccoli
|
|
||||||
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Broccolini
|
|
||||||
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ █ Champignon
|
|
||||||
▓ ▓ ▓ ░ ▓ ░ ░ ░ ▓ ▓ ▓ ▓ Chinese kool
|
|
||||||
░ ░ ▓ █ █ █ █ ▓ ░ Courgette
|
|
||||||
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Friseline
|
|
||||||
█ █ █ █ █ █ ▓ ░ ▓ ▓ █ █ Knolselder
|
█ █ █ █ █ █ ▓ ░ ▓ ▓ █ █ Knolselder
|
||||||
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Krulandijvie
|
|
||||||
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Lente-uitjes
|
|
||||||
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ █ Oesterzwam
|
|
||||||
█ █ █ ▓ ░ ░ ░ ▓ █ █ Pastinaak
|
|
||||||
▓ ▓ ▓ ▓ ▓ ▓ Postelein
|
|
||||||
▓ ▓ ▓ ▓ ▓ ▓ Radicchio Rosso
|
|
||||||
░ ░ ▓ ▓ █ █ ▓ ▓ ▓ ▓ ▓ ▓ Radijsjes
|
|
||||||
█ █ █ █ ▓ ▓ ▓ ▓ ▓ ▓ ▓ █ Rode biet
|
█ █ █ █ ▓ ▓ ▓ ▓ ▓ ▓ ▓ █ Rode biet
|
||||||
▓ ▓ █ █ █ ▓ ▓ ▓ ▓ ▓ █ █ Sla
|
▓ ▓ █ █ █ ▓ ▓ ▓ ▓ ▓ █ █ Sla
|
||||||
░ ░ ▓ ▓ ░ ░ ▓ ▓ ░ ░ Spitskool
|
|
||||||
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Tuinkers
|
|
||||||
█ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ █ Waterkers
|
█ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ █ Waterkers
|
||||||
░ ▓ ▓ ▓ ▓ ▓ █ █ ▓ ░ Andijvie
|
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ █ Champignon
|
||||||
░ ▓ ▓ ▓ █ █ █ ░ Koolrabi
|
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ █ Oesterzwam
|
||||||
░ ░ ▓ ▓ █ █ █ █ █ █ ▓ ▓ Paksoi
|
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Ajuin
|
||||||
░ ░ ░ ░ ▓ █ █ █ █ █ ▓ ▓ Peterselie
|
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Friseline
|
||||||
░ ░ ░ ▓ ▓ ▓ ░ ░ █ █ █ ▓ Pompoen
|
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Lente-uitjes
|
||||||
|
░ ░ ▓ ▓ █ █ ▓ ▓ ▓ ▓ ▓ ▓ Radijsjes
|
||||||
|
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Tuinkers
|
||||||
|
█ █ █ ▓ ░ ░ ░ ▓ █ █ Pastinaak
|
||||||
|
░ ░ ░ ░ ▓ █ ▓ ▓ █ ▓ ░ ░ Bloemkool
|
||||||
|
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Broccolini
|
||||||
|
▓ ▓ ▓ ░ ▓ ░ ░ ░ ▓ ▓ ▓ ▓ Chinese kool
|
||||||
|
░ ░ ▓ █ █ █ █ ▓ ░ Courgette
|
||||||
|
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Boontjes
|
||||||
|
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ Krulandijvie
|
||||||
|
░ ▓ ▓ █ █ █ ▓ Augurk
|
||||||
|
█ █ ▓ ░ ▓ ▓ ▓ Boerenkool
|
||||||
|
░ ▓ ▓ ▓ █ ▓ ░ ░ Broccoli
|
||||||
|
░ ░ ▓ ▓ ░ ░ ▓ ▓ ░ ░ Spitskool
|
||||||
|
▓ ▓ ▓ ▓ ▓ ▓ Postelein
|
||||||
|
▓ ▓ ▓ ▓ ▓ ▓ Radicchio Rosso
|
||||||
|
▓ ▓ ▓ ▓ ▓ Artisjok
|
||||||
█ █ █ █ ▓ ▓ ▓ ▓ █ █ █ █ Prei
|
█ █ █ █ ▓ ▓ ▓ ▓ █ █ █ █ Prei
|
||||||
█ █ ▓ ▓ ▓ ▓ ▓ ▓ ▓ █ █ █ Raap
|
█ █ ▓ ▓ ▓ ▓ ▓ ▓ ▓ █ █ █ Raap
|
||||||
█ ▓ ▓ ░ ░ ░ ░ ░ █ █ █ Rammenas
|
░ ░ ▓ ▓ █ █ █ █ █ █ ▓ ▓ Paksoi
|
||||||
█ █ █ █ ░ ░ ░ ░ ▓ █ █ █ Rode kool
|
█ █ █ █ ░ ░ ░ ░ ▓ █ █ █ Rode kool
|
||||||
█ █ ▓ ░ ░ ░ ░ ▓ █ █ █ █ Savooikool
|
|
||||||
█ █ ▓ ░ ▓ █ █ █ Schorseneren
|
|
||||||
░ ░ ▓ █ █ █ █ █ ▓ ░ Selder
|
|
||||||
▓ ▓ ▓ ▓ ▓ ░ ░ ░ ▓ █ █ █ Shii-take
|
|
||||||
░ ░ ░ ▓ █ █ ▓ ▓ █ █ ▓ ░ Spinazie
|
|
||||||
█ █ ▓ ░ ░ ▓ █ █ █ Spruitjes
|
|
||||||
░ ░ ▓ ▓ █ █ █ █ █ █ ░ ░ Tomaat
|
|
||||||
░ ▓ █ █ █ █ █ ░ Venkel
|
|
||||||
█ █ █ ▓ ▓ ░ ░ ░ ▓ █ █ █ Witloof
|
█ █ █ ▓ ▓ ░ ░ ░ ▓ █ █ █ Witloof
|
||||||
█ █ ▓ ▓ ░ ▓ ░ ░ █ █ █ █ Witte kool
|
█ █ ▓ ▓ ░ ▓ ░ ░ █ █ █ █ Witte kool
|
||||||
|
█ █ ▓ ░ ░ ░ ░ ▓ █ █ █ █ Savooikool
|
||||||
|
░ ░ ▓ ▓ █ █ █ █ █ █ ░ ░ Tomaat
|
||||||
|
░ ░ ░ ░ ▓ █ █ █ █ █ ▓ ▓ Peterselie
|
||||||
|
▓ ▓ ▓ ▓ ▓ ░ ░ ░ ▓ █ █ █ Shii-take
|
||||||
|
░ ░ ░ ▓ █ █ ▓ ▓ █ █ ▓ ░ Spinazie
|
||||||
░ ░ ░ ▓ █ █ █ █ █ ▓ ░ Wortelen
|
░ ░ ░ ▓ █ █ █ █ █ ▓ ░ Wortelen
|
||||||
|
░ ░ ░ ▓ ▓ ▓ ░ ░ █ █ █ ▓ Pompoen
|
||||||
|
░ ░ ▓ █ █ █ █ █ ▓ ░ Selder
|
||||||
|
█ ▓ ▓ ░ ░ ░ ░ ░ █ █ █ Rammenas
|
||||||
|
█ █ ▓ ░ ░ ▓ █ █ █ Spruitjes
|
||||||
|
░ ▓ ▓ ▓ ▓ ▓ █ █ ▓ ░ Andijvie
|
||||||
|
█ █ ▓ ░ ▓ █ █ █ Schorseneren
|
||||||
|
░ ▓ █ █ █ █ █ ░ Venkel
|
||||||
|
░ ▓ ▓ ▓ █ █ █ ░ Koolrabi
|
||||||
J F M A M J J A S O N D
|
J F M A M J J A S O N D
|
||||||
|
|
|
@ -12,8 +12,8 @@ current_month_0 = date.today().month - 1
|
||||||
|
|
||||||
def score(item):
|
def score(item):
|
||||||
name, months = item
|
name, months = item
|
||||||
# Sort by score of current month, then by name
|
# Sort by score of current month, then by how exclusive it is, then by name
|
||||||
return (months[current_month_0], name)
|
return (months[current_month_0], -sum(months), name)
|
||||||
|
|
||||||
|
|
||||||
def ranked_data(data):
|
def ranked_data(data):
|
||||||
|
|
Loading…
Reference in a new issue