Will ask user to click link to accept app and write code
763332
def verifier(self, url):
        
        webbrowser.open(url)
        print('A browser should have opened up with a link to allow us to access')
        print('your account, follow the instructions on the link and paste the verifier')
        print('Code into here to give us access, if the browser didn\'t open, the link is:')
        print(url)
        print()
        return input('Verifier: ').lstrip(" ").rstrip(" ")
847388
def do_link_auth_flow(session_params=None, force_new_client=False):
    
    session_params = session_params or {}

    # get the ConfidentialApp client object
    auth_client = internal_auth_client(
        requires_instance=True, force_new_client=force_new_client
    )

    # start the Confidential App Grant flow
    auth_client.oauth2_start_flow(
        redirect_uri=auth_client.base_url + "v2/web/auth-code",
        refresh_tokens=True,
        requested_scopes=SCOPES,
    )

    # prompt
    additional_params = {"prompt": "login"}
    additional_params.update(session_params)
    linkprompt = "Please authenticate with Globus here"
    safeprint(
        "{0}:\n{1}\n{2}\n{1}\n".format(
            linkprompt,
            "-" * len(linkprompt),
            auth_client.oauth2_get_authorize_url(additional_params=additional_params),
        )
    )

    # come back with auth code
    auth_code = click.prompt("Enter the resulting Authorization Code here").strip()

    # finish auth flow
    exchange_code_and_store_config(auth_client, auth_code)
    return True
740905
def open_link(self, *args):
        """"""
        if "disabled" not in self.state():
            webbrowser.open(self._link)
            self.__clicked = True
            self._on_leave()
941220
function accept(req, res, cb) {
	var u = url.parse(req.url, true),
		path = u.pathname

	if(/^\/api\/?$/.test(path)) {
		messageInit({cb:(cb || nop), req:req, res:res, path:path, query:u.query, u:u})
		return;
	}

	if(req.method == "OPTIONS") {
		res.writeHead(200, {
			"Access-Control-Allow-Origin": "*",	// to support cross-domain script execution of our api
			"Access-Control-Max-Age": "0",
		})
		res.end()
		return;
	}

	www(req, res)					// everything else handled by paperboy
}
1141651
def interact(self, banner=None):
        """"""
        try:
            sys.ps1
        except AttributeError:
            sys.ps1 = ">>>"
        try:
            sys.ps2
        except AttributeError:
            sys.ps2 = "... "
        cprt = (
            'Type "help", "copyright", "credits" or "license" for ' "more information."
        )
        if banner is None:
            self.write("Python %s on %s\n%s\n" % (sys.version, sys.platform, cprt))
        else:
            self.write("%s\n" % str(banner))
        self.run_commands()
472622
def allow(self, comment, content_object, request):
        """"""
        
        POST = urlencode({
                "blog": settings.AKISMET_BLOG.encode("utf-8"),
                "user_ip": comment.ip_address,
                "user_agent": request.META.get('HTTP_USER_AGENT', "").
                                                encode("utf-8"),
                "referrer": request.META.get('HTTP_REFERRER', "").
                                                encode("utf-8"),
                "comment_author": comment.user_name.encode("utf-8"),
                "comment_author_email": comment.user_email.encode("utf-8"),
                "comment_author_url": comment.user_url.encode("utf-8"),
                "comment_content": comment.comment.encode("utf-8")})
        connection = HTTPConnection(AKISMET_URL, AKISMET_PORT)
        connection.request("POST", AKISMET_PATH, POST,
                           {"User-Agent": AKISMET_USERAGENT,
                            "Content-type":"application/x-www-form-urlencoded"
                            })
        response = connection.getresponse()
        status, result = response.status, response.read()
        if result == "false":
            return True
        elif result == "true" and settings.DISCARD_SPAM:
            return False
        elif result == "true":
            comment.is_removed = True
            comment.is_public = False
            return True
        else:
            raise AkismetError(status, result)
19985
def signup(remote_app):
    """"""
    if remote_app not in current_oauthclient.signup_handlers:
        return abort(404)
    res = current_oauthclient.signup_handlers[remote_app]['view']()
    return abort(404) if res is None else res
64793
def allow_buttons(self, message="", link=True, back=True):
        
        self.info_label.set_label(message)
        self.allow_close_window()
        if link and self.link is not None:
            self.link.set_sensitive(True)
            self.link.show_all()
        if back:
            self.back_btn.show()
        self.main_btn.set_sensitive(True)
733779
def push_app(self, content, content_url=None):
        '''
        '''
        parameters = {
            'app_key': self.app_key,
            'app_secret': self.app_secret
        }
        return self._push(content, 'app', parameters, content_url)
261200
public function acceptPopup()
    {
        if ($this->isPhantom()) {
            throw new ModuleException($this, 'PhantomJS does not support working with popups');
        }
        $this->webDriver->switchTo()->alert()->accept();
    }
1277443
async def _post(self, program_id: int = None, json: dict = None) -> dict:
        """"""
        return await self._request(
            'post', 'program/{0}'.format(program_id), json=json)
902700
static void requestAppDetails(Source source) {
        Intent intent = new Intent(source.getContext(), BridgeActivity.class);
        intent.putExtra(KEY_TYPE, BridgeRequest.TYPE_APP_DETAILS);
        source.startActivity(intent);
    }
1069654
def acceptNavigationRequest(self, url, navigation_type, isMainFrame):
        
        if navigation_type == QWebEnginePage.NavigationTypeLinkClicked:
            self.linkClicked.emit(url)
            return False
        return True
974149
def code(app_reference)
      code = ''
      templates.each_pair do |name, template|
        binding_code = []

        if template['bindings']
          template['bindings'].each_pair do |key, value|
            binding_code << "#{key.inspect} => [#{value.join(', ')}]"
          end
        end

        binding_code = "{#{binding_code.join(', ')}}"

        code << "#{app_reference}.add_template(#{name.inspect}, #{template['html'].inspect}, #{binding_code})\n"
      end

      code
    end
776566
def touch(args):
    
    p = OptionParser(touch.__doc__)
    opts, args = p.parse_args(args)
    fp = sys.stdin

    for link_name in fp:
        link_name = link_name.strip()
        if not op.islink(link_name):
            continue
        if not op.exists(link_name):
            continue

        source = get_abs_path(link_name)
        lnsf(source, link_name)
358589
def code_me
      html = browser.get_html_source
      filename = "#{Rails.root.join('tmp')}/pyrite-#{Time.now.to_i}.html"
      code = File.open(filename, 'w') { |f| f.write(html) }
      puts `open #{code}`
    end
466142
def url_combo_activated(self, valid):
        """"""
        text = to_text_string(self.url_combo.currentText())
        self.go_to(self.text_to_url(text))