Init the stats history (dict of GlancesAttribute).
6619
def init_stats_history(self):
        """"""
        if self.history_enable():
            init_list = [a['name'] for a in self.get_items_history_list()]
            logger.debug("Stats history activated for plugin {} (items: {})".format(self.plugin_name, init_list))
        return GlancesHistory()
1175818
def initialize_attributes(parent, inetwork)
      # Set the parent and interface
      write_attribute(:parent, parent)
      write_attribute(:interface, inetwork)

      # Load the interface attributes
      load_interface_attributes(inetwork)

      # Clear dirtiness, since this should only be called initially and
      # therefore shouldn't affect dirtiness
      clear_dirty!

      # But this is an existing record
      existing_record!
    end
116907
def get(self, nb=0):
        """"""
        return {i: self.stats_history[i].history_raw(nb=nb) for i in self.stats_history}
1229385
def init(self):
        """"""

        evclass_shape = [16, 40, 10]
        evtype_shape = [16, 16, 40, 10]
        evclass_psf_shape = [16, 40, 10, 100]
        evtype_psf_shape = [16, 16, 40, 10, 100]

        self._hists_eff = dict()
        self._hists = dict(evclass_on=np.zeros(evclass_shape),
                           evclass_off=np.zeros(evclass_shape),
                           evclass_alpha=np.zeros([16, 40, 1]),
                           evtype_on=np.zeros(evtype_shape),
                           evtype_off=np.zeros(evtype_shape),
                           evtype_alpha=np.zeros([16, 1, 40, 1]),
                           evclass_psf_on=np.zeros(evclass_psf_shape),
                           evclass_psf_off=np.zeros(evclass_psf_shape),
                           evtype_psf_on=np.zeros(evtype_psf_shape),
                           evtype_psf_off=np.zeros(evtype_psf_shape),
                           )
1228015
def initialize(self):
        ''''''
        if es.indices.exists(self.index_name):
            es.indices.put_mapping(index=self.index_name, doc_type=DOCTYPE, body=MAPPING)
        else:
            es.indices.create(self.index_name, {
                'mappings': {'advice': MAPPING},
                'settings': {'analysis': ANALSYS},
            })
72749
def _init_notes(self):
        """"""
        self.cached_json = {
            'ver': self.schema,
            'users': {},
            'constants': {
                'users': [x.name for x in self.subreddit.moderator()],
                'warnings': Note.warnings
            }
        }

        self.set_json('Initializing JSON via puni', True)
953938
def start(self, stats):
        """"""
        # Init stats
        self.stats = stats

        # Init plugin list
        self.plugins_list = self.stats.getPluginsList()

        # Bind the Bottle TCP address/port
        if self.args.open_web_browser:
            # Implementation of the issue #946
            # Try to open the Glances Web UI in the default Web browser if:
            # 1) --open-web-browser option is used
            # 2) Glances standalone mode is running on Windows OS
            webbrowser.open(self.bind_url,
                            new=2,
                            autoraise=1)

        self._app.run(host=self.args.bind_address,
                      port=self.args.port,
                      quiet=not self.args.debug)
274124
def initialize_attributes(attributes)
      @_attributes = attributes
      attributes.each do |key, value|
        send("#{key}=", value) if respond_to? key
      end
    end
732364
def my_archieve(self):
        """"""
        if not self._ptr:
            raise BfdException("BFD not initialized")

        return _bfd.get_bfd_attribute(self._ptr, BfdAttributes.MY_ARCHIEVE)
314849
def init_backend(self, *args, **kwargs):
        """"""
        self.model.attrs = {}

        self.use_memory_cache = kwargs.get('use_memory_cache', True)
        if self.use_memory_cache:
            self.init_memory_cache()
        self.use_disk_cache = kwargs.get('use_disk_cache', False)
        if self.use_disk_cache:
            self.init_disk_cache()
        self.load_model()
        self.model.unpicklable += ['_backend']
602014
def init_stats
      @stats = {}
      @teams.flatten.each do |t|
        @stats[t] = {:gt => {}, :ps => {}}
        all_gt.each { |gt| @stats[t][:gt][gt] = 0 }
        all_ps.each { |ps| @stats[t][:ps][ps] = 0 }
      end
    end
794645
def add_stats(self, args):
        """"""
        bg_name, stats = args
        logger.debug("Stats: %s %s", bg_name, stats)
        
        for motif_id in stats.keys():
            if motif_id not in self.stats:
                self.stats[motif_id] = {}
        
            self.stats[motif_id][bg_name] = stats[motif_id]
798369
def init(self):
        """"""
        if not self.export_enable:
            return None
        # Build the RESTful URL where the stats will be posted
        url = '{}://{}:{}{}'.format(self.protocol,
                                    self.host,
                                    self.port,
                                    self.path)
        logger.info(
            "Stats will be exported to the RESTful endpoint {}".format(url))
        return url
56980
def __initialize(self, resp):
        """"""

        raw_data = xmltodict.parse(resp.content)
        root_key = list(raw_data.keys())[0]
        self.raw_data = raw_data.get(root_key)
        self.__initializeFromRaw()
139920
def _setup_stats(self):
        '''
        
        '''
        # stats setup
        self.stats_dict = {}

        if self.settings['STATS_TOTAL']:
            self._setup_stats_total()

        if self.settings['STATS_PLUGINS']:
            self._setup_stats_plugins()
216880
def Init():
  """"""
  global INIT_RAN
  if INIT_RAN:
    return

  # Set up a temporary syslog handler so we have somewhere to log problems
  # with ConfigInit() which needs to happen before we can start our create our
  # proper logging setup.
  syslog_logger = logging.getLogger("TempLogger")
  if os.path.exists("/dev/log"):
    handler = logging.handlers.SysLogHandler(address="/dev/log")
  else:
    handler = logging.handlers.SysLogHandler()
  syslog_logger.addHandler(handler)

  try:
    config_lib.SetPlatformArchContext()
    config_lib.ParseConfigCommandLine()
  except config_lib.Error:
    syslog_logger.exception("Died during config initialization")
    raise

  metric_metadata = server_metrics.GetMetadata()
  metric_metadata.extend(communicator.GetMetricMetadata())

  stats_collector = prometheus_stats_collector.PrometheusStatsCollector(
      metric_metadata, registry=prometheus_client.REGISTRY)
  stats_collector_instance.Set(stats_collector)

  server_logging.ServerLoggingStartupInit()

  bs_registry_init.RegisterBlobStores()
  all_decoders.Register()
  all_parsers.Register()
  registry.Init()

  # Exempt config updater from this check because it is the one responsible for
  # setting the variable.
  if not config.CONFIG.ContextApplied("ConfigUpdater Context"):
    if not config.CONFIG.Get("Server.initialized"):
      raise RuntimeError("Config not initialized, run \"grr_config_updater"
                         " initialize\". If the server is already configured,"
                         " add \"Server.initialized: True\" to your config.")

  INIT_RAN = True
528862
private void initializeAttrs(AttributeSet attrs) {
    TypedArray attributes = getContext().obtainStyledAttributes(attrs, R.styleable.draggable_panel);
    this.topFragmentHeight =
        attributes.getDimensionPixelSize(R.styleable.draggable_panel_top_fragment_height,
            DEFAULT_TOP_FRAGMENT_HEIGHT);
    this.xScaleFactor =
        attributes.getFloat(R.styleable.draggable_panel_x_scale_factor, DEFAULT_SCALE_FACTOR);
    this.yScaleFactor =
        attributes.getFloat(R.styleable.draggable_panel_y_scale_factor, DEFAULT_SCALE_FACTOR);
    this.topFragmentMarginRight =
        attributes.getDimensionPixelSize(R.styleable.draggable_panel_top_fragment_margin_right,
            DEFAULT_TOP_FRAGMENT_MARGIN);
    this.topFragmentMarginBottom =
        attributes.getDimensionPixelSize(R.styleable.draggable_panel_top_fragment_margin_bottom,
            DEFAULT_TOP_FRAGMENT_MARGIN);
    this.enableHorizontalAlphaEffect =
        attributes.getBoolean(R.styleable.draggable_panel_enable_horizontal_alpha_effect,
            DEFAULT_ENABLE_HORIZONTAL_ALPHA_EFFECT);
    this.enableClickToMaximize =
        attributes.getBoolean(R.styleable.draggable_panel_enable_click_to_maximize_panel,
            DEFAULT_ENABLE_CLICK_TO_MAXIMIZE);
    this.enableClickToMinimize =
        attributes.getBoolean(R.styleable.draggable_panel_enable_click_to_minimize_panel,
            DEFAULT_ENABLE_CLICK_TO_MINIMIZE);
    this.enableTouchListener =
        attributes.getBoolean(R.styleable.draggable_panel_enable_touch_listener_panel,
            DEFAULT_ENABLE_TOUCH_LISTENER);
    attributes.recycle();
  }