Get general information about the state of the class
356747
def get_state(self):
        """"""
        return {"started": (True if self.background_process and
                            self.background_process.is_alive() else False),
                "paused": self._pause.value,
                "stopped": self._end.value,
                "tasks": len(self.current_tasks),
                "busy_tasks": len(self.busy_tasks),
                "free_tasks": len(self.free_tasks)}
216342
def get(cls):
        
        stats = {}
        cur_time = time.time()
        # minimum interval for getting CPU and memory statistics
        if cur_time < cls._last_measurement or \
           cur_time > cls._last_measurement + 1.9:
            cls._last_measurement = cur_time
            # Non blocking call to get cpu usage. First call will return 0
            cls._last_cpu_percent = psutil.cpu_percent(interval=None)
            cls._last_mem_percent = psutil.virtual_memory().percent
        stats["cpu_usage_percent"] = cls._last_cpu_percent
        stats["memory_usage_percent"] = cls._last_mem_percent
        return stats
1021197
def info(self):
        

        return (self.start_pc, self.end_pc,
                self.handler_pc, self.get_catch_type())
989134
public ClassInfoModel getClassInfo()
    {
    	ClassInfoModel classInfo = (ClassInfoModel)this.getRecord(ClassInfoModel.CLASS_INFO_FILE);
    	if (classInfo == null)
    		classInfo = (ClassInfoModel)Record.makeRecordFromClassName(ClassInfoModel.THICK_CLASS, this);
        if (classInfo != null)
            classInfo = classInfo.readClassInfo(this, null);
    	return classInfo;
    }
455989
def class_in_progress(stack=None):
    """"""
    if stack is None:
        stack = inspect.stack()
    for frame in stack:
        statement_list = frame[4]
        if statement_list is None:
            continue
        if statement_list[0].strip().startswith('class '):
            return True
    return False
1196637
def stats(self):
        
        printDebug("Classes.....: %d" % len(self.all_classes))
        printDebug("Properties..: %d" % len(self.all_properties))
202507
def GetHashersInformation(cls):
    
    hashers_information = []
    for _, hasher_class in cls.GetHasherClasses():
      description = getattr(hasher_class, 'DESCRIPTION', '')
      hashers_information.append((hasher_class.NAME, description))

    return hashers_information
1043348
def get_state(self, **kwargs):
        ''''''
        dbdata = self.dbdata
        if 'state' not in dbdata or kwargs:
            dbdata['state'] = ModelState(self, **kwargs)
        return dbdata['state']
843222
def get_current_state():
    """"""
    sdp_state = SDPState()
    errval, errdict = _check_status(sdp_state)
    if errval == "error":
        LOG.debug(errdict['reason'])
        return dict(
            current_state="unknown",
            last_updated="unknown",
            reason=errdict['reason']
        )
    LOG.debug('Current State: %s', sdp_state.current_state)
    LOG.debug('Current State last updated: %s',
              sdp_state.current_timestamp.isoformat())
    return dict(
        current_state=sdp_state.current_state,
        last_updated=sdp_state.current_timestamp.isoformat()
    ), HTTPStatus.OK
444645
def GetOutputClasses(cls):
    
    for _, output_class in iter(cls._output_classes.items()):
      yield output_class.NAME, output_class
583383
def info(self):
        
        info = self.get_params()
        info.update({'term_type': self._name})
        return info
27213
def info(self):
        
        info = super(TensorTerm, self).info
        info.update({'terms':[term.info for term in self._terms]})
        return info
259637
def recent_state(self):
        
        expected_len = self.history_len - 1
        if len(self._current_episode) >= expected_len:
            return [k.state for k in self._current_episode[-expected_len:]]
        else:
            states = [np.zeros(self.state_shape, dtype=self.dtype)] * (expected_len - len(self._current_episode))
            states.extend([k.state for k in self._current_episode])
            return states
179262
def state(self):
        """"""
        state = self._resource.get('state', self.default_state)

        if state in State:
            return state
        else:
            return getattr(State, state)
362743
def info(verbose):
    """"""
    if _get_mongopatcher().manifest.is_initialized():
        print('Datamodel version: %s' % _get_mongopatcher().manifest.version)
        if verbose:
            print('\nUpdate history:')
            for update in reversed(_get_mongopatcher().manifest.history):
                reason = update.get('reason')
                reason = '(%s)' % reason if reason else ''
                print(' - %s: %s %s' % (update['timestamp'], update['version'],
                                        reason))
    else:
        print('Datamodel is not initialized')
1306678
def _status(self):
        """"""
        text = ""
        # Turns out that is related field in null, Django
        # doesn't even make it a property of the object
        # http://code.djangoproject.com/ticket/11920
        if hasattr(self, "reverts"):
            text += '(reverts <a href="%s">%s</a>)<br/>' % (
                self.reverts.get_absolute_url(),
                self.reverts.id
            )
        if self.reverted:
            text += '(reverted in <a href="%s">%s</a>)<br/>' % (
                self.reverted.get_absolute_url(),
                self.reverted.id
            )
        return text
446485
def _get_state(self, **kwargs):
        '''
        

        '''

        return self.describe(fields=dict(state=True), **kwargs)["state"]