Lookup type info from app configuration.
774258
def declare_type_info(config):
    """"""
    settings = config.registry.settings
    settings['_type_info'] = []
    for line in settings['exports-allowable-types'].splitlines():
        if not line.strip():
            continue
        type_name, type_info = line.strip().split(':', 1)
        type_info = type_info.split(',', 3)
        settings['_type_info'].append((type_name, {
            'type_name': type_name,
            'file_extension': type_info[0],
            'mimetype': type_info[1],
            'user_friendly_name': type_info[2],
            'description': type_info[3],
            }))
43417
def info(self):
        """"""

        return self._h._get_resource(
            resource=('apps', self.name),
            obj=App,
        )
270231
def _guess_type(val):
        """"""
        if isinstance(val, bool):
            return "choice"
        elif isinstance(val, int):
            return "number"
        elif isinstance(val, float):
            return "number"
        elif isinstance(val, str):
            return "text"
        elif hasattr(val, 'read'):
            return "file"
        else:
            return "text"
1305465
function info(appName, callback) {
    commons.get(format('/%s/apps/%s/', deis.version, appName), callback);
  }
574512
def _get_type_id_options(name, configuration):
    '''
    
    '''
    # it's in a form of source.name
    if '.' in name:
        type_, sep, id_ = name.partition('.')
        options = configuration
    else:
        type_ = next(six.iterkeys(configuration))
        id_ = name
        options = configuration[type_]

    return type_, id_, options
130316
def lookup(ctx, number, comment, cache):
    """"""
    phone = PhoneNumber(number, comment=comment)
    info('{0} | {1}'.format(phone.number, ctx.obj['config']['lookups'].keys()))
    if phone.number in ctx.obj['config']['lookups']:
        info('{0} is already cached:'.format(phone.number))
        info(jsonify(ctx.obj['config']['lookups'][phone.number]))
        return
    data = phone.lookup()
    info('carrier = {0}'.format(phone.carrier))
    info('type = {0}'.format(phone.type))
    info('cache = {0}'.format(cache))
    if cache:
        ctx.obj['config']['lookups'][phone.number] = phone.raw
        with open(CONFIG_FILE, 'wb') as cfg:
            cfg.write(json.dumps(ctx.obj['config'], indent=2))
132732
def get_routertypes(self, context, filters=None, fields=None,
                        sorts=None, limit=None, marker=None,
                        page_reverse=False):
        """"""
        pass
18799
def searchable_object_types(self):
        """"""
        try:
            idx = self.index()
        except KeyError:
            # index does not exists: service never started, may happens during
            # tests
            return []

        with idx.reader() as r:
            indexed = sorted(set(r.field_terms("object_type")))
        app_indexed = self.app_state.indexed_fqcn

        return [(name, friendly_fqcn(name)) for name in indexed if name in app_indexed]
51357
function typesFrom(configParams) {
  configParams = configParams || [];
  const types = {};
  for (let i =0; i < configParams.length; i++) {
    const key = configParams[i];
    types[camelCase(key)] = PropTypes.any;
  }
  return types;
}
116415
def look_up(name):
    """"""
    path = name.split('.')
    module = import_module('.'.join(path[:-1]))
    return getattr(module, path[-1])
34199
def _find_types(pkgs):
    ''''''
    return sorted({pkg.split(':', 1)[0] for pkg in pkgs
                   if len(pkg.split(':', 1)) == 2})
599150
def get_type(data):
    
    if data["analysis"].lower().startswith("var") or dd.get_variantcaller(data):
        return tz.get_in(("config", "algorithm", "effects"), data, "snpeff")
82535
def lookUpFieldType(field_type):
    
    if field_type == "esriFieldTypeDate":
        return "DATE"
    elif field_type == "esriFieldTypeInteger":
        return "LONG"
    elif field_type == "esriFieldTypeSmallInteger":
        return "SHORT"
    elif field_type == "esriFieldTypeDouble":
        return "DOUBLE"
    elif field_type == "esriFieldTypeString":
        return "TEXT"
    elif field_type == "esriFieldTypeBlob":
        return "BLOB"
    elif field_type == "esriFieldTypeSingle":
        return "FLOAT"
    elif field_type == "esriFieldTypeRaster":
        return "RASTER"
    elif field_type == "esriFieldTypeGUID":
        return "GUID"
    elif field_type == "esriFieldTypeGlobalID":
        return "TEXT"
    else:
        return "TEXT"
331213
def fetch_feature_type(self):
        """"""
        query = self.query().add_query_parameter(req='featureType')
        return self.get_query(query).content
830098
def _find_adapter(registry, ob):
    """"""
    types = _always_object(inspect.getmro(getattr(ob, '__class__', type(ob))))
    for t in types:
        if t in registry:
            return registry[t]
219529
def getApplicationSupportedMimeTypes(self, pchAppKey, pchMimeTypesBuffer, unMimeTypesBuffer):
        """"""

        fn = self.function_table.getApplicationSupportedMimeTypes
        result = fn(pchAppKey, pchMimeTypesBuffer, unMimeTypesBuffer)
        return result
1364296
def guess_message_type(message):
    
    if isinstance(message, APPConfigMessage):
        return MsgType.CONFIG
    elif isinstance(message, APPJoinMessage):
        return MsgType.JOIN
    elif isinstance(message, APPDataMessage):
        # All inheriting from this first !!
        return MsgType.DATA
    elif isinstance(message, APPUpdateMessage):
        return MsgType.UPDATE
    elif isinstance(message, APPUnjoinMessage):
        return MsgType.UNJOIN
    # APPMessage -> ACK?
    return None