Convert given options to gnuplot format.

 For "{ opt1: val1, .. , optN: valN }" it returns
   set opt1 val1
   ..
   set optN valN

 @param ptions [Hash] options to convert
 @return [String] options in Gnuplot format
322139
def options_hash_to_string(options)
      result = ''
      options.sort_by { |key, _| OPTION_ORDER.find_index(key) || -1 }.each do |key, value|
        if value
          result += "set #{OptionHandling.option_to_string(key, value)}\n"
        else
          result += "unset #{key}\n"
        end
      end
      result
    end
19511
def format_as_option(str, io)
      if Cri::Platform.color?(io)
        yellow(str)
      else
        str
      end
    end
214643
function time_format(options) {
  if (_.isString(options.time)) {
    /* Translate the string we've been given into a format */
    switch(options.time) {
    case 'days':
    case 'Days':
      return "%d/%m";
    case 'hours':
    case 'Hours':
      return "%H:%M";
    default: /* Presume we've been given a gnuplot-readable time format string */
      return options.time;
    }
  } else { /* Just default to hours */
    return "%H:%M";
  }
}
727852
function _Options($opts)
	{
		if (!is_array($opts)) return array();
		$newopts = array();
		foreach($opts as $k => $v) {
			if (is_numeric($k)) $newopts[strtoupper($v)] = $v;
			else $newopts[strtoupper($k)] = $v;
		}
		return $newopts;
	}
966548
def write_d_pt(points = nil)
      return unless ptrue?(points)

      index = -1
      points.each do |point|
        index += 1
        next unless ptrue?(point)

        write_d_pt_point(index, point)
      end
    end
1146350
def option2tuple(opt):
    """"""

    if isinstance(opt[0], int):
        tup = opt[1], opt[2:]
    else:
        tup = opt[0], opt[1:]

    return tup
681837
def to_hash
      result = {}
      @lines.entries.each do |section|
        result[section.key] ||= {}
        section.entries.each do |option|
          opts = Array(option)
          val = opts.map { |o| o.respond_to?(:value) ? o.value : o }
          val = val.size > 1 ? val : val.first
          result[section.key][opts.first.key] = val
        end
      end
      result
    end
1348865
public function bitcoincharts($options = []) {
		$options += $this->settings;
		$url = 'http://api.bitcoincharts.com/v1/markets.json';
		$res = $this->_getBitcoincharts($url);
		if (!$res) {
			return false;
		}
		$array = [];
		foreach ($res as $val) {
			$array[$val['currency']] = $val;
			unset($array[$val['currency']]['currency']);
		}

		if (empty($options['currency'])) {
			return $array;
		}
		if (empty($array[$options['currency']])) {
			return false;
		}
		return $array[$options['currency']];
	}
781425
def long_opt_symbol(args)
      long_opt = args.find { |arg| arg.start_with?('--') }
      long_opt[2..-1].sub('[no-]', '').sub(/ .*/, '')
                     .tr('-', '_').gsub(/[\[\]]/, '').to_sym
    end
1314086
def option(opts, *args)
      long_opt_symbol = long_opt_symbol(args)
      args += Array(OptionsHelp::TEXT[long_opt_symbol])
      opts.on(*args) do |arg|
        @options[long_opt_symbol] = arg
        yield arg if block_given?
      end
    end
958259
function parseOptions(opts) {
  opts = opts || {};
  var argv = [];
  var options = {};
  var process_argv = process.argv;
  for (var i = 2; i < process_argv.length; i++) {
    if (process_argv[i].indexOf('--') == 0) {
      var arg = process_argv[i];
      if (arg.indexOf("=") > 0) {
        var arg_kv = arg.split('=');
        arg = arg_kv[0];
        arg = arg.replace('--','');
        arg = replaceAll(arg, '-', '_');
        options[arg] = arg_kv[1];
        if (typeof opts[arg] == 'string') {
          if (opts[arg] == 'int' || opts[arg] == 'integer') {
            options[arg] = parseInt(options[arg]);
          } else if (opts[arg] == 'float') {
            options[arg] = parseFloat(options[arg]);
          }
        } else if (typeof opts[arg] == 'object') {
          if (opts[arg].type == 'array') {
            var sep = opts[arg].separator || opts[arg].sep || ',';
            options[arg] = options[arg].split(sep);
          }
        }
      } else {
        arg = arg.replace('--','');
        arg = replaceAll(arg, '-', '_');
        options[arg] = true;
      }
    } else {
      argv.push(process_argv[i]);
    }
  }
  options.argv = argv;
  return options;
}
824949
def expand_options(options={}, opts={}, model=nil)
      options = get_value_of options, model
      config_opts = {
        :not_expand => [],
        :not_call_symbol => []
      }.merge! opts
      if options.kind_of? Hash
        opts = {}
        options.each do |column, config|
          if not config_opts[:not_expand].include? column.to_sym
            if not config_opts[:not_call_symbol].include? config
              opts[column.to_sym] = expand_options(get_value_of(config, model), config_opts, model)
            else
              opts[column.to_sym] = expand_options(config, config_opts, model)
            end
          else
            opts[column.to_sym] = config
          end
        end
        return opts
      else
        return get_value_of options, model
      end
    end
232830
def export_values(values, options = nil)
      return if values.nil?
      values.map { |v| export_value(v, options) }
    end
1245545
def _convert_option(self):
        '''
        
        '''

        if sys.byteorder == 'little' and self._endian() == 'big-endian':
            # big->little
            order = '>'
        elif sys.byteorder == 'big' and self._endian() == 'little-endian':
            # little->big
            order = '<'
        else:
            # no conversion
            order = '='
        return order
700102
def _map(value, istart, istop, ostart, ostop):
    
    return ostart + (ostop - ostart) * ((value - istart) / (istop - istart))
999523
def parse_options(options, arg_split:':', valuesep: '=', opt_default: true, keyed_sep: "/")
			return {} unless options
			parsed_options={}
			options=options.split(arg_split) unless options.is_a?(Enumerable)
			options.each do |optvalue|
				opt,value=DR::SimpleParser.parse_namevalue(optvalue,sep: valuesep, default: opt_default)
				parsed_options.set_keyed_value(opt,value, sep: keyed_sep)
			end
			return parsed_options
		end
231488
def pluck(*cols)
      options = cols.last.is_a?(Hash) ? cols.pop : {}
      @options.merge!(options)
      @options[:symbolize_keys] = true
      self.iterate_type(options[:class]) if options[:class]
      cols    = cols.map {|c| c.to_sym }
      result  = []

      self.each() do |row|
        row = row.symbolize_keys if row.is_a?(Hash)
        result << cols.map { |c| row[c] }
      end

      result.flatten! if cols.size == 1
      result
    end