Creates array of strings or ints from objects' fields
    :param input: list of objects
    :param params:
    :return: list
172554
def group_singles2array(input, **params):
    
    PARAM_FIELD_KEY = 'field.key'
    PARAM_FIELD_ARRAY = 'field.array'
    PARAM_FIELD_SINGLE = 'field.single'

    field_key = params.get(PARAM_FIELD_KEY) if PARAM_FIELD_KEY in params else None
    field_array = params.get(PARAM_FIELD_ARRAY)
    field_single = params.get(PARAM_FIELD_SINGLE)

    if not field_key:
        res = []
        for item in input:
            res.append(item[field_single])
        return {field_array: res}
    else:
        tdict = {}
        for row in input:
            if not row[field_key] in tdict:
                tdict.update({row[field_key]: [row[field_single]]})
            else:
                tdict[row[field_key]].append(row[field_single])
        res = []
        for key, value in tdict.items():
            res.append({field_key: key, field_array: value})
        return res
704130
def build_model_input(cls, name='input'):
        
        return cls(name, PortDirection.INPUT, type=PortType.MODEL)
350532
public static float[] asFloatTypeArray(List<Float> input) {
		float[] result = new float[input.size()];

		for (int i = 0; i < result.length; i++) {
			result[i] = input.get(i);
		}

		return result;
	}
510430
def _input_to_dict(i, records, remapped=None):
    
    if not remapped: remapped = {}
    var_type, records = _to_variable_type(i["type"], records)
    if var_type.startswith("Array") and "inputBinding" in i.get("type", {}):
        ib = i["type"]["inputBinding"]
    elif "inputBinding" in i:
        ib = i["inputBinding"]
    else:
        ib = {"prefix": None, "itemSeparator": ";;", "position": None}
    name = _id_to_localname(i["id"]) if "id" in i else i["name"]
    return {"name": remapped.get(name) or name,
            "variable_type": var_type,
            "prefix": ib["prefix"], "separator": ib["itemSeparator"],
            "position": ib["position"], "is_required": True,
            "default": i.get("default", None), "separate": ib.get("separate", True)}, records
1113530
def get_input(params: Union[dict, list]) -> Tuple[list, dict]:
    
    # Backwards compatibility for old clients that send params as a list
    if isinstance(params, list):
        args = params
        kwargs = {}
    elif isinstance(params, dict):
        args = params.pop('*args', [])
        kwargs = params
    else:  # pragma no coverage
        raise TypeError(
            'Unknown type {} of params, must be list or dict'.format(type(params)))

    return args, kwargs
78751
function vectorParams (options, input) {
  if (!input && typeof options === 'string') {
    options = { input: options }
  }
  options = options || {}
  let params = Object.assign({}, defaultsVectorParams, options)
  params.input = input || params.input
  return params
}
27151
@Override
    public Object map(Object input) {
        List row = (List) input;
        String[] first = row.get(0).toString().split(delimiter);
        String[] second = row.get(1).toString().split(delimiter);
        String[] stdev = columns.length > 2 ? row.get(2).toString().split(delimiter) : null;

        double dist = 0;
        for (int i = 0; i < first.length; i++) {
            double d = Double.parseDouble(first[i]) - Double.parseDouble(second[i]);
            double s = stdev != null ? Double.parseDouble(stdev[i]) : 1;
            dist += (d * d) / (s * s);
        }
        return Math.sqrt(dist);
    }
535654
function assembleInput(input) {
  if (_.isArray(input.context)) {
    return input.context;
  }
  var result = (input.prefix || '') + (input.context || '') + (input.suffix || '');
  return strip(result);
}
365419
@Override
    public Object map(Object input) {
        List<Long> list = (List<Long>) input;
        switch (mathOp) {
            case Add:
                long sum = 0;
                for (Long w : list)
                    sum += w;
                return new LongWritable(sum);
            case Subtract:
                return list.get(0) - list.get(1);
            case Multiply:
                long product = 1;
                for (Long w : list)
                    product *= w;
                return product;
            case Divide:
                return list.get(0) / list.get(1);
            case Modulus:
                return list.get(0) % list.get(1);
            case ReverseSubtract:
            case ReverseDivide:
            case ScalarMin:
            case ScalarMax:
            default:
                throw new RuntimeException("Invalid mathOp: " + mathOp); //Should never happen
        }
    }
1207483
def str_to_list(
    input_str,
    item_converter=lambda x: x,
    item_separator=',',
    list_to_collection_converter=None,
):
    
    if not isinstance(input_str, six.string_types):
        raise ValueError(input_str)
    input_str = str_quote_stripper(input_str)
    result = [
        item_converter(x.strip())
        for x in input_str.split(item_separator) if x.strip()
    ]
    if list_to_collection_converter is not None:
        return list_to_collection_converter(result)
    return result
1324428
private static List<Object> readList(StreamingInput input)
		throws IOException
	{
		input.next(Token.LIST_START);

		List<Object> result = new ArrayList<Object>();
		while(input.peek() != Token.LIST_END)
		{
			// Read the value
			Object value = readDynamic(input);
			result.add(value);
		}

		input.next(Token.LIST_END);

		return result;
	}
1024387
def _from_fields(self, fields):
        '''
        

        '''
        return _np.dtype(self.dtype()).type(next(fields))
389553
function buildInputsArray(rawInputsString) {
  let returnArray = []; // eslint-disable-line
  const rawMethodInputs = rawInputsString.split(',');

  // no inputs
  if (typeof rawMethodInputs === 'undefined' || rawMethodInputs.length === 0) {
    return [];
  }

  rawMethodInputs.forEach((rawMethodInput) => {
    const inputData = rawMethodInput.trim().split(' ');
    const type = inputData[0];
    const name = inputData[1] || '';

    // if type exists
    if (type !== '' && typeof type !== 'undefined') {
      returnArray.push({
        type,
        name,
      });
    }
  });

  return returnArray;
}
1014048
def InputSplines(seq_length, n_bases=10, name=None, **kwargs):
    
    return Input((seq_length, n_bases), name=name, **kwargs)
261567
def _dictionary_to_stringlist(input_dict):
    '''
    
    '''
    string_value = ""
    for s in input_dict:
        string_value += "{0}={1},".format(s, input_dict[s])
    string_value = string_value[:-1]
    return string_value
403456
public static long[] asLongTypeArray(List<Long> input) {
		long[] result = new long[input.size()];

		for (int i = 0; i < result.length; i++) {
			result[i] = input.get(i);
		}

		return result;
	}
489205
public static List<String> zip(String... inputs) {
        if (inputs.length == 0) {
            return Collections.emptyList();
        }
        OptionalInt min = Arrays.stream(inputs).mapToInt(str -> str == null ? 0 : str.length()).min();
        if (!min.isPresent()) {
            return Collections.emptyList();
        }
        return IntStream.range(0, min.getAsInt())
                .mapToObj(elementIndex -> Arrays.stream(inputs)
                        .map(input -> String.valueOf(input.charAt(elementIndex)))
                        .collect(joining()))
                .collect(toList());
    }