For debugging: return a list of all session ids currently active
182345
public String listSipApplicationSessionIds() {
    	StringBuffer sb=new StringBuffer();
        Iterator<MobicentsSipApplicationSession> sipApplicationSessions = sipManagerDelegate.getAllSipApplicationSessions();
        while (sipApplicationSessions.hasNext()) {
            sb.append(sipApplicationSessions.next().getKey()).append(" ");
        }
        return sb.toString();
    }
939662
def get_active_terms_ids():
        """"""

        active_terms_ids = cache.get('tandc.active_terms_ids')
        if active_terms_ids is None:
            active_terms_dict = {}
            active_terms_ids = []

            active_terms_set = TermsAndConditions.objects.filter(date_active__isnull=False, date_active__lte=timezone.now()).order_by('date_active')
            for active_terms in active_terms_set:
                active_terms_dict[active_terms.slug] = active_terms.id

            active_terms_dict = OrderedDict(sorted(active_terms_dict.items(), key=lambda t: t[0]))

            for terms in active_terms_dict:
                active_terms_ids.append(active_terms_dict[terms])

            cache.set('tandc.active_terms_ids', active_terms_ids, TERMS_CACHE_SECONDS)

        return active_terms_ids
789698
public String getCurrentSessionId() {
        String currentId = null;
        Hashtable ht = (Hashtable) currentThreadSacHashtable.get();
        if (ht != null) {
            SessionAffinityContext sac = (SessionAffinityContext) ht.get(_smc.getSessionAffinityContextKey());
            if (sac != null) {
                currentId = _sam.getInUseSessionID(null, sac);
                // Make sure this is set if nothing was passed in.
                if (currentId == null) {
                    currentId = "NONE";
                }
            }
        }
        // If null is returned, this is considered to be a user spawned thread.
        return currentId;
    }
797451
def get_shutit_pexpect_sessions():
	
	sessions = []
	for shutit_object in shutit_global_object.shutit_objects:
		for key in shutit_object.shutit_pexpect_sessions:
			sessions.append(shutit_object.shutit_pexpect_sessions[key])
	return sessions
994800
def active(self):
        
        projects = []
        r = requests.get(self.api,
                         params={'action': 'query', 'list': 'categorymembers', 'cmpageid': self.active_id,
                                 'cmtype': 'page', 'cmlimit': '500', 'format': 'json'},
                         headers=self.header)
        if r.status_code == 200:
            jsd = r.json()
            projects.append([(x['title'], x['pageid']) for x in jsd['query']['categorymembers']])
            if 'query-continue' in jsd:
                while True:
                    r = requests.get(self.api,
                                     params={'action': 'query', 'list': 'categorymembers',
                                             'cmpageid': self.active_id, 'cmtype': 'page', 'cmlimit': '500',
                                             'cmcontinue': jsd['query-continue']['categorymembers']['cmcontinue'],
                                             'format': 'json'},
                                     headers=self.header)
                    if r.status_code == 200:
                        jsd = r.json()
                        projects.append([(x['title'], x['pageid']) for x in jsd['query']['categorymembers']])
                        if 'query-continue' not in jsd:
                            break
                    else:
                        break
        return projects[0]
768441
def get_current_activities(self, login=None, **kwargs):
        

        _login = kwargs.get(
            'login',
            login or self._login
        )
        _activity_url = ACTIVITY_URL.format(login=_login)
        return self._request_api(url=_activity_url).json()
111562
def session_info(self):
        
        if self.session_not_on_or_after > 0:
            nooa = self.session_not_on_or_after
        else:
            nooa = self.not_on_or_after

        if self.context == "AuthzQuery":
            return {"name_id": self.name_id, "came_from": self.came_from,
                    "issuer": self.issuer(), "not_on_or_after": nooa,
                    "authz_decision_info": self.authz_decision_info()}
        else:
            authn_statement = self.assertion.authn_statement[0]
            return {"ava": self.ava, "name_id": self.name_id,
                    "came_from": self.came_from, "issuer": self.issuer(),
                    "not_on_or_after": nooa, "authn_info": self.authn_info(),
                    "session_index": authn_statement.session_index}
882576
def sessions(self):
        
        if self._sessions is None:
            self._sessions = SessionList(self._version, service_sid=self._solution['sid'], )
        return self._sessions
837567
def list_websites(self):
        
        self.connect()
        results = self.server.list_websites(self.session_id)

        return results
1062350
def get_current_user_ids(self, db_read=None):
        
        db_read = db_read or self.db_read

        return self.user_ids.using(db_read)
278444
def get_active() -> List[str]:
        """"""
        active = []
        for i in range(__num_subarrays__):
            key = Subarray.get_key(i)
            if DB.get_hash_value(key, 'active').upper() == 'TRUE':
                active.append(Subarray.get_id(i))
        return active
788729
def items(self):
        
        all_items = [(k.decode('utf-8'),v.decode('utf-8')) for k,v in self.rdb.hgetall(self.session_hash).items()]
        return all_items
871600
private static List<SessionStatus> getEndStates() {
    List<SessionStatus> endStatesRet = new ArrayList<SessionStatus>();
    for (SessionStatus s : SessionStatus.values()) {
      if (s != SessionStatus.RUNNING) {
        endStatesRet.add(s);
      }
    }
    return endStatesRet;
  }
651854
def _get_authenticated_session(self):
        
        session = requests.Session()
        session.auth = self.auth
        return session
656202
def list_directory(self, *args, **kwargs):
		
		return tuple(self.dav_client().list(self.session_path()))
1332843
public static function getAdminIds()
    {
        // Get Slim current session
        if (!Container::get('cache')->isCached('admin_ids')) {
            Container::get('cache')->store('admin_ids', Cache::getAdminIds());
        }

        return Container::get('cache')->retrieve('admin_ids');
    }
13183
def statuses(self):
        
        r_json = self._get_json('status')
        statuses = [Status(self._options, self._session, raw_stat_json)
                    for raw_stat_json in r_json]
        return statuses