Determines whether this plugin is active.

    This plugin is only active if TensorBoard sampled any text summaries.

    Returns:
      Whether this plugin is active.
11815
def is_active(self):
    
    if not self._multiplexer:
      return False

    if self._index_cached is not None:
      # If we already have computed the index, use it to determine whether
      # the plugin should be active, and if so, return immediately.
      if any(self._index_cached.values()):
        return True

    if self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME):
      # Text data is present in the multiplexer. No need to further check for
      # data stored via the outdated plugin assets method.
      return True

    # We haven't conclusively determined if the plugin should be active. Launch
    # a thread to compute index_impl() and return False to avoid blocking.
    self._maybe_launch_index_impl_thread()

    return False
1098096
def is_active(self):
        """"""
        if self._queue.exhausted:
            return False
        return any(ch.is_active for ch in self._refs.values())
167815
def has_active_condition(self, conditions, instances):
        
        return_value = None
        for instance in itertools.chain(instances, [None]):
            if not self.can_execute(instance):
                continue
            result = self.is_active(instance, conditions)
            if result is False:
                return False
            elif result is True:
                return_value = True
        return return_value
253729
def is_active(self):
    
    return bool(
        self._grpc_port is not None and
        self._event_multiplexer and
        self._event_multiplexer.PluginRunToTagToContent(
            constants.DEBUGGER_PLUGIN_NAME))
1145365
@Override
	public boolean isActive() {
		try {
			return hasMethodThat(named("getCurrentTemplate")
					.and(ElementMatchers.<MethodDescription.InDefinedShape>isPublic())
					.and(takesArguments(0)))
					.matches(new TypeDescription.ForLoadedType(Class.forName("freemarker.core.Environment")));
		} catch (ClassNotFoundException e) {
			return false;
		}
	}
211895
public boolean isActive() {

        if (!m_enabled) {
            return false;
        }
        long currentTime = System.currentTimeMillis();
        return ((currentTime > m_timeStart) && (currentTime < m_timeEnd));
    }
97066
def is_active(self):
    """"""
    if self._db_connection_provider:
      # The plugin is active if one relevant tag can be found in the database.
      db = self._db_connection_provider()
      cursor = db.execute(
          '''
          SELECT 1
          FROM Tags
          WHERE Tags.plugin_name = ?
          LIMIT 1
          ''',
          (metadata.PLUGIN_NAME,))
      return bool(list(cursor))
    if not self._multiplexer:
      return False
    return bool(self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME))
84447
def is_training():
    
    curr = ctypes.c_bool()
    check_call(_LIB.MXAutogradIsTraining(ctypes.byref(curr)))
    return curr.value
252332
def is_alive(self):
        
        if hasattr(self.device, 'remote_conn'):
            return self.device.remote_conn.transport.is_active() and self._xml_agent_alive
        return False
382084
def check_whiteboard_status(self, whiteboard):
        """"""

        stockwell_text = re.search(r'\[stockwell (.+?)\]', whiteboard)
        if stockwell_text is not None:
            text = stockwell_text.group(1).split(':')[0]
            if text == 'fixed' or text == 'disable-recommended' or text == 'infra' or text == 'disabled':
                return True
        return False
960804
def getActive(cls):
        
        activePythonContext = cls._activeContext
        if activePythonContext is not None:
            # Verify that the current running Java StreamingContext is active and is the same one
            # backing the supposedly active Python context
            activePythonContextJavaId = activePythonContext._jssc.ssc().hashCode()
            activeJvmContextOption = activePythonContext._jvm.StreamingContext.getActive()

            if activeJvmContextOption.isEmpty():
                cls._activeContext = None
            elif activeJvmContextOption.get().hashCode() != activePythonContextJavaId:
                cls._activeContext = None
                raise Exception("JVM's active JavaStreamingContext is not the JavaStreamingContext "
                                "backing the action Python StreamingContext. This is unexpected.")
        return cls._activeContext
312486
def has_active_condition(self, condition, instances):
        
        return_value = None
        for instance in instances + [None]:
            if not self.can_execute(instance):
                continue
            result = self.is_active(instance, condition)
            if result is False:
                return False
            elif result is True:
                return_value = True
        return return_value
6356
def is_active(self, key, *instances, **kwargs):
        
        default = kwargs.pop('default', False)

        # Check all parents for a disabled state
        parts = key.split(':')
        if len(parts) > 1:
            child_kwargs = kwargs.copy()
            child_kwargs['default'] = None
            result = self.is_active(':'.join(parts[:-1]), *instances, **child_kwargs)

            if result is False:
                return result
            elif result is True:
                default = result

        try:
            switch = self[key]
        except KeyError:
            # switch is not defined, defer to parent
            return default

        if switch.status == GLOBAL:
            return True
        elif switch.status == DISABLED:
            return False
        elif switch.status == INHERIT:
            return default

        conditions = switch.value
        # If no conditions are set, we inherit from parents
        if not conditions:
            return default

        if instances:
            # HACK: support request.user by swapping in User instance
            instances = list(instances)
            for v in instances:
                if isinstance(v, HttpRequest) and hasattr(v, 'user'):
                    instances.append(v.user)

        # check each switch to see if it can execute
        return_value = False

        for switch in self._registry.itervalues():
            result = switch.has_active_condition(conditions, instances)
            if result is False:
                return False
            elif result is True:
                return_value = True

        # there were no matching conditions, so it must not be enabled
        return return_value
602732
public function active()
    {
        $classes = $this->getAdaptee()->classes;

        foreach ($classes as $class) {
            if (strpos($class, 'current') !== false) {
                return true;
            }
        }

        return false;
    }
732422
def isSegmentActive(self, seg, activeState):
    
    # Computing in C - *much* faster
    return isSegmentActive(seg.syns, activeState,
                           self.connectedPerm, self.activationThreshold)
321695
def isReadOnly( self ):
        
        if ( self._editor and hasattr(self._editor, 'isReadOnly') ):
            return self._editor.isReadOnly()
        return False
78611
function is_active_for_site( $blog_id ) {
            if ( ! is_multisite() ) {
                // Not a multisite and this code is executed, means that the plugin is active.
                return true;
            }

            if ( $this->is_theme() ) {
                // All themes are site level activated.
                return true;
            }

            if ( $this->_is_network_active ) {
                // Plugin was network activated so it's active.
                return true;
            }

            return in_array( $this->_plugin_basename, (array) get_blog_option( $blog_id, 'active_plugins', array() ) );
        }