This file contains 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
#!/usr/bin/env python | |
from copy import deepcopy | |
import matplotlib.pyplot as plt | |
class ServerFactory: | |
def __init__(self, service_time, budget, living_cost, margin, reproduction_cost): | |
self._service_time = service_time |
This file contains 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
#!/usr/bin/env python | |
from itertools import permutations | |
def find_rotations(array): | |
""" | |
Search for a sequence of rotations that would sort the given array | |
""" | |
goal = tuple(sorted(array)) |