Gets a variable from the spark core
965167
function(command, callback) {
		command = 'curl https://api.spark.io/v1/devices/' + this.config.deviceId + '/' + command + '?access_token=' + this.config.token;
		this.debug('Running command: ', command);
		child = exec(command,
			function (error, stdout, stderr) {
			this.debug('stdout: ' + stdout);
			this.debug('stderr: ' + stderr);
			if (error !== null) {
				this.debug('exec error: ' + error);
			}
			if (callback) {
				try {
					callback(JSON.parse(stdout));
				}
				catch (err) {
					callback(undefined);
				}
			}
		}.bind(this));
	}
48202
function getVariablesList() {
  const type = NodeType.VariablesListType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = [getVariable()];
  const end = getLastPosition(content, line, column, 3);

  // Skip `...`.
  pos += 3;

  return newNode(type, content, line, column, end);
}
1105021
public String getVariableNameForTaskInstance(Long taskInstId, String name) throws SQLException {
        String query = "select v.VARIABLE_NAME " +
            "from VARIABLE v, VARIABLE_MAPPING vm, TASK t, TASK_INSTANCE ti " +
            "where ti.TASK_INSTANCE_ID = ?" +
            "    and ti.TASK_ID = t.TASK_ID" +
            "    and vm.MAPPING_OWNER = 'TASK'" +
            "    and vm.MAPPING_OWNER_ID = t.TASK_ID" +
            "    and v.VARIABLE_ID = vm.VARIABLE_ID" +
            "    and (v.VARIABLE_NAME = ? or vm.VAR_REFERRED_AS = ?)";
        Object[] args = new Object[3];
        args[0] = taskInstId;
        args[1] = name;
        args[2] = name;
        ResultSet rs = db.runSelect(query, args);
        if (rs.next()) {
            /*if (rs.isLast())*/ return rs.getString(1);
            //else throw new SQLException("getVariableNameForTaskInstance returns non-unique result");
        } else throw new SQLException("getVariableNameForTaskInstance returns no result");
    }
169327
public Object getVariable(Object key) {
		Object object = null;

		for (int i = working.size() - 1; i >= 0; --i) {
			Map<Object, Object> map = working.get(i);
			object = map.get(key);
			if (object != null)
				break;
		}
		if (object == null)
			object = global.get(key);

		return object;
	}
656853
def _get_value(self, variable):
        """"""
        return swiglpk.glp_mip_col_val(
            self._problem._p, self._problem._variables[variable])
1200986
private CustomVariable getCustomVariable(String parameter, int index){        
        CustomVariableList cvl = (CustomVariableList)parameters.get(parameter);
        if (cvl == null){
            return null;
        }
        
        return cvl.get(index);
    }
878559
function getVariable (name, leafNode) {
  let node = leafNode

  while (node != null) {
    const variables = node.variables
    const variable = variables && variables.find(v => v.id.name === name)

    if (variable != null) {
      return variable
    }

    node = node.parent
  }

  return null
}
1279613
private String getVariable(GDLParser.HeaderContext header) {
    if (header != null && header.Identifier() != null) {
      return header.Identifier().getText();
    }
    return null;
  }
35458
@Override
	public RandomVariable getProcessValue(int timeIndex, int componentIndex) {
		// Thread safe lazy initialization
		synchronized(this) {
			if (discreteProcess == null || discreteProcess.length == 0) {
				doPrecalculateProcess();
			}
		}

		if(discreteProcess[timeIndex][componentIndex] == null) {
			throw new NullPointerException("Generation of process component " + componentIndex + " at time index " + timeIndex + " failed. Likely due to out of memory");
		}

		// Return value of process
		return discreteProcess[timeIndex][componentIndex];
	}
44402
def read(variable):
    
    if variable not in variablesEnum:
        raise ValueError('Use a lifepo4wered enum element as read parameter.')
    
    if canRead(variable):
        return lifepo4weredSO.read_lifepo4wered(variable.value)
    else:
        raise RuntimeError('You cannot read {0} value, just write it'.format(variable.name))
18403
def toarray(self):
        
        if self.mode == 'spark':
            return self.values.unchunk().toarray()

        if self.mode == 'local':
            return self.values.unchunk()
1225116
def getvariable(name):
    """"""
    import inspect
    fr = inspect.currentframe()
    try:
        while fr:
            fr = fr.f_back
            vars = fr.f_locals
            if name in vars:
                return vars[name]
    except:
        pass
    return None
554320
def get_config_variable(self, config_id, offset):
        """"""

        config = self._config_variables.get(config_id)
        if config is None:
            return [b""]

        return [bytes(config.current_value[offset:offset + 20])]
1361544
def get_variables(context, **kw):
    
    # allow portal_type override
    portal_type = get_type_id(context, **kw)

    # The variables map hold the values that might get into the constructed id
    variables = {
        "context": context,
        "id": api.get_id(context),
        "portal_type": portal_type,
        "year": get_current_year(),
        "parent": api.get_parent(context),
        "seq": 0,
        "alpha": Alphanumber(0),
    }

    # Augment the variables map depending on the portal type
    if portal_type in AR_TYPES:
        now = DateTime()
        sampling_date = context.getSamplingDate()
        sampling_date = sampling_date and DT2dt(sampling_date) or DT2dt(now)
        date_sampled = context.getDateSampled()
        date_sampled = date_sampled and DT2dt(date_sampled) or DT2dt(now)
        test_count = 1

        variables.update({
            "clientId": context.getClientID(),
            "dateSampled": date_sampled,
            "samplingDate": sampling_date,
            "sampleType": context.getSampleType().getPrefix(),
            "test_count": test_count
        })

        # Partition
        if portal_type == "AnalysisRequestPartition":
            parent_ar = context.getParentAnalysisRequest()
            parent_ar_id = api.get_id(parent_ar)
            parent_base_id = strip_suffix(parent_ar_id)
            partition_count = get_partition_count(context)
            variables.update({
                "parent_analysisrequest": parent_ar,
                "parent_ar_id": parent_ar_id,
                "parent_base_id": parent_base_id,
                "partition_count": partition_count,
            })

        # Retest
        elif portal_type == "AnalysisRequestRetest":
            # Note: we use "parent" instead of "invalidated" for simplicity
            parent_ar = context.getInvalidated()
            parent_ar_id = api.get_id(parent_ar)
            parent_base_id = strip_suffix(parent_ar_id)
            # keep the full ID if the retracted AR is a partition
            if context.isPartition():
                parent_base_id = parent_ar_id
            retest_count = get_retest_count(context)
            test_count = test_count + retest_count
            variables.update({
                "parent_analysisrequest": parent_ar,
                "parent_ar_id": parent_ar_id,
                "parent_base_id": parent_base_id,
                "retest_count": retest_count,
                "test_count": test_count,
            })

        # Secondary
        elif portal_type == "AnalysisRequestSecondary":
            primary_ar = context.getPrimaryAnalysisRequest()
            primary_ar_id = api.get_id(primary_ar)
            parent_base_id = strip_suffix(primary_ar_id)
            secondary_count = get_secondary_count(context)
            variables.update({
                "parent_analysisrequest": primary_ar,
                "parent_ar_id": primary_ar_id,
                "parent_base_id": parent_base_id,
                "secondary_count": secondary_count,
            })

    elif portal_type == "ARReport":
        variables.update({
            "clientId": context.aq_parent.getClientID(),
        })

    return variables
738595
private String getProperty(String variable, EvaluationContext context, boolean ignoreWarnings, boolean useEnvironment) throws ConfigEvaluatorException {
        return stringUtils.convertToString(getPropertyObject(variable, context, ignoreWarnings, useEnvironment));
    }
229456
def get(self, sid):
        
        return VariableContext(
            self._version,
            service_sid=self._solution['service_sid'],
            environment_sid=self._solution['environment_sid'],
            sid=sid,
        )
614785
function get(key) {

    let val = process.env[key];

    return val in types ? types[val] : util.isNumeric(val) ? parseFloat(val) : val;

}