Transforms values to new params
553435
protected function _transform()
    {
        $index = 1;
        foreach ($this->_values as $value) {
            $paramName = "{$this->_name}_{$index}";
            $this->_params[$paramName] = new Param($this->_type, $value);
            $index++;
        }
    }
1140052
function params(p) {

  var result = "";
  _.each(p, function (val) {
    result = result + spliter + val;
  });

  return result;
}
1256914
def substitute_values(text, values):
    """"""
    shift, final_text, shifts = 0, text, defaultdict(int)
    for value in values:
        first = value['old_span'][0] + shift
        second = value['old_span'][1] + shift
        new_s = value['new_surface']
        final_text = final_text[0:first] + new_s + final_text[second:]
        shift += len(new_s) - len(value['old_surface'])
        for char in range(first + 1, len(final_text)):
            shifts[char] = shift

    logging.debug(u'Text after numeric conversion: "%s"', final_text)

    return final_text, shifts
900806
function update(v, i, params, {oldValue}) {
      switch (i) {
      case 'children': _unobserveChildren(oldValue); _observeChildren(v); break;
      case 'attrs':    _unobserveAttrs   (oldValue); _observeAttrs   (v); break;
      }
    }
861087
def update_get_params(self):
        """"""
        if isinstance(self._fields, (tuple, list)):  # tuples & lists > x,y,z
            self.get_params["fields"] = ",".join([str(_) for _ in self._fields])
        elif isinstance(self._fields, str):
            self.get_params["fields"] = self._fields
1371964
def to_h
      sanitized_params.each_with_object({}) do |(key, value), hash|
        hash[key] = transform(key, value)
      end
    end
664029
def replace(input, **params):
    
    PARAM_REPLACE_LIST = 'replace'
    REPLACE_FIELD = 'field'
    REPLACE_FIND_VALUE = 'value.to_find'
    REPLACE_WITH_VALUE = 'value.replace_with'

    replace_list = params.get(PARAM_REPLACE_LIST)
    for row in input:
        for replace in replace_list:
            if row[replace[REPLACE_FIELD]] == replace[REPLACE_FIND_VALUE]:
                row[replace[REPLACE_FIELD]] = replace[REPLACE_WITH_VALUE]
    return input
270116
def update_params(self, token, match):
        """"""
        for k, v in self.params.items():
            if isinstance(v, MatchGroup):
                self.params[k] = v.get_group_value(token, match)
968494
def flatten_params(self, data, base_key=None):
        
        result = {}

        if data is None:
            return result

        map_data = None
        if not isinstance(data, collections.Mapping):
            map_data = []
            for idx, val in enumerate(data):
                map_data.append([str(idx), val])
        else:
            map_data = list(data.items())

        for key, value in map_data:
            if not base_key is None:
                key = base_key + "[" + key + "]"

            if isinstance(value, basestring) or not hasattr(value, "__iter__"):
                result[key] = value
            else:
                result.update(self.flatten_params(value, key))

        return result
949169
def with_params(self, params):
        
        return self.replace(params=_merge_maps(self.params, params))
172785
def substitute(self, values: Dict[str, Any]) -> str:
        
        return self.template.substitute(values)
1021443
def reset_params(self):
        """"""
        self.__params = dict([p, None] for p in self.param_names)
        self.set_params(self.param_defaults)
833650
def param_value(param_values, slug):
    
    for val in param_values:
        if val.param.slug == slug:
            return val.value
    return None
244898
def transform
            t = nil
            if @value.is_a? Hash
                t = {}
                @value.each { |k,v|
                    t[ k ] = v[1].transform
                }
            elsif @value.is_a? Array
                t = []
                @value.each { |v|
                    t.push v.transform
                }
            else
                t = @value
            end
            YAML.transfer_method( @type_id, t )
        end
1296612
def assign_new(params, new_params)
      new_params.each_pair do |name, value|
        if value.is_a?(Hash)
          assign_new(params.get(name), value)
        else
          # assign
          params.set(name, value)
        end
      end
    end
275198
def add_params(self, p):
        """"""
        new_params = p.copy()
        for key,val in new_params.items():
            if not isinstance(val, collections.Iterable):
                new_params[key] = [new_params[key]]
            #_check_comb_param(key, val)
        self.comb_params.update(new_params)
705746
def update_params(params, updates):
    ''''''
    params = params.copy() if isinstance(params, dict) else dict()
    params.update(updates)
    return params