Return a list of people who should get emails.
329544
def timeline(self, request, drip_id, into_past, into_future):
        
        from django.shortcuts import render, get_object_or_404

        drip = get_object_or_404(Drip, id=drip_id)

        shifted_drips = []
        seen_users = set()
        for shifted_drip in drip.drip.walk(into_past=int(into_past), into_future=int(into_future)+1):
            shifted_drip.prune()
            shifted_drips.append({
                'drip': shifted_drip,
                'qs': shifted_drip.get_queryset().exclude(id__in=seen_users)
            })
            seen_users.update(shifted_drip.get_queryset().values_list('id', flat=True))

        return render(request, 'drip/timeline.html', locals())
249209
def by_email_address(cls, email):
        """"""
        return DBSession.query(cls).filter_by(email_address=email).first()
1296941
def get_user_by_email(self, email):
        
        results = self.get_users(filter='email eq "%s"' % (email))
        if results['totalResults'] == 0:
            logging.warning("Found no matches for given email.")
            return
        elif results['totalResults'] > 1:
            logging.warning("Found %s matches for email %s" %
                (results['totalResults'], email))

        return results['resources'][0]
614146
def get(self, client_id=None, email_address=None):
        """"""
        params = {"email": email_address or self.email_address}
        response = self._get("/clients/%s/people.json" %
                             (client_id or self.client_id), params=params)
        return json_to_py(response)
1358109
def smart_email_list(self, status="all", client_id=None):
        """"""
        if client_id is None:
            response = self._get(
                "/transactional/smartEmail?status=%s" % status)
        else:
            response = self._get(
                "/transactional/smartEmail?status=%s&clientID=%s" % (status, client_id))
        return json_to_py(response)
1220681
def users_list(self, *args):
        """"""
        if len(self._users) == 0:
            self.log('No users connected')
        else:
            self.log(self._users, pretty=True)
60740
def fetch_friend_ids(self, user):
        
        friends = self.fetch_friends(user)

        return [friend['ns1_email']['address']
                for friend in friends
                if 'ns1_email' in friend]
552086
def people_findByEmail(email):
    """"""
    method = 'flickr.people.findByEmail'
    data = _doget(method, find_email=email)
    user = User(data.rsp.user.id, username=data.rsp.user.username.text)
    return user
476880
def get_sample_contacts_formatted_emails(self, sample):
        
        contacts = list(set([sample.getContact()] + sample.getCCContact()))
        return map(self.get_contact_formatted_email, contacts)
1344912
def emails_parse(emails_dict):
    
    result = emails_dict['ListVerifiedEmailAddressesResponse'][
        'ListVerifiedEmailAddressesResult']
    emails = [email for email in result['VerifiedEmailAddresses']]

    return sorted(emails)
1189621
def obtain_users(check = nil)
      admin = Admin.select(user_select_fields)
      admin = admin.where( 'id = :p OR email = :p2 OR username = :p3', { p: check.to_i, p2: check.to_s, p3: check.to_s} ).first if !check.blank?
      admin
    end
282218
def list_users(self, instance, limit=None, marker=None):
        """"""
        return instance.list_users(limit=limit, marker=marker)
761765
def users_lookupByEmail(self, *, email: str, **kwargs) -> SlackResponse:
        
        kwargs.update({"email": email})
        return self.api_call("users.lookupByEmail", http_verb="GET", params=kwargs)
629216
def CorrectWrongEmails(self, askInput=True):
        ''''''
        for email in self.wrong_emails:
            corrected_email = self.CorrectEmail(email)
            self.emails[self.emails.index(email)] = corrected_email

        self.wrong_emails = []
196554
def get(self):
        
        email = {}
        if self.name is not None:
            email["name"] = self.name

        if self.email is not None:
            email["email"] = self.email
        return email
404199
def get_users(self):
        """"""
        no_users = Token.query.filter_by(
            client_id=self.client_id,
            is_personal=False,
            is_internal=False
        ).count()
        return no_users
316157
def lists_for_email(self, email_address):
        """"""
        params = {"email": email_address}
        response = self._get(self.uri_for("listsforemail"), params=params)
        return json_to_py(response)