gets/sets the user agent value
325640
def useragent(self, value):
        """"""
        if value is None:
            self._useragent = "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0"
        elif self._useragent != value:
            self._useragent = value
224366
def show_agent(self, agent, **_params):
        """"""
        return self.get(self.agent_path % (agent), params=_params)
626075
def set_user(user, sender, instance, **kwargs):
        
        try:
            app_label, model_name = settings.AUTH_USER_MODEL.split('.')
            auth_user_model = apps.get_model(app_label, model_name)
        except ValueError:
            auth_user_model = apps.get_model('auth', 'user')
        if sender == LogAction and isinstance(user, auth_user_model) and instance.user is None:
            instance.user = user
        if hasattr(threadlocal, 'actionslog'):
            instance.remote_ip = threadlocal.actionslog['remote_ip']
697555
protected function _loadRequestUserAgent()
    {
        if($this->_requestUserAgent !== NULL) return;

        if(! key_exists('HTTP_USER_AGENT', $_SERVER))
            throw new Exception("No HTTP User Agent was found");

        $this->_requestUserAgent = $_SERVER['HTTP_USER_AGENT'];
    }
1246006
def get_user_agent():
    

    global user_agent_string
    if user_agent_string is None:
        # get OS type
        try:
            sysinfo = subprocess.check_output('lsb_release -i -r -s'.split(' '))
            dockerinfo = subprocess.check_output('docker --version'.split(' '))

            user_agent_string = ' '.join([sysinfo.replace('\t','/'),
                                          dockerinfo.replace(" version ", "/").replace(", ", "/").replace(' ', '/')]).replace('\n','')
        except:
            user_agent_string = None

    return user_agent_string
184602
def value(self):
        
        user = self.trigger.agentml.request_log.most_recent().user
        groups = self.trigger.agentml.request_log.most_recent().groups

        # Does the redirect statement have tags to parse?
        if len(self._element):
            message = ''.join(map(str, self.trigger.agentml.parse_tags(self._element, self.trigger)))
        else:
            message = self._element.text

        # Is there a default value defined?
        default = attribute(self._element, 'default', '')
        response = self.trigger.agentml.get_reply(user.id, message, groups)

        return response or default
1316640
function bundle(useragent) {
    var val = cache.get(useragent)
    if (val) return val

    // create a bundle
    val = agents.filter(polyfills, agents.parse(useragent))
    cache.set(useragent, val)
    return val
  }
1281106
private void setUserAgentsRegEx(List<String> agents) {

        if ((agents == null) || (agents.size() == 0)) {
            setValidConfiguration(false);
            LOG.error(Messages.get().getBundle().key(Messages.LOG_NO_USER_AGENTS_0));
        }
        m_userAgentsRegEx = agents;
    }
683508
public static ApiUser getUserAgent(User sfsUser) {
        Object userAgent = sfsUser.getProperty(APIKey.USER);
        if(userAgent == null) 
            throw new RuntimeException("Can not get user agent");
        return (ApiUser)userAgent;
    }
238554
function getUserAgent() {
	var format = require('util').format,
		version = require('../package').version;

	return format(
		'analyze-css/%s (%s %s, %s %s)',
		version,
		process.release.name,
		process.version,
		process.platform,
		process.arch
	);
}
838967
@Nonnull
  public static IUserAgent getUserAgent (@Nonnull final HttpServletRequest aHttpRequest)
  {
    IUserAgent aUserAgent = (IUserAgent) aHttpRequest.getAttribute (IUserAgent.class.getName ());
    if (aUserAgent == null)
    {
      // Extract HTTP header from request
      final String sUserAgent = getHttpUserAgentStringFromRequest (aHttpRequest);
      aUserAgent = UserAgentDatabase.getParsedUserAgent (sUserAgent);
      if (aUserAgent == null)
      {
        LOGGER.warn ("No user agent was passed in the request!");
        aUserAgent = new UserAgent ("", new UserAgentElementList ());
      }
      ServletHelper.setRequestAttribute (aHttpRequest, IUserAgent.class.getName (), aUserAgent);
    }
    return aUserAgent;
  }
996823
protected function _getUserAgent()
    {
        $ua = str_replace('%v', self::VERSION, $this->userAgent);
        $ua = str_replace('%m', $this->_getUpdateMethod(), $ua);

        return $ua;
    }
45242
def make_user_agent(prefix=None):
    """"""
    prefix = (prefix or platform.platform(terse=1)).strip().lower()
    return "cloudsmith-cli/%(prefix)s cli:%(version)s api:%(api_version)s" % {
        "version": get_cli_version(),
        "api_version": get_api_version(),
        "prefix": prefix,
    }
386120
public function user_agent($user_agent = NULL)
	{
		if ($user_agent !== NULL)
		{
			\Request::$user_agent = $user_agent;
			return $this;
		}
		return \Request::$user_agent;
	}
30673
private void setDefaultUserAgent() {
        setUserAgent(
                MwsUtl.escapeAppName(applicationName),
                MwsUtl.escapeAppVersion(applicationVersion),
                MwsUtl.escapeAttributeValue("Java/"
                        + System.getProperty("java.version") + "/"
                        + System.getProperty("java.class.version") + "/"
                        + System.getProperty("java.vendor")),

                MwsUtl.escapeAttributeName("Platform"),
                MwsUtl.escapeAttributeValue("" + System.getProperty("os.name")
                        + "/" + System.getProperty("os.arch") + "/"
                        + System.getProperty("os.version")),

                MwsUtl.escapeAttributeName("MWSClientVersion"),
                MwsUtl.escapeAttributeValue(libraryVersion));
    }
556562
public function getUserAgent()
    {
        if ($this->USER_AGENT) {
            return $this->USER_AGENT;
        }

        if ($this->HTTP_USER_AGENT) {
            return $this->HTTP_USER_AGENT;
        }

        return null;
    }
497937
function formatUserAgent(userAgent) {
	var formattedUserAgent = userAgent.toLowerCase();

	// Strip the version number from robot/1.0 user agents
	var idx = formattedUserAgent.indexOf('/');
	if (idx > -1) {
		formattedUserAgent = formattedUserAgent.substr(0, idx);
	}

	return formattedUserAgent.trim();
}