Asks the user for what it wants the script to do

    Returns:
        [dictionary] -- answers to the questions
963688
def askInitial():
    '''
    '''
    return inquirer.prompt([
        inquirer.Text(
            'inputPath', message="What's the path of your input file (eg input.csv)"),
        inquirer.List(
            'year',
            message="What year are you in",
                    choices=[1, 2, 3, 4]
        ),
        inquirer.Checkbox(
            'whatToDo',
            message="What can I do for you (select with your spacebar)",
            choices=[
                "Get your weighted average",
                "Get your rank in the year",
                "Reformat results by module and output to csv",
                "Plot the results by module"

            ]),
    ])
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
566235
def ask(question):
    '''
    
    '''
    while True:
        ans = input(question)
        al = ans.lower()
        if match('^y(es)?$', al):
            return True
        elif match('^n(o)?$', al):
            return False
        elif match('^q(uit)?$', al):
            stdout.write(CYAN)
            print("\nGoodbye.\n")
            stdout.write(RESET)
            quit()
        else:
            stdout.write(RED)
            print("%s is invalid. Enter (y)es, (n)o or (q)uit." % ans)
            stdout.write(RESET)
615269
function CommandAsker(questions, options) {
    options = options || {};
    
    if (!_.isArray(questions)) {
        throw "there are no questions available :'(";
    }
    
    this.questions = questions;
    this.response = {};
    this.cli = readline.createInterface({
        input: process.stdin,
        output: process.stdout
    });
    this.askCallback = null;
    this.errorMsg = options.errorMsg || clc.xterm(160);
    this.currentQuestion = 0;
}
83983
def save_script(save=None):  # noqa: E501
    
    if connexion.request.is_json:
        save = Save.from_dict(connexion.request.get_json())  # noqa: E501
    return 'do some magic!'
1059464
public function askCommand(): void
    {
        $a = Interact::ask('you name is: ', '', function ($val, &$err) {
            if (!preg_match('/^\w{2,}$/', $val)) {
                $err = 'Your input must match /^\w{2,}$/';
                return false;
            }

            return true;
        });

        $this->write('Your answer is: ' . $a);
    }
344579
def ask_str(msg="Enter a string", dft=None, vld=None, shw=True, blk=True, hlp=None):
    """"""
    vld = vld or [str]
    return ask(msg, dft=dft, vld=vld, shw=shw, blk=blk, hlp=hlp)
246918
def request_args(self):
        '''
        
        '''
        kwargs = {}
        kwargs.update(self.request.match_info.items())
        kwargs.update(self.request.query.items())
        return kwargs
519166
def prompt(name, default):
    
    value = raw_input('%s [%s]: ' %(name, default))
    if not value:
        value = default
    return value
294153
def re_ask(self, with_help=True):
        
        if with_help:
            self.show_help()

        return self.get_answer(self.last_question)
139248
def get_script(self):
        
        uri = "{}/script".format(self.data["uri"])
        return self._helper.do_get(uri)
284175
function promptQuestions() {
    prompt.get([{
        name: 'api_key',
        description: 'Your Fabric API Key',
        default: ''
    }, {
        name: 'api_secret',
        description: 'Your Fabric API Secret',
        default: ''
    }], function(err, result) {
        if (err) {
            return console.log(err);
        }
        mergeConfig(result);
        promptQuestionsResult(result);
        askSaveConfigPrompt();
    });
}
1108444
def ask_user(d):
    """"""

    # Print welcome message
    msg = bold('Welcome to the Hieroglyph %s quickstart utility.') % (
        version(),
    )
    print(msg)
    msg = """
This will ask questions for creating a Hieroglyph project, and then ask
some basic Sphinx questions.
"""
    print(msg)

    # set a few defaults that we don't usually care about for Hieroglyph
    d.update({
        'version': datetime.date.today().strftime('%Y.%m.%d'),
        'release': datetime.date.today().strftime('%Y.%m.%d'),
        'make_mode': True,
    })

    if 'project' not in d:
        print('''
The presentation title will be included on the title slide.''')
        sphinx.quickstart.do_prompt(d, 'project', 'Presentation title')
    if 'author' not in d:
        sphinx.quickstart.do_prompt(d, 'author', 'Author name(s)')

    # slide_theme
    theme_entrypoints = pkg_resources.iter_entry_points('hieroglyph.theme')

    themes = [
        t.load()
        for t in theme_entrypoints
    ]

    msg = """
Available themes:

"""

    for theme in themes:
        msg += '\n'.join([
            bold(theme['name']),
            theme['desc'],
            '', '',
        ])

    msg += """Which theme would you like to use?"""
    print(msg)

    sphinx.quickstart.do_prompt(
        d, 'slide_theme', 'Slide Theme', themes[0]['name'],
        sphinx.quickstart.choice(
            *[t['name'] for t in themes]
        ),
    )

    # Ask original questions
    print("")
    sphinx.quickstart.ask_user(d)
1248239
def confirm(question, default=True):
    
    valid = {"": default, "yes": True, "y": True, "no": False, "n": False}
    while 1:
        choice = input(question + (" [Y/n] " if default else " [y/N] ")).lower()
        if choice in valid:
            return valid[choice]
        print("Please respond with 'y' or 'n' ")
476948
def create_script(create=None):  # noqa: E501
    
    if connexion.request.is_json:
        create = Create.from_dict(connexion.request.get_json())  # noqa: E501
    return 'do some magic!'
433426
def show
      script_listing = Script::Listing.find(params[:listing_id])
      @script_url = script_listing.urls.friendly.find(params[:id])
    end
798533
def _ask(question, default=None, data_type='str', show_hint=False):
    """"""

    data = default

    if data_type == 'bool':
        data = None
        default_string = "Y" if default else "N"

        while data not in ('Y', 'J', 'N', '1', '0'):
            data = input("%s? [%s]: " % (question, default_string)).upper()

            if data == '':
                return default

        return data in ('Y', 'J', '1')

    elif data_type in ('str', 'unicode'):
        if show_hint:
            msg = "%s? [%s] (%s): " % (question, default, data_type)
        else:
            msg = question

        data = input(msg)

        if len(data) == 0:
            data = default
    elif data_type == 'int':
        if show_hint:
            msg = "%s? [%s] (%s): " % (question, default, data_type)
        else:
            msg = question

        data = input(msg)

        if len(data) == 0:
            data = int(default)
        else:
            data = int(data)

    return data