def __init__(self):
        with open('coloranalytics.txt') as file:
            data = eval(file.read())

        self.colorProfiles = [ ]
        self.hueOffset = 0
        self.rgbOffset = (0,0,0)

        for color in data:
            profile = [ ]
            profile.append(color)
            sats = [i[0] for i in data[color]]
            hues = [i[1] for i in data[color]]
            vals = [i[2] for i in data[color]]

            meanSat = float(sum(sats)) / len(sats)
            meanHue = float(sum(hues)) / len(hues)
            meanVal = float(sum(vals)) / len(vals)

            sqsSat = [(sat - meanSat)**2 for sat in sats]
            meanSqSat = float(sum(sqsSat)) / len(sqsSat)

            sqsHue = [(hue - meanHue)**2 for hue in hues]
            meanSqHue = float(sum(sqsHue)) / len(sqsHue)

            sqsVal = [(val - meanVal)**2 for val in vals]
            meanSqVal = float(sum(sqsVal)) / len(sqsVal)

            self.colorProfiles.append(Profile(color, meanSat, meanHue, meanVal,
                                            meanSqSat, meanSqHue, meanSqVal))
dataset/ETHPy150Open bluquar/cubr/coloranalytics.py/Profiles.__init__/original