Generic function to access one of the number satellite attribute
        ie : self.nb_pollers, self.nb_reactionners ...

        :param s_type: satellite type wanted
        :type s_type: str
        :return: self.nb_*type*s
        :rtype: int
778903
def get_nb_of_must_have_satellites(self, s_type):
        
        if hasattr(self, 'nb_' + s_type + 's'):
            return getattr(self, 'nb_' + s_type + 's')

        logger.debug("[realm %s] do not have this kind of satellites: %s", self.name, s_type)
        return 0
136758
def find_types(observatory, match=None, trend=None,
               connection=None, **connection_kw):
    
    return sorted(connection.find_types(observatory, match=match),
                  key=lambda x: _type_priority(observatory, x, trend=trend))
634298
def get_type_name(t):
    
    # Lookup in the mapping
    try:
        return __type_names[t]
    except KeyError:
        # Specific types
        if issubclass(t, six.integer_types):
            return _(u'Integer number')

        # Get name from the Type itself
        return six.text_type(t.__name__).capitalize()
891458
def find(cls, dtype):
        
        try:
            return cls._member_map_[dtype]
        except KeyError:
            try:
                dtype = numpy.dtype(dtype).type
            except TypeError:
                for ndstype in cls._member_map_.values():
                    if ndstype.value is dtype:
                        return ndstype
            else:
                for ndstype in cls._member_map_.values():
                    if ndstype.value and ndstype.numpy_dtype is dtype:
                        return ndstype
            raise ValueError('%s is not a valid %s' % (dtype, cls.__name__))
550942
def tableType( self ):
        
        if not self._tableType:
            if self._tableTypeName:
                self._tableType = Orb.instance().model(nstr(self._tableTypeName))
            
        return self._tableType
776045
def exists_type(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.exists_type(index=self._name, **kwargs)
1147220
def get_datatype(cls,
                     db: DATABASE_SUPPORTER_FWD_REF,
                     table: str,
                     column: str) -> str:
        """"""
        raise RuntimeError(_MSG_NO_FLAVOUR)
86895
def base_type
      n = NodeCache.find(attributes["type"])
      n.is_a?(Type) ? n.base_type : n
    end
1088403
def get_attribute_value(self, name, index):
        
        if index == MISSING:
            return
        elif self.attribute_types[name] in NUMERIC_TYPES:
            at = self.attribute_types[name]
            if at == TYPE_INTEGER:
                return int(index)
            return Decimal(str(index))
        else:
            assert self.attribute_types[name] == TYPE_NOMINAL
            cls_index, cls_value = index.split(':')
            #return self.attribute_data[name][index-1]
            if cls_value != MISSING:
                assert cls_value in self.attribute_data[name], \
                    'Predicted value "%s" but only values %s are allowed.' \
                        % (cls_value, ', '.join(self.attribute_data[name]))
            return cls_value
1223569
def index(self, type_: Type[T]) -> int:
        
        for i, cond in ((q[0], q[1][0]) for q in enumerate(self.handlers)):
            try:
                match = cond(type_)
            except:
                if self.raiseconditionerrors:
                    raise
                match = False
            if match:
                return i
        raise ValueError('No matching condition found')
112236
def _node_type(st):
    
    _types = [
        (stat.S_ISBLK, "block device"),
        (stat.S_ISCHR, "character device"),
        (stat.S_ISFIFO, "named pipe"),
        (stat.S_ISSOCK, "socket")
    ]
    for t in _types:
        if t[0](st.st_mode):
            return t[1]
1223254
def lookup(self, tmp):
        
        if tmp < 0 or tmp > self.types_used:
            l.debug("Invalid temporary number %d", tmp)
            raise IndexError(tmp)
        return self.types[tmp]
64801
def get_type_data(name):
    
    name = name.upper()
    if name in CELESTIAL_TIME_TYPES:
        namespace = 'time'
        domain = 'Celestial Time Systems'
        time_name = CELESTIAL_TIME_TYPES[name]
    elif name in EARTH_TIME_TYPES:
        namespace = 'time'
        domain = 'Earth Time Systems'
        time_name = EARTH_TIME_TYPES[name]
    elif name in SUPER_FUN_TIME_TYPES:
        namespace = 'time'
        domain = 'Alternative Time Systems'
        time_name = SUPER_FUN_TIME_TYPES[name]
    else:
        raise NotFound('Time Type: ' + name)

    return {
        'authority': 'okapia.net',
        'namespace': namespace,
        'identifier': name,
        'domain': domain,
        'display_name': time_name + ' Time Type',
        'display_label': time_name,
        'description': ('The time type for ' + time_name + ' time.')
    }
460064
def handle_type(id_generator)
      if @type != 'AGGREGATE'
        # Generate the precondition for this population
        if @preconditions.length > 1 ||
           (@preconditions.length == 1 && @preconditions[0].conjunction != conjunction_code)
          @preconditions = [Precondition.new(id_generator.next_id, conjunction_code, @preconditions)]
        end
      else
        # Extract the data criteria this population references
        dc = handle_observation_criteria
        @preconditions = [Precondition.new(id_generator.next_id, nil, nil, false, HQMF2::Reference.new(dc.id))]
      end
    end
376623
def get_type(type_):
    
    if isinstance(type_, list):
        type_ = tuple(type_)

    for k, v in TYPE_MAP.iteritems():
        if k == type_:
            return v

    raise KeyError("Unknown type %r" % (type_,))
864921
def __search(self, value, type_attribute):
        
        results = []
        if not value:
            raise EmptySearchtermError
        for idx, connection in enumerate(self.misp_connections):
            misp_response = connection.search(type_attribute=type_attribute, values=value)

            # Fixes #94
            if isinstance(self.misp_name, list):
                name = self.misp_name[idx]
            else:
                name = self.misp_name

            results.append({'url': connection.root_url,
                            'name': name,
                            'result': self.__clean(misp_response)})
        return results
210294
def get_type_name(type_name, sub_type=None):
    
    if type_name == "enum":
        return type_name
    elif type_name == "boolean":
        return "bool"
    elif type_name == "integer":
        return "long"
    elif type_name == "time":
        return "long"
    elif type_name == "object":
        return "Object"
    elif type_name == "list":
        return "List"
    elif type_name == "float":
        return "float"
    else:
        return "String"