Have format V_<studyname>_<view>[_RAW], return name and view type REGULAR or RAW
327459
def name_type_from_viewname(viewname):
        """"""
        matched = VIEW_REX.match(viewname)
        return matched.group('view'), matched.group('type') or 'REGULAR'
190469
def _get_view_result(view, raw_result, **kwargs):
        
        if raw_result:
            return view(**kwargs)
        if kwargs:
            return Result(view, **kwargs)

        return view.result
1211301
def _view(self, filepath, format):
        """"""
        methodnames = [
            '_view_%s_%s' % (format, backend.PLATFORM),
            '_view_%s' % backend.PLATFORM,
        ]
        for name in methodnames:
            view_method = getattr(self, name, None)
            if view_method is not None:
                break
        else:
            raise RuntimeError('%r has no built-in viewer support for %r '
                'on %r platform' % (self.__class__, format, backend.PLATFORM))
        view_method(filepath)
894658
def dump_edn_val(v):
  " "
  if isinstance(v, (str, unicode)): 
    return json.dumps(v)
  elif isinstance(v, E):            
    return unicode(v)
  else:                             
    return dumps(v)
279657
def format_sql_workload_type_update_settings(result):
    '''
    
    '''
    from collections import OrderedDict
    # Only display parameters that have content
    order_dict = OrderedDict()
    if result.sql_workload_type is not None:
        order_dict['sqlWorkloadType'] = result.sql_workload_type

    return order_dict
241102
def render(view_name, locals = {})
      view = Massimo::View.find(view_name)
      view && view.render(locals)
    end
868961
def format_vk(vk):
    """"""

    # Force extension require to be a list
    for ext in get_extensions_filtered(vk):
        req = ext['require']
        if not isinstance(req, list):
            ext['require'] = [req]
635929
function resolveObjectName(view){
  return cache[view] || (cache[view] = view
    .split('/')
    .slice(-1)[0]
    .split('.')[0]
    .replace(/^_/, '')
    .replace(/[^a-zA-Z0-9 ]+/g, ' ')
    .split(/ +/).map(function(word, i){
      return i ? word[0].toUpperCase() + word.substr(1) : word;
    }).join(''));
}
105748
def findViewType(self, viewTypeName):
        
        for viewType in self._viewTypes:
            if ( viewType.viewTypeName() == viewTypeName ):
                return viewType
        return None
182609
def view(name, params = {}, payload = {}, &block)
      opts = {}
      params = params.dup
      payload['keys'] = params.delete(:keys) if params[:keys]

      # Continuous feeds need to be parsed differently
      opts[:continuous] = true if params['feed'] == 'continuous'

      # Try recognising the name, otherwise assume already prepared
      view_path = name_to_view_path(name)
      req_path = CouchRest.paramify_url("#{path}/#{view_path}", params)

      if payload.empty?
        connection.get req_path, opts, &block
      else
        connection.post req_path, payload, opts, &block
      end
    end
1228541
def StripTypeInfo(rendered_data):
  """"""

  if isinstance(rendered_data, (list, tuple)):
    return [StripTypeInfo(d) for d in rendered_data]
  elif isinstance(rendered_data, dict):
    if "value" in rendered_data and "type" in rendered_data:
      return StripTypeInfo(rendered_data["value"])
    else:
      result = {}
      for k, v in iteritems(rendered_data):
        result[k] = StripTypeInfo(v)
      return result
  else:
    return rendered_data
674109
function(result, raw_tag) {

		var view_config = {
				type: 'view',
				"class": 'View',
				container: this._toContainer(raw_tag)
			},
			x = raw_tag.x;

		this._parseViewAttributes(view_config, raw_tag);

		if ('content' in raw_tag) view_config.template = this.compileTemplate(raw_tag.content, view_config);
		if ('resource_id' in x) {
			if (Lava.schema.DEBUG && (('static_styles' in view_config.container) || ('static_properties' in view_config.container) || ('static_styles' in view_config.container)))
				Lava.t("View container with resource_id: all properties must be moved to resources");
			view_config.container.resource_id = Lava.parsers.Common.parseResourceId(x.resource_id);
		}

		result.push(view_config);

	}
977181
def format_variables(variables, join_lines=True):
  """"""
  rows = []
  rows.append(("Variable", "Shape", "Type", "Collections", "Device"))
  var_to_collections = _get_vars_to_collections(variables)
  for var in sorted(variables, key=lambda var: var.op.name):
    if var.get_shape().is_fully_defined():
      shape = "x".join(str(dim) for dim in var.get_shape().as_list())
    else:
      shape = "undefined"
    dtype = repr(var.dtype.base_dtype).replace("tf.", "")
    coll = ", ".join(sorted(var_to_collections[var]))
    rows.append((var.op.name, shape, dtype, coll, _format_device(var)))
  return _format_table(rows, join_lines)
1164947
def get_view_names(self, connection, schema=None, **kw):
        
        return self._get_table_or_view_names('v', connection, schema, **kw)
249915
def inspect
      format INSPECT_FORMAT, name: self.class.name,
                             object_id: object_id,
                             params: params_with_types,
                             type: Value.canonicalize(@_value.class)
    end
1296537
def _raw_sql(self, values):
        """"""
        if isinstance(self.model._meta.pk, CharField):
            when_clauses = " ".join(
                [self._when("'{}'".format(x), y) for (x, y) in values]
            )
        else:
            when_clauses = " ".join([self._when(x, y) for (x, y) in values])
        table_name = self.model._meta.db_table
        primary_key = self.model._meta.pk.column
        return 'SELECT CASE {}."{}" {} ELSE 0 END'.format(
            table_name, primary_key, when_clauses
        )
1297165
def known_formats(use: Union[Serializer, Parser]=Serializer, include_mime_types: bool = False) -> List[str]:
    
    return sorted([name for name, kind in plugin._plugins.keys()
                   if kind == use and (include_mime_types or '/' not in name)])