This is always run when data is loaded.
493257
def df_to_dat(net, df, define_cat_colors=False):
  '''
  
  '''
  from . import categories

  # check if df has unique values
  df['mat'] = make_unique_labels.main(net, df['mat'])

  net.dat['mat'] = df['mat'].values
  net.dat['nodes']['row'] = df['mat'].index.tolist()
  net.dat['nodes']['col'] = df['mat'].columns.tolist()

  for inst_rc in ['row', 'col']:

    if type(net.dat['nodes'][inst_rc][0]) is tuple:
      # get the number of categories from the length of the tuple
      # subtract 1 because the name is the first element of the tuple
      num_cat = len(net.dat['nodes'][inst_rc][0]) - 1

      net.dat['node_info'][inst_rc]['full_names'] = net.dat['nodes']\
          [inst_rc]

      for inst_rcat in range(num_cat):
        net.dat['node_info'][inst_rc]['cat-' + str(inst_rcat)] = \
          [i[inst_rcat + 1] for i in net.dat['nodes'][inst_rc]]

      net.dat['nodes'][inst_rc] = [i[0] for i in net.dat['nodes'][inst_rc]]

  if 'mat_up' in df:
    net.dat['mat_up'] = df['mat_up'].values
    net.dat['mat_dn'] = df['mat_dn'].values

  if 'mat_orig' in df:
    net.dat['mat_orig'] = df['mat_orig'].values

  categories.dict_cat(net, define_cat_colors=define_cat_colors)
840046
def run(self):
        """"""
        if self.uploader is None:  # pragma: no cover
            raise NotImplementedError

        records = self.fetch_records()
        uploader = self.uploader(self)
        LiveSyncPlugin.logger.info('Uploading %d records', len(records))
        uploader.run(records)
        self.update_last_run()
1068056
def p_always(self, p):
        ''
        p[0] = Always(p[2], p[3], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
876663
def set_data(self, data):
        """"""
        for key, val in data.items():
            setattr(self, key, val)
        self.uptime['reloaded'] = datetime.now()
1365015
function onFetchOnly(node) {
        var i, loadedNode, resourceName;

        //Mark this script as loaded.
        node.setAttribute('data-orderloaded', 'loaded');

        //Cycle through waiting scripts. If the matching node for them
        //is loaded, and is in the right order, add it to the DOM
        //to execute the script.
        for (i = 0; (resourceName = scriptWaiting[i]); i++) {
            loadedNode = scriptNodes[resourceName];
            if (loadedNode &&
                loadedNode.getAttribute('data-orderloaded') === 'loaded') {
                delete scriptNodes[resourceName];
                require.addScriptToDom(loadedNode);
            } else {
                break;
            }
        }

        //If just loaded some items, remove them from waiting.
        if (i > 0) {
            scriptWaiting.splice(0, i);
        }
    }
842969
function setLoading(value) {
    if (ctrl.loading !== value) {
      ctrl.loading = value;
    }

    // Always refresh the hidden variable as something else might have changed
    ctrl.hidden = shouldHide();
  }
1016206
def reload(self):
        
        realData = self.load()
        self.clear()
        self.update(realData)
272542
def save(self):
        """"""
        if ( self._new or
            (self._validID() and self._changed) or
            (self._updated and self._changed > self._updated) ):
            # Don't save if we have not loaded existing data!
            self._saveDB()
            return True
        return False
902140
public boolean isLoadedDataSuccessfullyRecently() {
        final Integer timeSinceLastError = getSecondsSinceLastFailedLoad();
        final Integer timeSinceLastSuccess = getSecondsSinceLastLoad();
        if (timeSinceLastSuccess == null) {
            return false; // never loaded data, so must be FAIL
        }
        if (timeSinceLastError == null) {
            return true; // no errors ever, so must be OKAY
        }
        return lastLoadWasSuccessful;
    }
1137874
function onFetching(model, columns, options) {
        if (options.forUpdate && options.transacting) {
            options.query.forUpdate();
        }
    }
467440
@Override
	public void showLoading() {
		executeOnUIThread(new Runnable() {

			@Override
			public void run() {
				if (loading == null) {
					loading = getActivityIf().getDefaultLoading();
				}
				loading.show(getActivityIf());
			}
		});
	}
275580
private function load()
    {

        $this->initialize();
        $this->dataConnector->loadResourceLinkShareKey($this);
        if (!is_null($this->id)) {
            $this->length = strlen($this->id);
        }
        if (!is_null($this->expires)) {
            $this->life = ($this->expires - time()) / 60 / 60;
        }

    }
1121379
public function run()
    {
        if (!(bool)$this->ready) {
            $this->init();
        }

        $this->configureCustomPostType();
        $this->addAppRoutes();
        $this->improveSecurity();

        $this->displayRuntimeHeader();
        $this->loadMiddleware();
    }
905506
private synchronized void loadExistingData() {
        for (ChildData childData : _pathCache.getCurrentData()) {
            addNode(childData.getPath(), parseChildData(childData));
        }
    }
44965
function() {
            logging.log("Run application", this.name);

            var hr = require("hr/hr");
            hr.Cache.init();
            hr.app = this;

            this.update();
            return this;
        }
1328426
function onData(chunk) {  // {{{2
  if (this._ws && this._ws.isConnected()) {
    this._ws.tx({
      type: 'chunk',
      lid: this._lid,
      data: chunk,
    });
    return;
  }

  close(this);
  return;
}
187580
def on_load(name, options = {}, &block)
      @loaded[name].each do |base|
        execute_hook(name, base, options, block)
      end

      @load_hooks[name] << [block, options]
    end