Subversion Repositories SmartDukaan

Rev

Rev 4082 | Rev 5173 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4082 Rev 4569
Line 3... Line 3...
3
def getMaxValFromDict(dictionary):
3
def getMaxValFromDict(dictionary):
4
    
4
    
5
    max = None
5
    max = None
6
    
6
    
7
    for key, val in dictionary.iteritems():
7
    for key, val in dictionary.iteritems():
8
        if max is not None or max < val:   max = val
8
        if max is None or max < val:    max = val
9
    
9
    
10
    return max * 1.0
10
    return max * 1.0
11
 
11
 
12
def getBenchmarkScore(model):
12
def getBenchmarkScore(model):
13
    processor_benchmarks = {
13
    processor_benchmarks = {
Line 59... Line 59...
59
        
59
        
60
        if features.has_key('Processor model'):
60
        if features.has_key('Processor model'):
61
            model = features.get('Processor model')
61
            model = features.get('Processor model')
62
            model_score = getBenchmarkScore(str(model[0]))
62
            model_score = getBenchmarkScore(str(model[0]))
63
    return model_score
63
    return model_score
64
        
64
 
65
print "expSlide=" + `expSlide`
65
print "expSlide=" + `expSlide`
66
 
66
 
67
struct = utils.contentModel2Struct(expSlide, categoryObj)
67
struct = utils.contentModel2Struct(expSlide, categoryObj)
68
print "struct=" + `struct`
68
print "struct=" + `struct`
69
 
69