Creates a new list from 'list' by first interpolating each element
    in the list using the 'env' dictionary and then calling f on the
    list, and finally calling _concat_ixes to concatenate 'prefix' and
    'suffix' onto each element of the list.
514050
def _concat(prefix, list, suffix, env, f=lambda x: x, target=None, source=None):
    
    if not list:
        return list

    l = f(SCons.PathList.PathList(list).subst_path(env, target, source))
    if l is not None:
        list = l

    return _concat_ixes(prefix, list, suffix, env)
977123
def merge_partial_elements(element_list):
    
    outs = dict()  # output data structure
    for element in element_list:
        if element['py_expr'] != "None":  # for
            name = element['py_name']
            if name not in outs:
                # Use 'expr' for Vensim models, and 'eqn' for Xmile (This makes the Vensim equation prettier.)
                eqn = element['expr'] if 'expr' in element else element['eqn']

                outs[name] = {
                    'py_name': element['py_name'],
                    'real_name': element['real_name'],
                    'doc': element['doc'],
                    'py_expr': [element['py_expr']],  # in a list
                    'unit': element['unit'],
                    'subs': [element['subs']],
                    'lims': element['lims'],
                    'eqn': eqn,
                    'kind': element['kind'],
                    'arguments': element['arguments']
                }

            else:
                outs[name]['doc'] = outs[name]['doc'] or element['doc']
                outs[name]['unit'] = outs[name]['unit'] or element['unit']
                outs[name]['lims'] = outs[name]['lims'] or element['lims']
                outs[name]['eqn'] = outs[name]['eqn'] or element['eqn']
                outs[name]['py_expr'] += [element['py_expr']]
                outs[name]['subs'] += [element['subs']]
                outs[name]['arguments'] = element['arguments']

    return list(outs.values())
1019289
def p_element_list(self, p):
        
        if len(p) == 3:
            p[0] = p[1] + [p[2]]
        else:
            p[1].extend(p[3])
            p[1].append(p[4])
            p[0] = p[1]
1289575
def create(atoms_list,N, L, cutoff = 0, all_atomtypes=[]):
    
    myAlphas, myBetas = genBasis.getBasisFunc(cutoff, N)
    # get information about feature length
    n_datapoints = len(atoms_list)
    atoms = atoms_list[0]
    x = get_lastatom_soap(atoms, cutoff, myAlphas, myBetas,N,L, all_atomtypes=all_atomtypes)
    n_features = x.shape[1]
    print("soap first", x.shape)
    print(n_datapoints, n_features)
    soapmatrix = np.zeros((n_datapoints, n_features))

    i = -1
    for atoms in atoms_list:
        i +=1
        #atoms
        print("Processing " + str(atoms.info)," Run time: " + str(time.time()-t0_total), end="\r")
        soapmatrix[i,:] = get_lastatom_soap(atoms, cutoff, myAlphas, myBetas, N, L, all_atomtypes=all_atomtypes)
    print("")

    # infos
    print("shape", soapmatrix.shape)
    return soapmatrix
45605
def _encode_list(name, value, check_keys, opts):
    """"""
    lname = gen_list_name()
    data = b"".join([_name_value_to_bson(next(lname), item,
                                         check_keys, opts)
                     for item in value])
    return b"\x04" + name + _PACK_INT(len(data) + 5) + data + b"\x00"
1319706
def insert_element_to_dict_of_list(dict_of_list, key, parser):
    
    if key in dict_of_list.keys():
        dict_of_list[key].append(parser)
    else:
        dict_of_list[key] = [parser]
1132264
def prefixes(self):
        
        pset = set()
        for n in self.nodes():
            pfx = self.prefix(n)
            if pfx is not None:
                pset.add(pfx)
        return list(pset)
928540
def p_concat_list(p):
    
    if p[1].__class__ == node.expr_list:
        p[0] = node.concat_list([p[1], p[3]])
    else:
        p[0] = p[1]
        p[0].append(p[3])
1287149
def _merge(listA, listB):
    
    listA = [x.id for x in listA]
    listB = [x.id for x in listB]
    listA.extend(listB)
    set_ = set(listA)
    return list(set_)
234148
def prepend_zeros_to_lists(ls):
    
    longest = max([len(l) for l in ls])

    for i in range(len(ls)):
        while len(ls[i]) < longest:
            ls[i].insert(0, "0")
992739
def mark_list(line: str) -> List[int]:
    
    marks = []
    for idx, car in enumerate(list(line)):
        if car != " ":
            marks.append(idx)
    return marks
1100812
protected void appendList(StringBuilder buff, String name, List list) {
    buff.append(',');
    buff.append(name);
    buff.append("=[");
    if (list != null) {
      // Take a copy of the array, to be very sure it doesn't change under us
      Object[] items = list.toArray();
      for (int i = 0; i < items.length; i++) {
        if (i != 0) buff.append(',');
        if (items[i] instanceof byte[]) {
          // Print out the bytes in hex.
          buff.append(HexUtil.toString((byte[])items[i]));
        }
        else {
          // Just use the default toString
          buff.append(items[i]);
        }
      }
    }
    buff.append(']');
  }
}
301297
def __append_list(append_to, value):
    """"""
    if value is not None:
        if isinstance(value, list):
            append_to.extend(value)
        else:
            append_to.append(value)
251177
def _build_list(option_value, item_kind):
    '''
    
    '''
    #specify profiles if provided
    if option_value is not None:

        items = []

        #if user specified none, return an empty list
        if option_value == 'none':
            return items

        #was a list already passed in?
        if not isinstance(option_value, list):
            values = option_value.split(',')
        else:
            values = option_value

        for value in values:
            # sometimes the bigip just likes a plain ol list of items
            if item_kind is None:
                items.append(value)
            # other times it's picky and likes key value pairs...
            else:
                items.append({'kind': item_kind, 'name': value})
        return items
    return None
605119
def bind(self, fn: Callable[[Any], 'List']) -> 'List':
        
        return List.concat(self.map(fn))
1210860
def create_from_targets(self,list_targs):
        
        for this_target in list_targs:
            self.node.append(this_target.get_node())
1170893
def merge_list(self, new_list):
        
        total = len(self.list)

        for ip, port in new_list:
            if (ip, port) not in self.list:
                self.mark_good((ip, port))

        if len(self.list) > total:
            self._LOG.debug("Added %d new CM addresses." % (len(self.list) - total))