- Web UI
- CLI
- Github hooks
- Gitolite hooks
- *** RT (Perl plugin)
- Redmine (Ruby plugin)
- *** CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def build_board(size): | |
| board = [] | |
| for i in range(size): | |
| row = [] | |
| for j in range(size): | |
| row.append('') | |
| board.append(row) | |
| return board | |
| def place_item(player, board, x, y): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def answer(before, after): | |
| sum_before, sum_after = sum(before), sum(after) | |
| if sum_after > sum_before: | |
| sum_before, sum_after = sum_after, sum_before | |
| if sum_before == 0 and sum_after == 0: | |
| return 0 | |
| elif sum_after == 0: | |
| return 100 | |
| return int(round(abs((sum_after / sum_before - 1)) * 100)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def fitness_rate(before, after): | |
| before, after = sum(before), sum(after) | |
| if after > before: | |
| after, before = before, after | |
| return int(round(abs((after / before - 1)) * 100)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import defaultdict | |
| import random | |
| import datetime | |
| def test(f): | |
| start = [] | |
| end = [] | |
| random.seed(datetime.datetime.now()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def fitness_rate(before, after): | |
| fitnesses = defaultdict(int) | |
| for b in before: | |
| for a in after: | |
| fitnesses[float(a) / b * 100] += 1 | |
| return abs(100 - int(max(fitnesses.items(), key=lambda x: x[1])[0])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| def test(f): | |
| start = [] | |
| end = [] | |
| percent = int(random.randint(1, 99)) | |
| measurements = int(random.randint(1, 2)) | |
| for i in range(measurements): | |
| original = random.randrange(5, 100) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import defaultdict | |
| def fitness_rate(before, after): | |
| fitnesses = defaultdict(int) | |
| for b in before: | |
| for a in after: | |
| fitnesses[float(a) / b * 100] += 1 | |
| return int(max(fitnesses.items(), key=lambda x: x[1])[0]) - 100 | |
| print fitness_rate([22.2, 46.0, 100.8], [23.0, 11.1, 50.4]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import defaultdict | |
| def fitness_rate(before, after): | |
| fitnesses = defaultdict(int) | |
| for b in before: | |
| for a in after: | |
| fitnesses[float(a) / b * 100] += 1 | |
| return max(fitnesses.items(), key=lambda x: x[1])[0] | |
| print fitness_rate([22.2, 46.0, 100.8], [23.0, 11.1, 50.4]) |