Populate all address related env variables

@params {object} data - allowed level is hash of hash, with non-blank "env_var" key and "value" key
965095
function (data, purpose) {
    const oThis = this;

    for (var obj in data) {
      var lData = data[obj];
      if (typeof lData.env_var !== 'undefined' && lData.env_var.length > 0) {
        var line = "export " + lData.env_var + "='" + lData.value + "'";
        if (purpose == 'deployment' && lData.env_var == 'OST_UTILITY_GAS_PRICE') {
          line = "export " + lData.env_var + "='" + '0x0' + "'";
        }
        fileManager.append(setupConfig.env_vars_file, line);
      }
    }
  }
87172
function(address, writeData) {
		var writeInfo = {
			'isValid': false,
			'message': 'Unknown Reason',

			// Data to be written
			'address': undefined,
			'type': undefined,
			'numValues': undefined,
			'aValues': undefined,
			'errorAddress': undefined,
		};

		var info = self.constants.getAddressInfo(address, 'W');
		var isDirectionValid = info.directionValid == 1;
		var isBufferRegister = false;
		if(info.data) {
			if(info.data.isBuffer) {
				isBufferRegister = true;
			}
		}

		if (isDirectionValid && isBufferRegister) {
			writeInfo.isValid = true;

			// Save info
			writeInfo.address = info.address;
			writeInfo.type = info.type;

			var errorVal = new ref.alloc('int',1);
			errorVal.fill(0);
			
			writeInfo.errorAddress = errorVal;

			// Variable declarations:
			var aValues, offset, i;

			// Check to see if the input-data is of the type "buffer"
			if(Buffer.isBuffer(writeData)) {
				writeInfo.isValid = false;
				writeInfo.message = 'Buffer type is not supported';
			} else if(Array.isArray(writeData)) {
				writeInfo.numValues = writeData.length;
				aValues = new Buffer(writeData.length * ARCH_DOUBLE_NUM_BYTES);
				aValues.fill(0);
				offset = 0;
				for(i = 0; i < writeData.length; i++) {
					aValues.writeDoubleLE(writeData[i], offset);
					offset += ARCH_DOUBLE_NUM_BYTES;
				}
				writeInfo.aValues = aValues;
			} else if((typeof(writeData) === 'string') || (writeData instanceof String)) {
				writeInfo.numValues = writeData.length;
				aValues = new Buffer(writeData.length * ARCH_DOUBLE_NUM_BYTES);
				aValues.fill(0);
				offset = 0;
				for(i = 0; i < writeData.length; i++) {
					aValues.writeDoubleLE(writeData.charCodeAt(i), offset);
					offset += ARCH_DOUBLE_NUM_BYTES;
				}
				writeInfo.aValues = aValues;
			} else {
				// Un-supported type
				writeInfo.isValid = false;
				writeInfo.message = 'Invalid data type being written: ' + typeof(writeData) + '.';
			}
			writeInfo.numValues = writeData.length;
		} else {
			writeInfo.isValid = false;
			if (info.type == -1) {
				writeInfo.message = 'Invalid Address';
			} else if (info.directionValid === 0) {
				writeInfo.message = 'Invalid Read Attempt';
			} else if (!isBufferRegister) {
				writeInfo.message = 'Tried to read an array from a register that is not a buffer';
			}
		}
		return writeInfo;
	}
801132
function (purpose) {
    const oThis = this;

    for (var chain in setupConfig.chains) {
      // Add comment to ENV
      fileManager.append(setupConfig.env_vars_file, "\n# "+chain+" chain");
      // Add content
      oThis._scanAndPopulateEnvVars(setupConfig.chains[chain],purpose);
    }
  }
490421
protected function dumpRecursive ($levelKey, & $data, & $rawData) {
		if (is_object($data) || is_array($data)) {
			if (strlen($levelKey) > 0) $levelKey .= '.';
			foreach ((array) $data as $key => & $value) {
				$this->dumpRecursive($levelKey . $key, $value, $rawData);
			}
		} else {
			$rawData[] = $levelKey . ' = ' . $this->dumpScalarValue($data);
		}
	}
1275246
function gatherPopulateParams (populate, pointers, model, deepPath) {
  var modelName = model.modelName;
  var paths = model.schema.paths;
  var path = '';
  var options;
  var params;
  var ref;
  var deep = false;
  
  while (deepPath.length) {
    path += (path ? '.' : '')+deepPath.shift();
    options = paths[path] && (
      paths[path].caster && paths[path].caster.options
      || paths[path].options
    );
    if (!options) {
      continue;
    }

    params = pointers[path] || (pointers[path] = {});
    ref = options.ref || options.type[0] && options.type[0].ref;
    if (!ref) {
      if (selectPointers(params)) {
        deep = true;
      }
      continue;
    }

    if (!params.path) {
      params.path = path;
      params.model = ref;
      params.populate = [];
      params.pointers = {};
      populate.push(params);
    }
    if (gatherPopulateParams(
      params.populate,
      params.pointers,
      model.model(ref),
      deepPath
    )) {
      deep = true;
    }
    if (selectPointers(params)) {
      deep = true;
    }
  }

  return deep;
}
1159801
def populate(raw)
      @config = Map(raw)
      @creds  = Map(raw.select { |k, _v| %i[endpoint token].include?(k) })
      @proxy  = Map(raw.select { |k, _v| %i[proxy port].include?(k) })
      @all    = Map(raw.select do |k, _v|
        %i[proxy port endpoint token].include?(k)
      end)
    end
223701
function applyEnv(env, secrets = {}, required = {}) {
  if (Array.isArray(env)) {
    env.forEach(key => {
      // if the key already exists don't overwrite it
      if (!process.env[key]) {
        const value = getValue(key, {}, secrets, required)
        process.env[key] = value
      }
    })
  } else {
    Object.entries(env).forEach(([key, value]) => {
      // if the key already exists don't overwrite it
      if (!process.env[key]) {
        const value = getValue(key, env, secrets, required)
        process.env[key] = value
      }
    })
  }
}
1187171
function Environment() {

    var environment = {};

    var names = [];
    var values = [];

    var t = {};

    t.getNames = getNames;
    t.getValues = getValues;
    t.add = add;
    t.clear = clear;

    return t;

    function getNames() {

        return names;

    }

    function getValues() {

        return values;

    }

    function add(value) {

        // Separates environment into two arrays: names and values to the following initialization of Function object.
        if (value) {

            lodash.assign(environment, value);

            names = lodash.keys(environment);
			// TODO ES-2017 - > values = Object.values(environment);
			values = lodash.keys(environment).map(function(k) { return environment[k]});

        }

    }

    function clear() {

        environment = {};

        names = [];
        values = [];

    }

}
647172
def load(data)
      data.each do |key, value|
        check_key!(key)
        set(key, value)
      end
    end
1111614
def bind_env(self, *input_):
        
        if len(input_) == 0:
            return "bind_env missing key to bind to"

        key = input_[0].lower()

        if len(input_) == 1:
            env_key = self._merge_with_env_prefix(key)
        else:
            env_key = input_[1]

        self._env[key] = env_key

        if self._key_delimiter in key:
            parts = input_[0].split(self._key_delimiter)
            env_info = {
                "path": parts[1:-1],
                "final_key": parts[-1],
                "env_key": env_key
            }

            if self._env.get(parts[0]) is None:
                self._env[parts[0]] = [env_info]
            else:
                self._env[parts[0]].append(env_info)

        return None
1169743
def env
      vars = {}
      @stack.variables.each { |k, v| vars["TF_VAR_#{k}"] = v }
      SECRETS.each do |_provider, secrets|
        if secrets.is_a?(Hash)
          secrets.each do |k, v|
            vars[k.to_s] = v
          end
        end
      end
      vars
    end
199438
def set_env_var(key: str, value: str):
        
        elib_run.run(f'appveyor SetVariable -Name {key} -Value {value}')
        AV.info('Env', f'set "{key}" -> "{value}"')
4329
function initVar (key, envKey, def) {
        var negate = !def;
        switch (true) {
            case cacheObj.hasOwnProperty(key):
                return cacheObj[key];
            case process.env.hasOwnProperty(envGlobalCacheKey):
                return process.env[envGlobalCacheKey] !== '';
            case process.env.hasOwnProperty(envKey):
                return negate ? process.env[envKey] === 'YES' : process.env[envKey] !== 'NO';
            default:
                return def;
        }
    }
363630
function () {
    const oThis = this;

    // Add comment to ENV
    fileManager.append(setupConfig.env_vars_file, "\n# Contracts");

    for (var address in setupConfig.contracts) {
      oThis._scanAndPopulateEnvVars(setupConfig.contracts[address]);
    }
  }
880857
def populate(self, priority, address, rtr, data):
        
        assert isinstance(data, bytes)
        self.needs_no_rtr(rtr)
        self.needs_data(data, 6)
        self.set_attributes(priority, address, rtr)
        self.rain = (((data[0] << 8)| data[1]) / 32 ) * 0.1
        self.light = (((data[2] << 8) | data[3]) / 32 )
        self.wind = (((data[4] << 8) | data[5]) / 32 ) * 0.1
375007
function addData(element, key, value) {
        if (value === undefined) {
            return element && element.h5s && element.h5s.data && element.h5s.data[key];
        }
        else {
            element.h5s = element.h5s || {};
            element.h5s.data = element.h5s.data || {};
            element.h5s.data[key] = value;
        }
    }
566057
def level=(new_val)
      return nil if @level == new_val
      raise JSS::InvalidDataError, "New value must be one of '#{LEVELS.join("' '")}'" unless LEVELS.include? new_val
      @level = new_val
      @need_to_update = true
    end