def do_aggregate_scores(self, args = None): '''[*] aggregate_scores (optional)<filter:weight>\n\t|- aggregates the reputations of all files using the list of filters and weights provided\n\t|- if no list is provided all filters are weighted equally\n\t|-[filter:weight] - optional list of filter IDs and weights\n\t|- weights are a percentage and can range from 0-1 or 0-100''' print "Aggregating Scores" ag = Aggregator(self.cnx) if args and len(args) > 0: ag.aggregate(filter_list, args) else: ag.aggregate(filter_list)
def run(self, agg_weights=None): print "Running report survey for: " + self.source.source_name print "... aggregating most recent filter scores" ag = Aggregator(self.cnx) ag.aggregate(filter_list, agg_weights) self.run_filter_survey() self.generate_report()
def do_aggregate_scores(self, line): ''' aggregate_scores filter_id:weight filter_id:weight ... Aggregates the reputations of all files using the list of filters and weights provided. If no list is provided, all filters are weighted equally. The "filter_id" is the numeric id of the filter. The "weight" is a percentage between 0-100, such that the total of all specified weights is 100. For example, if you have 3 filters loaded, and you want to aggregate the scores such that the distribution of weights is 50, 30, 20 respectively, then you would run the following command Example aggregate_scores 0:50 1:30 2:20 ''' print "Aggregating Scores" args = line.split() ag = Aggregator(self.cnx) if args and len(args) > 0: ag.aggregate(filter_list, args) else: ag.aggregate(filter_list)