Returns a string with summary info for a user.
13794
def GetUserSummary(username):
  """"""
  grr_api = maintenance_utils.InitGRRRootAPI()
  try:
    return _Summarize(grr_api.GrrUser(username).Get().data)
  except api_errors.ResourceNotFoundError:
    raise UserNotFoundError(username)
166768
def userinfo_json(request, user_id):
    
    data = {'first_name': '',
            'last_name': '',
            'email': '',
            'slug': '',
            'bio': '',
            'phone': '',
            'is_active': False}

    try:
        member = StaffMember.objects.get(pk=user_id)
        for key in data.keys():
            if hasattr(member, key):
                data[key] = getattr(member, key, '')

    except StaffMember.DoesNotExist:
        pass

    return HttpResponse(json.dumps(data),
                        mimetype='application/json')
935397
public String summarize()
    {
        return String.format(SUMMARY_FORMAT,
                action, responseContent, accessToken, accessTokenExpiresAt,
                accessTokenDuration, idToken, authorizationCode, jwtAccessToken);
    }
831087
def info(name):
    '''
    
    '''
    info = __salt__['user.info'](name=name)

    ret = {'name': name,
           'passwd': '',
           'lstchg': '',
           'min': '',
           'max': '',
           'warn': '',
           'inact': '',
           'expire': ''}

    if info:
        ret = {'name': info['name'],
               'passwd': 'Unavailable',
               'lstchg': info['password_changed'],
               'min': '',
               'max': '',
               'warn': '',
               'inact': '',
               'expire': info['expiration_date']}

    return ret
999051
def _get_user_info(self, access_token):
        """"""
        info_response = self._call('GET', self.info_url, params={'access_token': access_token})
        user_info = info_response.get('info')
        return user_info
111694
public String printHelixSummary() {

		StringBuffer g = new StringBuffer(); //3-10 helix
		StringBuffer h = new StringBuffer(); //alpha helix
		StringBuffer i = new StringBuffer(); //pi-helix
		StringBuffer ss = new StringBuffer(); //SS summary
		StringBuffer aa = new StringBuffer(); //AA one-letter
		String nl = System.getProperty("line.separator");

		g.append(	"3 turn: ");
		h.append(	"4 turn: ");
		i.append(	"5 turn: ");
		ss.append(	"SS:     ");
		aa.append(	"AA:     ");

		for (int k = 0; k < groups.length; k++){

			SecStrucState state = getSecStrucState(k);
			g.append(state.getTurn()[0]);
			h.append(state.getTurn()[1]);
			i.append(state.getTurn()[2]);
			ss.append(state.getType());
			aa.append(StructureTools.get1LetterCode(groups[k].getPDBName()));
		}

		return g.toString()+nl+h.toString()+nl+
				i.toString()+nl+ss.toString()+nl+aa.toString();
	}
1175656
private static String getUserInfo(String url) {
    String userInfo = null;
    int startIndex = Integer.MIN_VALUE;
    int nextSlashIndex = Integer.MIN_VALUE;
    int endIndex = Integer.MIN_VALUE;
    try {
      // The user info start index should be the first index of "//".
      startIndex = url.indexOf("//");
      if (startIndex != -1) {
        startIndex += 2;
        // The user info should be found before the next '/' index.
        nextSlashIndex = url.indexOf('/', startIndex);
        if (nextSlashIndex == -1) {
          nextSlashIndex = url.length();
        }
        // The user info ends at the last index of '@' from the previously
        // computed subsequence.
        endIndex = url.substring(startIndex, nextSlashIndex).lastIndexOf('@');
        if (endIndex != -1) {
          userInfo = url.substring(startIndex, startIndex + endIndex);
        }
      }
    } catch (StringIndexOutOfBoundsException ex) {
      System.err.println("String index out of bounds for:|" + url + "|");
      System.err.println("Start index: " + startIndex);
      System.err.println("Next slash index " + nextSlashIndex);
      System.err.println("End index :" + endIndex);
      System.err.println("User info :|" + userInfo + "|");
      ex.printStackTrace();
    }
    return userInfo;
  }
148152
def summary(self):
        """"""
        return "\n".join([
            "Transaction:",
            "  When:        " + self.date.strftime("%a %d %b %Y"),
            "  Description: " + self.desc.replace('\n', ' '),
            "  For amount:  {}".format(self.amount),
            "  From:        {}".format(
                ", ".join(map(lambda x: x.account, self.src)) if self.src \
                    else "UNKNOWN"
            ),
            "  To:          {}".format(
                ", ".join(map(lambda x: x.account, self.dst)) if self.dst \
                    else "UNKNOWN"
            ),
            ""
        ])
67647
def info(self, user):
        
        self.params.update({
            'user': user,
            })
        return FromUrl('https://slack.com/api/users.info', self._requests)(data=self.params).get()
599729
def get_personal_info(user):
    """"""
    # change this to not use other_phones
    num_phones = len(user.phones.all() or [])
    num_emails = len(user.emails.all() or [])
    num_websites = len(user.websites.all() or [])

    personal_info = {}

    for i in range(num_phones):
        personal_info["phone_{}".format(i)] = user.phones.all()[i]

    for i in range(num_emails):
        personal_info["email_{}".format(i)] = user.emails.all()[i]

    for i in range(num_websites):
        personal_info["website_{}".format(i)] = user.websites.all()[i]

    num_fields = {"phones": num_phones, "emails": num_emails, "websites": num_websites}

    return personal_info, num_fields
1131817
def print_info(info):
    """"""
    format_str = "{:<%d} {:>%d}" % (
        max(map(len, info)),
        max(map(len, info.values())),
    )
    for name in sorted(info):
        print(format_str.format(name, info[name]))
508539
def get_description(self):
        
        return DisplayText({'text': profile.DESCRIPTION,
                            'languageTypeId': profile.LANGUAGETYPEID,
                            'scriptTypeId': profile.SCRIPTTYPEID,
                            'formatTypeId': profile.FORMATTYPEID})
898739
def user_info(user, host='localhost', **connection_args):
    '''
    
    '''
    dbc = _connect(**connection_args)
    if dbc is None:
        return False

    cur = dbc.cursor(MySQLdb.cursors.DictCursor)
    qry = ('SELECT * FROM mysql.user WHERE User = %(user)s AND '
           'Host = %(host)s')
    args = {}
    args['user'] = user
    args['host'] = host

    try:
        _execute(cur, qry, args)
    except MySQLdb.OperationalError as exc:
        err = 'MySQL Error {0}: {1}'.format(*exc.args)
        __context__['mysql.error'] = err
        log.error(err)
        return False
    result = cur.fetchone()
    log.debug(result)
    return result
719747
def users_info(self, user_id=None, username=None, **kwargs):
        """"""
        if user_id:
            return self.__call_api_get('users.info', userId=user_id, kwargs=kwargs)
        elif username:
            return self.__call_api_get('users.info', username=username, kwargs=kwargs)
        else:
            raise RocketMissingParamException('userID or username required')
48148
def cli_info(data, title='Info'):
    '''
    
    '''

    wrapper = textwrap.TextWrapper()
    wrapper.initial_indent = ' ' * 4
    wrapper.subsequent_indent = wrapper.initial_indent

    return '{title}:\n\n{text}'.format(title=title, text=wrapper.fill(data))
212344
def get_info(self):
        """"""
        return [self.display_name.encode(),
                self.enabled and b'enabled' or b'disabled',
                STATE_NAMES[self.state].encode() + b':',
                self.last_printed_line.strip()]
912526
def _summary(self, name=None):
        
        formatter = self._formatter_func
        if len(self) > 0:
            index_summary = ', %s to %s' % (formatter(self[0]),
                                            formatter(self[-1]))
        else:
            index_summary = ''

        if name is None:
            name = type(self).__name__
        result = '%s: %s entries%s' % (printing.pprint_thing(name),
                                       len(self), index_summary)
        if self.freq:
            result += '\nFreq: %s' % self.freqstr

        # display as values, not quoted
        result = result.replace("'", "")
        return result