Deregisters an output class.

    The output classes are identified based on their NAME attribute.

    Args:
      output_class (type): output module class.

    Raises:
      KeyError: if output class is not set for the corresponding data type.
501096
def DeregisterOutput(cls, output_class):
    
    output_class_name = output_class.NAME.lower()

    if output_class_name in cls._disabled_output_classes:
      class_dict = cls._disabled_output_classes
    else:
      class_dict = cls._output_classes

    if output_class_name not in class_dict:
      raise KeyError(
          'Output class not set for name: {0:s}.'.format(
              output_class.NAME))

    del class_dict[output_class_name]
182153
def export(self, output=None, **kwargs):
        
        if output is None:
            output = self.DEFAULT_EXPORT
        if output is not None and output in self.export_capacities:
            for cls in getmro(type(self)):
                if hasattr(cls, "EXPORT_TO") and output in cls.EXPORT_TO:
                    return cls.__export__(self, output, **kwargs)
        raise NotImplementedError(
            "Mimetype {} has not been implemented for this resource".format(output or "(No Mimetype)")
        )
805176
def finalize(self, **kwargs):
        

        indices = np.arange(len(self.classes_))

        # Set the title
        self.set_title("Class Prediction Error for {}".format(self.name))

        # Set the x ticks with the class names
        self.ax.set_xticks(indices)
        self.ax.set_xticklabels(self.classes_)

        # Set the axes labels
        self.ax.set_xlabel("actual class")
        self.ax.set_ylabel("number of predicted class")

        # Compute the ceiling for the y limit
        cmax = max([sum(predictions) for predictions in self.predictions_])
        self.ax.set_ylim(0, cmax + cmax * 0.1)

        # Put the legend outside of the graph
        plt.legend(bbox_to_anchor=(1.04, 0.5), loc="center left")
        plt.tight_layout(rect=[0, 0, 0.85, 1])
578592
def remove_css_class(css_classes, css_class):
    
    remove = set(split_css_classes(css_class))
    classes_list = [c for c in split_css_classes(css_classes) if c not in remove]
    return " ".join(classes_list)
1060337
def setOutputHandler(self, outputhandler):
        
        class OutputHandlerInternal(amplpython.OutputHandler):
            def output(self, kind, msg):
                outputhandler.output(kind, msg)

        self._outputhandler = outputhandler
        self._outputhandler_internal = OutputHandlerInternal()
        lock_and_call(
            lambda: self._impl.setOutputHandler(
                self._outputhandler_internal
            ),
            self._lock
        )
444645
def GetOutputClasses(cls):
    
    for _, output_class in iter(cls._output_classes.items()):
      yield output_class.NAME, output_class
943561
def _gen_indicator_method(self, name, custom_class, value_count):
        
        method_name = name.replace(' ', '_').lower()
        tcex = self.tcex

        # Add Method for each Custom Indicator class
        def method_1(owner, value1, **kwargs):  # pylint: disable=W0641
            """Add Custom Indicator data to Batch object"""
            return custom_class(tcex, value1, owner=owner, **kwargs)

        def method_2(owner, value1, value2, **kwargs):  # pylint: disable=W0641
            """Add Custom Indicator data to Batch object"""
            return custom_class(tcex, value1, value2, owner=owner, **kwargs)

        def method_3(owner, value1, value2, value3, **kwargs):  # pylint: disable=W0641
            """Add Custom Indicator data to Batch object"""
            return custom_class(tcex, value1, value2, value3, owner=owner, **kwargs)

        method = locals()['method_{}'.format(value_count)]
        setattr(self, method_name, method)
1356542
def output(output_id, name, value_class=NumberValue):
        """"""
        def _init():
            return value_class(
                name,
                input_id=output_id,
                is_input=False,
                index=-1
            )
        def _decorator(cls):
            setattr(cls, output_id, _init())
            return cls
        return _decorator
77926
public static void resetModelClass() {
		ModelFactory.modelClass = DefaultModelImpl.class;
    	System.err.println("[INFO] Reset model-class: " + ModelFactory.modelClass.getName());
	}
438156
def DeregisterHelper(cls, analyzer_helper):
    
    if analyzer_helper.type_indicator not in cls._analyzer_helpers:
      raise KeyError(
          'Analyzer helper object not set for type indicator: {0:s}.'.format(
              analyzer_helper.type_indicator))

    analyzer_helper = cls._analyzer_helpers[analyzer_helper.type_indicator]

    cls._FlushCache(analyzer_helper.format_categories)

    del cls._analyzer_helpers[analyzer_helper.type_indicator]
58967
def build_model_output(cls, name='output'):
        
        return cls(name, PortDirection.OUTPUT, type=PortType.MODEL)
1294147
def DeregisterPathSpec(cls, path_spec_type):
    
    type_indicator = path_spec_type.TYPE_INDICATOR
    if type_indicator not in cls._path_spec_types:
      raise KeyError(
          'Path specification type: {0:s} not set.'.format(type_indicator))

    del cls._path_spec_types[type_indicator]

    if type_indicator in cls._system_level_type_indicators:
      del cls._system_level_type_indicators[type_indicator]
812098
def DeregisterCredentials(cls, credentials):
    
    if credentials.type_indicator not in cls._credentials:
      raise KeyError(
          'Credential object not set for type indicator: {0:s}.'.format(
              credentials.type_indicator))

    del cls._credentials[credentials.type_indicator]
1006366
def setClass(self, factoryclass):
        
        self.factoryclass = factoryclass
        self.setText(str(factoryclass.name))
614218
def other_classes(nb_classes, class_ind):
  
  if class_ind < 0 or class_ind >= nb_classes:
    error_str = "class_ind must be within the range (0, nb_classes - 1)"
    raise ValueError(error_str)

  other_classes_list = list(range(nb_classes))
  other_classes_list.remove(class_ind)

  return other_classes_list
409178
def process(self):
        
        for name, klass in self.classes.items():
            logger.debug('Processing class: %s', name)
            if isinstance(klass, DvClass):
                klass.process()
            else:
                dvclass = self.classes[name] = DvClass(klass, self.vma)
                dvclass.process()
132354
def _generate_union_class_symbol_creators(self, data_type):
        
        class_name = fmt_class(data_type.name)
        lineno = self.lineno
        for field in data_type.fields:
            if is_void_type(field.data_type):
                field_name = fmt_func(field.name)
                self.emit("{0}.{1} = {0}('{1}')".format(class_name, field_name))
        if lineno != self.lineno:
            self.emit()