Ask the user all the info we need.
177919
private void startInteractiveConfWizard() throws IOException {
        BufferedReader br = null;
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            System.out.println("");
            chooseBootstrapPack(br);
            chooseSampleSqlAndConf(br);
            enterAppName(br);
            enterPackageName(br);
        } finally {
            br.close();
        }
    }
558598
public function allData()
    {
        call_user_func($this->callback, new ChartWidget($this->name, $this->label, $this->authSystem, $this->requiredPermissions, $this->chart));
    }
624764
def info(self, req) -> ResponseInfo:
        
        r = ResponseInfo()
        r.version = "1.0"
        r.last_block_height = 0
        r.last_block_app_hash = b''
        return r
220514
def check(self):
        '''
        '''

        for info in self.get_info():
            if info.free < info.limit:
                return info
893900
def get_user_info(self):
        
        # the request is done in behalf of the current logged in user
        resp = self.requester.get(
            urljoin(
                self.base_url,
                '/api/mobile/v0.5/my_user_info'
            )
        )

        resp.raise_for_status()

        return Info(resp.json())
605465
def _load_info(self):
    """"""
    if self._info is None:
      try:
        self._info = self._api.tables_get(self._name_parts)
      except Exception as e:
        raise e
916241
def user_info(self, verbose=False):
        '''
        
        '''
        url = '{}/{}'.format(self.rest_url, 'user')
        return self.__auth_req_get(url, verbose=verbose)
817344
def user(username, password, all):
    """"""
    if current_app.config['AUTH_PROVIDER'] != 'basic':
        raise click.UsageError('Not required for {} admin users'.format(current_app.config['AUTH_PROVIDER']))
    if username and username not in current_app.config['ADMIN_USERS']:
        raise click.UsageError('User {} not an admin'.format(username))
    if not username and not all:
        raise click.UsageError('Missing option "--username".')

    def create_user(admin):
        email = admin if '@' in admin else None
        user = User(
            name='Admin user',
            login=admin,
            password=generate_password_hash(password),
            roles=['admin'],
            text='Created by alertad script',
            email=email,
            email_verified=bool(email)
        )
        try:
            db.get_db()  # init db on global app context
            user = user.create()
        except Exception as e:
            click.echo('ERROR: {}'.format(e))
        else:
            click.echo('{} {}'.format(user.id, user.name))

    if all:
        for admin in current_app.config['ADMIN_USERS']:
            create_user(admin)
    else:
        create_user(username)
22297
function Ask(server, req, res) {
  this.server = server;
  this.req = req;
  this.res = res;
  this.uri = req.uri;
  this.form = req.form;
  this.path = req.path;
  this.query = req.query;
  this.username = req.username;
  this.password = req.password;
  this.cookies = req.cookies;
}
176211
def solvedBy(self, user):
        
        _Solution(store=self.store, who=user, what=self)
559173
def get_info(self):
        '''
        
        '''
        if not self.info:
            ci = win32pdh.GetCounterInfo(self.handle, 0)
            self.info = {
                'type': ci[0],
                'version': ci[1],
                'scale': ci[2],
                'default_scale': ci[3],
                'user_data': ci[4],
                'query_user_data': ci[5],
                'full_path': ci[6],
                'machine_name': ci[7][0],
                'object_name': ci[7][1],
                'instance_name': ci[7][2],
                'parent_instance': ci[7][3],
                'instance_index': ci[7][4],
                'counter_name': ci[7][5],
                'explain_text': ci[8]
            }
        return self.info
1320887
def get_auth_info(self, **params):
        """"""
        response = self._get('v2', 'user', 'auth', params=params)
        return self._make_api_object(response, APIObject)
645333
def _AskUser(self):
    
    if self._show_percent:
      progress = int(self._displayed*100 / (len(self._text.splitlines())))
      progress_text = ' (%d%%)' % progress
    else:
      progress_text = ''
    question = AnsiText(
        'Enter: next line, Space: next page, '
        'b: prev page, q: quit.%s' %
        progress_text, ['green'])
    sys.stdout.write(question)
    sys.stdout.flush()
    ch = self._GetCh()
    sys.stdout.write('\r%s\r' % (' '*len(question)))
    sys.stdout.flush()
    return ch
1364331
def query_user_info(user):
    


    try:
        user_info = query_user_page(INIT_URL_USER.format(u=user))
        if user_info:
            logger.info(f"Got user information from username {user}")
            return user_info

    except KeyboardInterrupt:
        logger.info("Program interrupted by user. Returning user information gathered so far...")
    except BaseException:
        logger.exception("An unknown error occurred! Returning user information gathered so far...")

    logger.info(f"Got user information from username {user}")
    return user_info
437534
def get_info(self):
        ''''''
        if self._min_disk:
            for path in self._resource_paths:
                usage = psutil.disk_usage(path)

                yield ResourceInfo(path, usage.free, self._min_disk)

        if self._min_memory:
            usage = psutil.virtual_memory()

            yield ResourceInfo(None, usage.available, self._min_memory)
57777
def info(request, message, extra_tags='', fail_silently=False, async=False):
    """"""
    if ASYNC and async:
        messages.info(_get_user(request), message)
    else:
        add_message(request, constants.INFO, message, extra_tags=extra_tags,
                    fail_silently=fail_silently)
65809
def _Summarize(user_info):
  """"""
  return "Username: %s\nIs Admin: %s" % (
      user_info.username,
      user_info.user_type == api_user.ApiGrrUser.UserType.USER_TYPE_ADMIN)