Returns the input list with the length of `count`. If the
    list is [1] and the count is 3. [1,1,1] is returned. The list
    must be the count length or 1. Normally called from `expandParameters()`
    where `name` is the symbolic name of the input.
971922
def expandValues(inputs, count, name):
    
    if len(inputs) == count:
        expanded = inputs
    elif len(inputs) == 1:
        expanded = inputs * count
    else:
        raise ValueError('Incompatible number of values for ' + name)
    return expanded
952036
public static int len(String list, char delimiter, boolean ignoreEmpty) {
	int len = StringUtil.length(list);
	if (len == 0) return 0;

	int count = 0;
	int last = 0;

	for (int i = 0; i < len; i++) {
	    if (list.charAt(i) == delimiter) {
		if (!ignoreEmpty || last < i) count++;
		last = i + 1;
	    }
	}
	if (!ignoreEmpty || last < len) count++;
	return count;
    }
946422
def read(self, length=None):
        
        all_buffs = []
        while length is None or length > 0:
            self._fillbuff()
            if self.empty():
                break

            buff = self.buff.read(length)
            all_buffs.append(buff)
            if length:
                length -= len(buff)

        return b''.join(all_buffs)
720750
function findListLength (args, next) {
        client.llen(self._container, function listLengthFound (err, length) {
          if (err) {
            return next(err);
          }

          args.length = length;
          return next(null, length);
        });
      }
403531
def checkMultipleFiles(input):
    
    f,i,o,a=buildFileList(input)
    return len(f) > 1
1225184
def pad(a, desiredlength):
    

    if len(a) >= desiredlength:
        return a

    islist = isinstance(a, list)
    a = np.array(a)
    diff = desiredlength - len(a)
    shape = list(a.shape)
    shape[0] = diff

    padded = np.concatenate([a, np.zeros(shape, dtype=a.dtype)])
    return padded.tolist() if islist else padded
1320033
def inputs(self, name):
        
        self._closed()

        step = self._get_step(name, make_copy=False)
        return step.list_inputs()
893954
def count_expected
      count = @expected.inject(0) do |n, exp|
        case exp.first
        when :list
          # if the list is greedy, all arguments have to be absorbed
          return [n, true] unless exp[3]

          n + exp[3]
        else
          n + 1
        end
      end

      [count, false]
    end
1069039
def _get_expand_input(self, passed_settings):
        
        value = passed_settings.get("expand")

        if len(value) > 0:
            return value

        if not self._can_access_request:
            return []

        expand = self._parse_request_list_value("expand")

        if "permitted_expands" in self.context:
            permitted_expands = self.context["permitted_expands"]

            if "~all" in expand or "*" in expand:
                return permitted_expands
            else:
                return list(set(expand) & set(permitted_expands))

        return expand
294608
@SuppressWarnings("unchecked")
  public static int getLength(Object iterable) {
    Assert.state(isIterable(iterable.getClass()));
    return iterable.getClass().isArray() ? Array.getLength(iterable) : ((Collection<Object>) iterable).size();
  }
768613
function List(length) {
        if (arguments.length === 0) {
            length = 0;
        }

        // in this case we create a list with a given length
        if (arguments.length <= 1 && typeof length === 'number') {
            if (this instanceof List) {
                this.length = length;
            }
            else {
                return new List(length);
            }
        }
        else {
            //here we create a list with initial values
            if (!(this instanceof List)) {
                return List.fromArray(arrSlice(arguments));
            }
            else {
                for (var i = 0, l = arguments.length ; i < l ; i++) {
                    this[i] = arguments[i];
                }
                this.length = arguments.length;
            }
        }
    }
134115
def list_input(*args, **kwargs):
    '''
    
    '''
    list_input = wtforms.TextAreaField(*args, **kwargs)
    list_input.input_type = 'list'
    return list_input
47739
def create_inputlist(arglist):
    
    lines = []
    if isinstance(arglist, list):
        for arg in arglist:
            if os.path.splitext(arg)[1] == '.lst':
                lines += readlines(arg)
            else:
                lines.append(arg)
    elif is_null(arglist):
        pass
    else:
        if os.path.splitext(arglist)[1] == '.lst':
            lines += readlines(arglist)
        else:
            lines.append(arglist)
    return lines
1185764
def p_case_list(self, p):
        ''''''
        if len(p) == 4:
            p[1].append(p[3])
            p[0] = p[1]
        elif len(p) == 2:
            p[0] = [p[1]]
255994
def p_lconst_list(self, p):
        ''''''
        if len(p) == 4:
            p[1].append(p[3])
            p[0] = p[1]
        elif len(p) == 2:
            p[0] = [p[1]]
936190
def length(self, rows=None):
    
    rows = tf.range(self._capacity) if rows is None else rows
    return tf.gather(self._length, rows)
497045
def calculate_size(name, data_list):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += INT_SIZE_IN_BYTES
    for data_list_item in data_list:
        data_size += calculate_size_data(data_list_item)
    return data_size