Whether a collection of Bokeh objects contains a plot requesting WebGL

    Args:
        objs (seq[Model or Document]) :

    Returns:
        bool
347963
def _use_gl(objs):
    ''' 

    '''
    from ..models.plots import Plot
    return _any(objs, lambda obj: isinstance(obj, Plot) and obj.output_backend == "webgl")
14192
def is_listish(obj):
    """"""
    if isinstance(obj, (list, tuple, set)):
        return True
    return is_sequence(obj)
307737
def save_frames(obj, filename, fmt=None, backend=None, options=None):
    
    backend = Store.current_backend if backend is None else backend
    renderer = Store.renderers[backend]
    fmt = renderer.params('fig').objects[0] if fmt is None else fmt
    plot = renderer.get_plot(obj)
    for i in range(len(plot)):
        plot.update(i)
        renderer.save(plot, '%s_%s' % (filename, i), fmt=fmt, options=options)
136780
def _value(obj):
    
    # TODO: this is ugly and makes everything ugly
    # can we handle this with a clean decorator or just requiring that only floats be passed??
    if hasattr(obj, 'value'):
        return obj.value
    elif isinstance(obj, np.ndarray):
        return np.array([o.value for o in obj])
    elif hasattr(obj, '__iter__'):
        return [_value(o) for o in obj]
    return obj
1262816
def is_nested_object(obj):
    

    if isinstance(obj, ABCSeries) and is_object_dtype(obj):

        if any(isinstance(v, ABCSeries) for v in obj.values):
            return True

    return False
683997
def display(obj, raw_output=False, **kwargs):
    
    if not Store.loaded_backends() and isinstance(obj, Dimensioned):
        raise RuntimeError('To use display on a HoloViews object ensure '
                           'a backend is loaded using the holoviews '
                           'extension.')

    raw = True
    if isinstance(obj, GridSpace):
        with option_state(obj):
            output = grid_display(obj)
    elif isinstance(obj, (CompositeOverlay, ViewableElement)):
        with option_state(obj):
            output = element_display(obj)
    elif isinstance(obj, (Layout, NdLayout, AdjointLayout)):
        with option_state(obj):
            output = layout_display(obj)
    elif isinstance(obj, (HoloMap, DynamicMap)):
        with option_state(obj):
            output = map_display(obj)
    elif isinstance(obj, Plot):
        output = render(obj)
    else:
        output = obj
        raw = kwargs.pop('raw', False)

    if raw_output:
        return output
    elif isinstance(output, tuple):
        data, metadata = output
    else:
        data, metadata = output, {}
    return IPython.display.display(data, raw=raw, metadata=metadata, **kwargs)
1305196
def is_dataframe(obj):
    
    try:
        # This is the best method of type checking
        from pandas import DataFrame
        return isinstance(obj, DataFrame)
    except ImportError:
        # Pandas is not a dependency, so this is scary
        return obj.__class__.__name__ == "DataFrame"
1350998
def match(self, obj):
        
        path, frag = [], obj
        for part in self.parts:
            path.append(part)
            if isinstance(frag, dict):
                try:
                    frag = frag[part]
                except KeyError:
                    return False
            elif isinstance(frag, (list, tuple)):
                frag = part in frag
            elif isinstance(frag, str):
                frag = frag == part
            elif isinstance(frag, int):
                frag = frag == int(part)
            else:
                return False
        return True if frag else False
739885
def _get_default(self, obj):
        ''' 

        '''
        if self.name in obj._property_values:
            # this shouldn't happen because we should have checked before _get_default()
            raise RuntimeError("Bokeh internal error, does not handle the case of self.name already in _property_values")

        is_themed = obj.themed_values() is not None and self.name in obj.themed_values()

        default = self.instance_default(obj)

        if is_themed:
            unstable_dict = obj._unstable_themed_values
        else:
            unstable_dict = obj._unstable_default_values

        if self.name in unstable_dict:
            return unstable_dict[self.name]

        if self.property._may_have_unstable_default():
            if isinstance(default, PropertyValueContainer):
                default._register_owner(obj, self)
            unstable_dict[self.name] = default

        return default
360727
def single_frame_plot(obj):
    
    obj = Layout.from_values(obj) if isinstance(obj, AdjointLayout) else obj

    backend = Store.current_backend
    renderer = Store.renderers[backend]

    plot_cls = renderer.plotting_class(obj)
    plot = plot_cls(obj, **renderer.plot_options(obj, renderer.size))
    fmt = renderer.params('fig').objects[0] if renderer.fig == 'auto' else renderer.fig
    return plot, renderer, fmt
1032676
def first_frame(obj):
    ""
    plot, renderer, fmt = single_frame_plot(obj)
    plot.update(0)
    return {'text/html': renderer.html(plot, fmt)}
488320
function isCyclic(obj) {
    let seenObjects = [];

    const detect = obj => {
        if (obj && typeof obj === "object") {
            if (seenObjects.includes(obj)) {
                return true;
            }

            seenObjects.push(obj);
            for (const key in obj) {
                if (obj.hasOwnProperty(key) && detect(obj[key])) {
                    return true;
                }
            }
        }

        return false;
    };

    return detect(obj);
}
133494
function (obj) {
			this.writeDebug('isEmptyObject',arguments);
			for (var key in obj) {
				if (obj.hasOwnProperty(key)) {
					return false;
				}
			}
			return true;
		}
363987
function(obj) {
		return Object.keys(obj).every(function(key) {
			var is = false;
			switch (key) {
				case "getter":
				case "setter":
					is = gui.Type.isFunction(obj[key]);
					break;
			}
			return is;
		});
	}
1250045
function(obj) {
        var feature, geometry, attributes, bbox;
        attributes = (obj.properties) ? obj.properties : {};
        bbox = (obj.geometry && obj.geometry.bbox) || obj.bbox;
        try {
            geometry = this.parseGeometry(obj.geometry);
        } catch(err) {
            // deal with bad geometries
            throw err;
        }
        feature = new OpenLayers.Feature.Vector(geometry, attributes);
        if(bbox) {
            feature.bounds = OpenLayers.Bounds.fromArray(bbox);
        }
        if(obj.id) {
            feature.fid = obj.id;
        }
        return feature;
    }
64121
def is_ordered_mapping(obj):
    
    if not (is_mapping(obj) and hasattr(obj, '__reversed__')):
        return False

    # PyPy has a bug where the standard :class:`dict` has the ``__reversed__``
    # method but it's unusable and throws an exception when called
    try:
        obj.__reversed__()
    except TypeError:
        return False
    else:
        return True
881645
function (obj) {
    var parent = null,
      box = null,
      pos = [],
      _sL = document.body.scrollLeft + document.documentElement.scrollLeft,
      _sT = document.body.scrollTop + document.documentElement.scrollTop;

    if (obj.parentNode === null || getStyle(obj, 'display') == 'none') return false;
    if (obj.getBoundingClientRect) { // IE
      box = obj.getBoundingClientRect();
      return [Math.round(box.left) + (document.documentElement.scrollLeft || document.body.scrollLeft), Math.round(box.top) + (document.documentElement.scrollTop || document.body.scrollTop), _sL, _sT];
    } else if (document.getBoxObjectFor) { // gecko
      box = document.getBoxObjectFor(obj);
      pos = [box.x, box.y];
    } else { // safari/opera
      pos = [obj.offsetLeft, obj.offsetTop];
      parent = obj.offsetParent;
      if (parent != obj) {
        while (parent) {
          pos[0] += parent.offsetLeft;
          pos[1] += parent.offsetTop;
          parent = parent.offsetParent;
        }
      }
      if (window.opera || (document.childNodes && !document.all && !navigator.taintEnabled && !accentColorName)) pos[1] -= document.body.offsetTop;
    }
    if (obj.parentNode) parent = obj.parentNode;
    else parent = null;
    while (parent && parent.tagName != 'BODY' && parent.tagName != 'HTML') {
      pos[0] -= parent.scrollLeft;
      pos[1] -= parent.scrollTop;
      if (parent.parentNode) parent = parent.parentNode;
      else parent = null;
    }
    return pos.concat([_sL, _sT]);
  }