Get Tautulli sessions.
549328
async def get_session_data(self):
        """"""
        cmd = 'get_activity'
        url = self.base_url + cmd
        try:
            async with async_timeout.timeout(8, loop=self._loop):
                response = await self._session.get(url)

            logger("Status from Tautulli: " + str(response.status))
            self.tautulli_session_data = await response.json()
            logger(self.tautulli_session_data)

        except (asyncio.TimeoutError, aiohttp.ClientError, socket.gaierror,
                AttributeError) as error:
            msg = "Can not load data from Tautulli: {} - {}".format(url, error)
            logger(msg, 40)
265537
def get_session(self, account_id):
        """"""
        if account_id not in self.account_sessions:
            if account_id not in self.config['accounts']:
                raise AccountNotFound("account:%s is unknown" % account_id)

            self.account_sessions[account_id] = s = assumed_session(
                self.config['accounts'][account_id]['role'], "Sphere11")
            s._session.user_agent_name = "Sphere11"
            s._session.user_agent_version = "0.07"
        return self.account_sessions[account_id]
442565
def get_redirects(self, request):
        """"""
        kwargs = self.get_request_kwargs()
        return self.session.resolve_redirects(self.url_connection,
            request, **kwargs)
625233
def get_db_session(engine):
    ""

    db = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))
    db.configure(bind=engine)
    db.autoflush = True

    return db
604978
def get_session_value(self, name, default=None):
        """"""

        value = self.redis().hget(self._session_key, name) or default
        self._update_session_expiration()
        return value
687204
protected function getSession()
    {
        if (null === $this->session) {
            throw new \LogicException(sprintf('The deprecated method %s cannot be used when passing a driver in the constructor', __METHOD__));
        }

        @trigger_error(sprintf('The method %s is deprecated as of Mink 1.7 and will be removed in 2.0. Use getDriver and the driver API instead.', __METHOD__), E_USER_DEPRECATED);

        return $this->session;
    }
1066683
def get_session(key=None, username=None, password=None, cache=True,
                cache_expiry=datetime.timedelta(days=7), cookie_path=COOKIE_PATH, backend='memory',
                version=VERSION_GLOBAL):
    """"""
    class VooblyAuth(AuthBase):  # pylint: disable=too-few-public-methods
        """Voobly authorization storage."""

        def __init__(self, key, username, password, cookie_path, version):
            """Init."""
            self.key = key
            self.username = username
            self.password = password
            self.cookie_path = cookie_path
            self.base_url = BASE_URLS[version]

        def __call__(self, r):
            """Call is no-op."""
            return r

    if version not in BASE_URLS:
        raise ValueError('unsupported voobly version')

    session = requests.session()
    if cache:
        session = requests_cache.core.CachedSession(expire_after=cache_expiry, backend=backend)
    session.auth = VooblyAuth(key, username, password, cookie_path, version)
    if os.path.exists(cookie_path):
        _LOGGER.info("cookie found at: %s", cookie_path)
        session.cookies = _load_cookies(cookie_path)
    return session
230524
def __get_session(self):
        
        db_path = self.__get_config().get(ConfigKeys.asset_allocation_database_path)
        self.session = dal.get_session(db_path)
        return self.session
783149
public function getSessions()
    {
        // our return value
        $sessions = array();

        // get a raw list of the current sessions
        $result = $this->curl('GET', '/sessions');

        // convert the raw list into an array of WebDriverSession objects
        foreach ($result['value'] as $session) {
            $sessions[] = new WebDriverSession($this->url . '/session/' . $session['id']);
        }

        // return the full list of sessions
        return $sessions;
    }
918801
protected HttpSession getHttpSessionAt(int rowIndex) {
		if (rowIndex < 0 || rowIndex >= sessions.size())
			return null;
		return sessions.get(rowIndex);
	}
1292635
def sessions(session):
    
    active_sessions = session.get_sessions()
    if not active_sessions:
        click.echo('(No active sessions)')
        return
    for active_session in active_sessions:
        click.echo(active_session)
206587
public Collection<RaftSession> getSessions(PrimitiveId primitiveId) {
    return sessions.values().stream()
        .filter(session -> session.getService().serviceId().equals(primitiveId))
        .filter(session -> session.getState().active())
        .collect(Collectors.toSet());
  }
613585
def get_anonymous_session(self) -> requests.Session:
        """"""
        session = requests.Session()
        session.cookies.update({'sessionid': '', 'mid': '', 'ig_pr': '1',
                                'ig_vw': '1920', 'csrftoken': '',
                                's_network': '', 'ds_user_id': ''})
        session.headers.update(self._default_http_header(empty_session_only=True))
        return session
503871
def sessions(self):
        
        return pd.to_datetime(
            reduce(
                np.union1d,
                (reader.dates for reader in self._readers.values()),
            ),
            utc=True,
        )
551860
def list_sessions(cls):
        
        return [os.path.splitext(os.path.basename(f))[0]
                for f in os.listdir('.') if f.endswith(EXTENSION)]
882882
protected final SessionState getSessionState() {
        if (sessionTracker != null) {
            Session currentSession = sessionTracker.getSession();
            return (currentSession != null) ? currentSession.getState() : null;
        }
        return null;
    }
415180
def _get_session(self):
        
        if self._session is None:
            self._session = _boto3.session.Session(
                **self._storage_parameters.get('session', dict()))
        return self._session