Return the list address of UW course email list
771148
def get_course_list_name(curriculum_abbr, course_number, section_id,
                         quarter, year, joint=False):
    
    prefix = "multi_" if (joint is True) else ""
    return COURSE_LIST_NAME.format(
        prefix=prefix,
        curr_abbr=_get_list_name_curr_abbr(curriculum_abbr),
        course_no=course_number,
        section_id=section_id.lower(),
        quarter=quarter.lower()[:2],
        year=str(year)[-2:]
    )
1338475
def GET(self):  # pylint: disable=arguments-differ
        
        if not self.app.welcome_page:
            raise web.seeother("/courselist")
        return self.show_page(self.app.welcome_page)
237834
def get_user_emails(headers:dict=HEADERS) -> list:
    
    url = _build_url("user", "emails")
    data = _get(url, headers=headers)
    return [Email(email=e.get("email", None), is_primary=e.get("primary", False))
                    for e in data]
1253677
def list_assignments_for_user(self, user_id, course_id):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - user_id
        """ID"""
        path["user_id"] = user_id

        # REQUIRED - PATH - course_id
        """ID"""
        path["course_id"] = course_id

        self.logger.debug("GET /api/v1/users/{user_id}/courses/{course_id}/assignments with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("GET", "/api/v1/users/{user_id}/courses/{course_id}/assignments".format(**path), data=data, params=params, no_data=True)
1023828
def get_recipients(self, ar):
        
        plone_utils = api.get_tool("plone_utils")

        def is_email(email):
            if not plone_utils.validateSingleEmailAddress(email):
                return False
            return True

        def recipient_from_contact(contact):
            if not contact:
                return None
            email = contact.getEmailAddress()
            return {
                "UID": api.get_uid(contact),
                "Username": contact.getUsername(),
                "Fullname": to_utf8(contact.Title()),
                "EmailAddress": email,
            }

        def recipient_from_email(email):
            if not is_email(email):
                return None
            return {
                "UID": "",
                "Username": "",
                "Fullname": email,
                "EmailAddress": email,
            }

        # Primary Contacts
        to = filter(None, [recipient_from_contact(ar.getContact())])
        # CC Contacts
        cc = filter(None, map(recipient_from_contact, ar.getCCContact()))
        # CC Emails
        cc_emails = map(lambda x: x.strip(), ar.getCCEmails().split(","))
        cc_emails = filter(None, map(recipient_from_email, cc_emails))

        return to + cc + cc_emails
319849
def email(self, name, to, from_addr, subject, body, header, owner=None, **kwargs):
        
        return Email(self.tcex, name, to, from_addr, subject, body, header, owner=owner, **kwargs)
1161736
def get_thread(self, email, mailinglist):
        """"""

        subject_slug = slugify(email.subject_clean)
        thread = self.THREAD_CACHE.get(subject_slug, {}).get(mailinglist.id)
        if thread is None:
            thread = Thread.all_objects.get_or_create(
                mailinglist=mailinglist,
                subject_token=subject_slug
            )[0]

            if self.THREAD_CACHE.get(subject_slug) is None:
                self.THREAD_CACHE[subject_slug] = dict()
            self.THREAD_CACHE[subject_slug][mailinglist.id] = thread

        thread.latest_message = email
        thread.update_keywords()
        thread.save()
        return thread
691899
def positions(self, key, value):
    
    email_addresses = self.get("email_addresses", [])
    current = None
    record = None

    recid_or_status = force_list(value.get('z'))
    for el in recid_or_status:
        if el.lower() == 'current':
            current = True if value.get('a') else None
        else:
            record = get_record_ref(maybe_int(el), 'institutions')

    rank = normalize_rank(value.get('r'))

    current_email_addresses = force_list(value.get('m'))
    non_current_email_addresses = force_list(value.get('o'))

    email_addresses.extend({
        'value': address,
        'current': True,
    } for address in current_email_addresses)
    email_addresses.extend({
        'value': address,
        'current': False,
    } for address in non_current_email_addresses)

    self['email_addresses'] = email_addresses

    if 'a' not in value:
        return None

    return {
        'institution': value['a'],
        'record': record,
        'curated_relation': True if record is not None else None,
        'rank': rank,
        'start_date': normalize_date(value.get('s')),
        'end_date': normalize_date(value.get('t')),
        'current': current,
    }
88915
def _list(self, foldername="INBOX", reverse=False, since=None):
        
        folder = self.folder \
            if foldername == "INBOX" \
            else self._getfolder(foldername)

        def sortcmp(d):
            try:
                return d[1].date
            except:
                return -1

        lst = folder.items() if not since else folder.items_since(since)
        sorted_lst = sorted(lst, key=sortcmp, reverse=1 if reverse else 0)
        itemlist = [(folder, key, msg) for key,msg in sorted_lst]
        return itemlist
353374
def get_email_lists
      url = ApiRequest.base_path("questionpro.survey.getEmailLists")
      result = self.class.get(url, body: self.options)

      self.full_response = result
      self.status = result['status']
      
      email_lists = []
      result_email_lists = result['response']['emailLists']
      result_email_lists.each do |email_list|
        email_lists.push(EmailList.new(email_list))
      end
      
      return email_lists
    end
531594
function(apiKey, contactList, fromAddress,
        toAddress, ccAddresses, bccAddresses, contentType, subject, htmlBody,
        textBody, _templateId) {}
690241
def _load_permissions(campus, calendarid, resp_fragment, permission_list):
    
    for record in resp_fragment:
        if not _is_valid_email(record['Email']):
            # skip the non UW users
            continue
        perm = Permission()
        perm.calendarid = calendarid
        perm.campus = campus
        perm.uwnetid = _extract_uwnetid(record['Email'])
        perm.level = record['Level']
        perm.name = str(record['Name'])
        permission_list.append(perm)
901236
function addressList() {
        return wrap('address-list', or(
            and(
                address,
                star(and(literal(','), address))
            ),
            obsAddrList
        )());
    }
954525
def get_addresses(self, fetch=False):
        """"""
        return Addresses(self.resource.addresses, self.client, populate=fetch)
676403
def GetIPAddresses(self):
    """"""
    results = []
    for address in self.addresses:
      human_readable_address = address.human_readable_address
      if human_readable_address is not None:
        results.append(human_readable_address)

    return results
39324
def contacts_getPublicList(user_id):
    """"""
    method = 'flickr.contacts.getPublicList'
    data = _doget(method, auth=False, user_id=user_id)
    if isinstance(data.rsp.contacts.contact, list):
        return [User(user.nsid, username=user.username) \
                for user in data.rsp.contacts.contact]
    else:
        user = data.rsp.contacts.contact
        return [User(user.nsid, username=user.username)]
398656
def get(self):
        
        mail = {
            'from': self._get_or_none(self.from_email),
            'subject': self._get_or_none(self.subject),
            'personalizations': [p.get() for p in self.personalizations or []],
            'content': [c.get() for c in self.contents or []],
            'attachments': [a.get() for a in self.attachments or []],
            'template_id': self._get_or_none(self.template_id),
            'sections': self._flatten_dicts(self.sections),
            'headers': self._flatten_dicts(self.headers),
            'categories': [c.get() for c in self.categories or []],
            'custom_args': self._flatten_dicts(self.custom_args),
            'send_at':  self._get_or_none(self.send_at),
            'batch_id': self._get_or_none(self.batch_id),
            'asm': self._get_or_none(self.asm),
            'ip_pool_name': self._get_or_none(self.ip_pool_name),
            'mail_settings': self._get_or_none(self.mail_settings),
            'tracking_settings': self._get_or_none(self.tracking_settings),
            'reply_to': self._get_or_none(self.reply_to),
        }

        return {key: value for key, value in mail.items()
                if value is not None and value != [] and value != {}}