----------- turn the contacts into a comma separated list of options for each contact (simple grammar)
508709
function listOptions(theContacts) {
  var s = '';
  for (var contact in theContacts) {
    if (s != '') { s = s + ", " };
    s = s + contact + " (" + theContacts[contact].nameChoices + ")";
  }
  return s;
}
826986
def get_user_contact_lists_contacts(self, id, contact_list_id, **data):
        
        
        return self.get("/users/{0}/contact_lists/{0}/contacts/".format(id,contact_list_id), data=data)
282419
def p_query_option_list(p):
    
    if len(p) == 2:
        p[0] = p[1]
    elif len(p) == 4:
        p[0] = merge_map(p[1], p[3])
    else:
        raise RuntimeError("Invalid product rules for 'query_option_list'")
860586
def comma_delimited_to_list(list_param):
    
    if isinstance(list_param, list):
        return list_param
    if isinstance(list_param, str):
        return list_param.split(',')
    else:
        return []
668364
private void createUI() {
		add(new WHeading(HeadingLevel.H2, "Contacts"));
		add(repeater);
		createButtonBar();
		createAddContactSubForm();
		createPrintContactsSubForm();
	}
679488
def p_simple_list(p):
    ''''''
    tok = p.lexer
    heredoc.gatherheredocuments(tok)

    if len(p) == 3 or len(p[1]) > 1:
        parts = p[1]
        if len(p) == 3:
            parts.append(ast.node(kind='operator', op=p[2], pos=p.lexspan(2)))
        p[0] = ast.node(kind='list', parts=parts, pos=_partsspan(parts))
    else:
        assert len(p[1]) == 1
        p[0] = p[1][0]

    if (len(p) == 2 and p.lexer._parserstate & flags.parser.CMDSUBST and
            p.lexer._current_token.nopos() == p.lexer._shell_eof_token):
        # accept the input
        p.accept()
88169
def split_options(*utils_option_names, **options)
      utils_options, pattern_options = {}, {}
      utils_option_names += %i[force noop verbose]

      options.each do |key, value|
        list = utils_option_names.include?(key) ? utils_options : pattern_options
        list[key] = value
      end

      [utils_options, pattern_options]
    end
790328
private void printEditedDetails() {
		StringBuilder buf = new StringBuilder();

		for (Object contact : repeater.getBeanList()) {
			buf.append(contact).append('\n');
		}

		console.setText(buf.toString());
	}
90278
def translate_dialog_to_lists(dialog_filename):
    

    dialog_file = open(dialog_filename, 'r')
    dialog_reader = unicodecsv.reader(dialog_file, delimiter='\t', quoting=csv.QUOTE_NONE)

    # go through the dialog
    first_turn = True
    dialog = []
    same_user_utterances = []
    #last_user = None
    dialog.append(same_user_utterances)

    for dialog_line in dialog_reader:

        if first_turn:
            last_user = dialog_line[1]
            first_turn = False

        if last_user != dialog_line[1]:
            # user has changed
            same_user_utterances = []
            dialog.append(same_user_utterances)

        same_user_utterances.append(dialog_line[3])

        last_user = dialog_line[1]

    dialog.append([dialog_end_symbol])

    return dialog
539952
def toContactEditorialParameter(self, contactType, person):
        
        contactItems = list(contactType.getContactItems(person))
        if contactType.allowMultipleContactItems:
            defaults = []
            modelObjects = []
            for contactItem in contactItems:
                defaultedParameters = contactType.getParameters(contactItem)
                if defaultedParameters is None:
                    continue
                defaults.append(self._parametersToDefaults(
                    defaultedParameters))
                modelObjects.append(contactItem)
            descriptiveIdentifier = _descriptiveIdentifier(contactType)
            return liveform.ListChangeParameter(
                contactType.uniqueIdentifier(),
                contactType.getParameters(None),
                defaults=defaults,
                modelObjects=modelObjects,
                modelObjectDescription=descriptiveIdentifier)
        (contactItem,) = contactItems
        return liveform.FormParameter(
            contactType.uniqueIdentifier(),
            liveform.LiveForm(
                lambda **k: k,
                contactType.getParameters(contactItem)))
1256165
def _parse_multi_options(options, split_token=','):
    
    """
    if options:
        return [o.strip() for o in options.split(split_token) if o.strip()]
    else:
        return options
614015
def editContactItem(self, contact, label, number):
        
        contact.label = label
        contact.number = number
366503
def format_options(self, scope, description, option_registrations_iter):
    
    oshi = HelpInfoExtracter(self._scope).get_option_scope_help_info(option_registrations_iter)
    lines = []
    def add_option(category, ohis):
      if ohis:
        lines.append('')
        display_scope = scope or 'Global'
        if category:
          lines.append(self._maybe_blue('{} {} options:'.format(display_scope, category)))
        else:
          lines.append(self._maybe_blue('{} options:'.format(display_scope)))
          if description:
            lines.append(description)
        lines.append(' ')
        for ohi in ohis:
          lines.extend(self.format_option(ohi))
    add_option('', oshi.basic)
    if self._show_recursive:
      add_option('recursive', oshi.recursive)
    if self._show_advanced:
      add_option('advanced', oshi.advanced)
    return lines
1273761
private Map<String, Conversation> makeMapFromDownloadedConversations(List<Conversation> list) {

        Map<String, Conversation> map = new HashMap<>();

        if (list != null && !list.isEmpty()) {
            for (Conversation details : list) {
                map.put(details.getId(), details);
            }
        }

        return map;
    }
1203126
function parseOptions(input, callback, keyValueDelim, groupDelim) {
    var groups = groupDelim ? input.split(groupDelim) : [input];
    for (var i in groups) {
      if (typeof groups[i] !== "string") {
        continue;
      }
      var kv = groups[i].split(keyValueDelim);
      if (kv.length !== 2) {
        continue;
      }
      var k = kv[0];
      var v = kv[1];
      callback(k, v);
    }
  }
121047
function option() {
    var ret = this.seq(
        this.stringf('['),
        this.manyf(c_wsp),
        alternation,
        this.manyf(c_wsp),
        this.stringf(']'));
    return new ast.Repetition(new ast.Repeat(0,1), ret[3]);
}
913332
def flatten(self):
        
        if self._flat is None:
            flat = {}
            for arg in self.args:
                if isinstance(arg, Option):
                    flat[arg.name] = arg

                elif isinstance(arg, ListOption):
                    flat[arg.name] = arg

                elif isinstance(arg, DictOption):
                    flat[arg.name] = arg
                    if arg.scheme:
                        for k, v in arg.scheme.flatten().items():
                            flat[arg.name + '.' + k] = v

            self._flat = flat
        return self._flat