projects
/
mlpccg-meta.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0460c3c
)
reduce cutoff weight for prettier descriptions?
author
Jess
<jessicatz.fairymeadow@gmail.com>
Mon, 25 Aug 2014 22:18:28 +0000
(
00:18
+0200)
committer
Jess
<jessicatz.fairymeadow@gmail.com>
Mon, 25 Aug 2014 22:18:28 +0000
(
00:18
+0200)
mlpccg/DeckList.py
patch
|
blob
|
history
diff --git
a/mlpccg/DeckList.py
b/mlpccg/DeckList.py
index 0e0cba1f6d5ea3a07ca905bb85b127a92ad7c054..415c91d561cc6bb1a6f238916d8cedc4e8518227 100644
(file)
--- a/
mlpccg/DeckList.py
+++ b/
mlpccg/DeckList.py
@@
-35,13
+35,12
@@
class DeckList:
aspects_sorted = sorted(aspects.iteritems(), reverse=True, key=operator.itemgetter(1))
aspects_sum = float(sum([aspect[1] for aspect in aspects_sorted]))
aspects_filtered = []
- cutoff = 0.
66
+ cutoff = 0.
5
amount = 0.0
for aspect, value in aspects_sorted:
amount += value / aspects_sum
- if amount < cutoff:
- aspects_filtered += [aspect]
- else:
+ aspects_filtered += [aspect]
+ if amount >= cutoff:
break
return (mane, aspects_filtered)