3 ms·
Any genius willing to translate this to python?
by pypyguy 16y ago
Any genius willing to translate this to python?
- zackattack 16y agoI would prefer PHP but seconded
- sstrudeau 16y agoThis is pretty trivial but sure, something like: function calculate_score($votes, $item_hour_age, $gravity=1.8) { return ($votes - 1) / pow(($item_hour_age+2), $gravity); }
- sstrudeau 16y agoThere's a python implementation in the original article: def calculate_score(votes, item_hour_age, gravity=1.8): return (votes - 1) / pow((item_hour_age+2), gravity)