Stats overview:
| Attack | Health | Chance |
|---|---|---|
| 9 | 8 | 16.6667% |
| 6 | 6 | 16.6667% |
| 12 | 10 | 15.8333% |
| 15 | 12 | 13.0556% |
| 18 | 14 | 10.2976% |
| 18 | 13 | 8.9116% |
| L = [int(x) for x in "1307 2716 3449 2758 4597 5191 1465 2259 2829 3004".split()] | |
| N = 20000 | |
| array = [[]] + [None for i in range(N-1)] | |
| minimum, route = float("inf"), None | |
| for num in L: | |
| todo = [] | |
| for index in range(N): |
| // ==UserScript== | |
| // @name osu! HTML5 audio playback | |
| // @namespace http://your.homepage/ | |
| // @version 0.1 | |
| // @description Replaces the osu! Flash audio preview with an HTML5 one. | |
| // @author mcpower | |
| // @match https://osu.ppy.sh/p/beatmaplist* | |
| // @match https://osu.ppy.sh/s/* | |
| // @match https://osu.ppy.sh/b/* | |
| // @grant none |
Stats overview:
| Attack | Health | Chance |
|---|---|---|
| 9 | 8 | 16.6667% |
| 6 | 6 | 16.6667% |
| 12 | 10 | 15.8333% |
| 15 | 12 | 13.0556% |
| 18 | 14 | 10.2976% |
| 18 | 13 | 8.9116% |
| from __future__ import division, print_function # Python 3 backwards compatible (and I'm lazy/hacky) | |
| outcomes = 0 | |
| # zip mult sum | |
| # returns [a[0] * amult + b[0] * bmult, a[1] * amult + b[1] * bmult, ...] | |
| def zms(a, b, amult=1, bmult=1): | |
| return list(map(lambda x, y: x * amult + y * bmult, a, b)) | |
| # cache decorator | |
| def cache(f): |
Question to pythonistas out there: Is it acceptable to reduce indentation by doing:
if blah:
# do stuff
return
# do lots of other stuffinstead of: