Initialize a new `Analytics` instance.
968219
function Analytics() {
  this._options({});
  this.Integrations = {};
  this._integrations = {};
  this._readied = false;
  this._timeout = 300;
  // XXX: BACKWARDS COMPATIBILITY
  this._user = user;
  this.log = debug('analytics.js');
  bindAll(this);

  var self = this;
  this.on('initialize', function(settings, options) {
    if (options.initialPageview) self.page();
    self._parseQuery(window.location.search);
  });
}
278241
def _initialize(self):
        """"""
        self.y_transform = self.y - numpy.mean(self.y)
        self.y_transform /= numpy.std(self.y_transform)
        self.x_transforms = [numpy.zeros(len(self.y)) for _xi in self.x]
        self._compute_sorted_indices()
1132495
def initialize(self, training_info, model, environment, device):
        
        self.target_model = self.model_factory.instantiate(action_space=environment.action_space).to(device)
        self.target_model.load_state_dict(model.state_dict())
        self.target_model.eval()
93059
def init_report(self, reporter=None):
        """"""
        self.options.report = (reporter or self.options.reporter)(self.options)
        return self.options.report
661151
def __init(self):
        """"""
        res = self._get(url=self._url,
                           param_dict={"f": "json"},
                           securityHandler=self._securityHandler,
                           proxy_url=self._proxy_url,
                           proxy_port=self._proxy_port)
        self._json_dict = res
        self._json_string = json.dumps(self._json_dict)
        for k,v in self._json_dict.items():
            setattr(self, k, v)
1360526
function Analytics() {
  this._options({});
  this.Integrations = {};
  this._integrations = {};
  this._readied = false;
  this._timeout = 300;
  // XXX: BACKWARDS COMPATIBILITY
  this._user = user;
  this.log = debug('analytics.js');
  bind.all(this);

  var self = this;
  this.on('initialize', function(settings, options){
    if (options.initialPageview) self.page();
    self._parseQuery();
  });
}
434952
def _mesos_init(self, instance, master_address, requests_config, tags):
        
        running_apps = {}

        metrics_json = self._rest_request_to_json(
            master_address, MESOS_MASTER_APP_PATH, MESOS_SERVICE_CHECK, requests_config, tags
        )

        if metrics_json.get('frameworks'):
            for app_json in metrics_json.get('frameworks'):
                app_id = app_json.get('id')
                tracking_url = app_json.get('webui_url')
                app_name = app_json.get('name')

                if app_id and tracking_url and app_name:
                    spark_ports = instance.get('spark_ui_ports')
                    if spark_ports is None:
                        # No filtering by port, just return all the frameworks
                        running_apps[app_id] = (app_name, tracking_url)
                    else:
                        # Only return the frameworks running on the correct port
                        tracking_url_port = urlparse(tracking_url).port
                        if tracking_url_port in spark_ports:
                            running_apps[app_id] = (app_name, tracking_url)

        # Report success after gathering all metrics from ResourceManager
        self.service_check(
            MESOS_SERVICE_CHECK,
            AgentCheck.OK,
            tags=['url:%s' % master_address] + tags,
            message='Connection to ResourceManager "%s" was successful' % master_address,
        )

        return running_apps
912645
def init(*args, **kwargs):
    """"""
    # set up cellpy logger
    default_log_level = kwargs.pop("default_log_level", None)
    import cellpy.log as log
    log.setup_logging(custom_log_dir=prms.Paths["filelogdir"],
                      default_level=default_log_level)
    b = Batch(*args, **kwargs)
    return b
510470
def _init_associations(fin_anno, taxid=None, taxids=None):
        """"""
        return InitAssc(taxid, taxids).init_associations(fin_anno, taxids)
584761
def _initialize(self, chain, length):
        """"""
        # If this db was loaded from the disk, it may not have its
        # tallied step methods' getfuncs yet.
        if self._getfunc is None:
            self._getfunc = self.db.model._funs_to_tally[self.name]
692874
function initVadRAnalytics(params){

    timeManager.init();
    dataCollector.init();
    dataManager.init();
    deviceData.init();
    user.init();

    initState = true;

    // set initial params if provided
    _setParams(params);

}
1316967
def new(self, name, *args, **kwargs):
        '''
        '''
        if name in self._instance_map:
            raise ValueError('Instance {0} is already initialized'
                             .format(name))

        instance = self._class_map[name](*args, **kwargs)
        self._instance_map[name] = instance
        return instance
360768
def create_analysis(name, kernel, src_dir, scaffold_name):
    """"""

    # analysis folder
    folder = os.path.join(os.getcwd(), 'analyses', name)
    if not os.path.exists(folder):
        os.makedirs(folder)
    else:
        log.warning('Analysis folder {} already exists.'.format(folder))

    # copy all other files
    for f in os.listdir(src_dir):
        if f in ('__pycache__',) or \
           any(f.endswith(ending) for ending in ('.pyc',)):
            continue
        copy_scaffold_file(os.path.join(src_dir, f),
                           os.path.join(folder, f),
                           name, scaffold_name)
78600
private function configure()
    {
        $analyticsConfig = $this->googleServicesCore->getConfig('analytics');
        
        if (array_key_exists('viewId', $analyticsConfig)) {
            $this->viewId = $analyticsConfig['viewId'];
        }
    }
1203461
def send(self):
        """"""
        import requests

        if not self._is_enabled():
            return

        self.collect()

        logger.debug("Sending analytics: {}".format(self.info))

        try:
            requests.post(self.URL, json=self.info, timeout=self.TIMEOUT_POST)
        except requests.exceptions.RequestException as exc:
            logger.debug("Failed to send analytics: {}".format(str(exc)))
600802
def new(cls, settings, *args, **kwargs):
        
        logger.debug('Initializing new "%s" Instance object' % settings['CLOUD'])
        cloud = settings['CLOUD']
        if cloud == 'bare':
            self = BareInstance(settings=settings, *args, **kwargs)
        elif cloud == 'aws':
            self = AWSInstance(settings=settings, *args, **kwargs)
        elif cloud == 'gcp':
            self = GCPInstance(settings=settings, *args, **kwargs)
        else:
            raise DSBException('Cloud "%s" not supported' % cloud)
        return self
374516
def _build(credentials, api_version, http_client=None):
    """"""
    if not http_client:
        http_client = httplib2.Http()

    authorised_client = credentials.authorize(http_client)

    return build("analytics", api_version, http=authorised_client)