Retrieves results of the most recent analysis.

    Returns:
      list[AnalyzerResult]: results.
554465
def GetResults(self):
    
    result = analyzer_result.AnalyzerResult()
    result.analyzer_name = self.NAME
    result.attribute_name = self._ATTRIBUTE_NAME
    rule_names = [match.rule for match in self._matches]
    result.attribute_value = ','.join(rule_names)
    return [result]
1370086
def getDepartments(self):
        
        departments = list()
        for analysis in self.getAnalyses(full_objects=True):
            department = analysis.getDepartment()
            if department and department not in departments:
                departments.append(department)
        return departments
979216
def analysis(self, analysis_id: int) -> models.Analysis:
        """"""
        return self.Analysis.query.get(analysis_id)
279643
def get_most_recent_update_time(self):
        
        def parse_time(t):
            if t:
                return time.gmtime(t/1000)
            return None
        try:
            max_wf_started_at = max([i.get('startedAt') for i in self.workflowHistory])
            return parse_time(max_wf_started_at)
        except ValueError:
            return None
504302
def dump(self):
        
        results = []
        for data in self.data():
            results.append(data)
        return results
1281599
def analysis_output(self, location: Optional[str] = None) -> None:
        
        try:
            if not location:
                location = self.prompt(
                    "Analysis results: ",
                    history_key="analysis_results",
                    completer=PathCompleter(),
                )
            self.current_analysis_output = AnalysisOutput.from_str(location)
        except AnalysisOutputError as e:
            raise UserError(f"Error loading results: {e}")
1202612
def folderitems(self):
        
        items = super(AnalysisProfileAnalysesView, self).folderitems()
        self.categories.sort()
        return items
503686
def collect_analysis(self):
        '''
        
        '''
        analysis = {}
        for field in self.fields.values():
            for analyzer_name in ('analyzer', 'index_analyzer', 'search_analyzer'):
                if not hasattr(field, analyzer_name):
                    continue

                analyzer = getattr(field, analyzer_name)

                if not isinstance(analyzer, Analyzer):
                    continue

                definition = analyzer.get_analysis_definition()
                if definition is None:
                    continue

                for key in definition:
                    analysis.setdefault(key, {}).update(definition[key])

        return analysis
278509
def recent_update_frequencies(self):
        
        return list(reversed([(1.0 / p) for p in numpy.diff(self._recent_updates)]))
433346
def getResults(self):
        

        results = self._response.copy()
        if 'status' in self._response.keys():
            if results['status'] is not None:
                del results['status']
            return results
        else:
            return None
1233636
def get(self):
        
        stats = {}
        if self.start_date is not None:
            stats["start_date"] = self.start_date
        if self.end_date is not None:
            stats["end_date"] = self.end_date
        if self.aggregated_by is not None:
            stats["aggregated_by"] = self.aggregated_by
        if self.sort_by_metric is not None:
            stats["sort_by_metric"] = self.sort_by_metric
        if self.sort_by_direction is not None:
            stats["sort_by_direction"] = self.sort_by_direction
        if self.limit is not None:
            stats["limit"] = self.limit
        if self.offset is not None:
            stats["offset"] = self.offset
        if self.categories is not None:
            stats['categories'] = [category.get() for category in
                                   self.categories]
        return stats
869452
def GetTransactionResults(self):
        
        if self.References is None:
            return None

        results = []
        realresults = []
        for ref_output in self.References.values():
            results.append(TransactionResult(ref_output.AssetId, ref_output.Value))

        for output in self.outputs:
            results.append(TransactionResult(output.AssetId, output.Value * Fixed8(-1)))

        for key, group in groupby(results, lambda x: x.AssetId):
            sum = Fixed8(0)
            for item in group:
                sum = sum + item.Amount

            if sum != Fixed8.Zero():
                realresults.append(TransactionResult(key, sum))

        return realresults
1367315
def getWorksheetServices(self):
        
        services = []
        for analysis in self.getAnalyses():
            service = analysis.getAnalysisService()
            if service and service not in services:
                services.append(service)
        return services
154209
def result(self):
        
        final_result = {'epoch_idx': self.global_epoch_idx}

        for key, value in self.frozen_results.items():
            final_result[key] = value

        return final_result
255517
def retrieve_metrics(self):
        

        time = np.array(self.list_dates)
        if len(time) >= 1:
            time -= time[0]
        return {'time': time, 'index': self.list_iters,
                'values': self.list_cv_values}
669813
def get_all(self):
        
        res = self.es.search(index=self.index, doc_type=self.doc_type, body={'query': {'match_all': {}}})
        if not res['hits']['total']:
            return []
        return [Visualization.from_kibana(hit) for hit in res['hits']['hits']]
138712
def folderitems(self):
        
        items = super(AnalysisRequestAnalysesView, self).folderitems()
        self.categories.sort()
        return items