Get excluded category IDs.
187299
def get_excluded_categories():
    """"""
    from indico_livesync.plugin import LiveSyncPlugin
    return {int(x['id']) for x in LiveSyncPlugin.settings.get('excluded_categories')}
302845
protected function getIDListFromDB() : array
    {
        $arElementIDList = (array) Product::getByCategory($this->sValue)
            ->where('brand_id', '>', 0)
            ->lists('brand_id', 'id');

        $obCategory = Category::find($this->sValue);
        if (!empty($obCategory)) {
            $arAdditionalElementIDList = (array) $obCategory->product_link()
                ->where('brand_id', '>', 0)
                ->lists('brand_id', 'id');

            $arElementIDList = $arElementIDList + $arAdditionalElementIDList;
        }

        return $arElementIDList;
    }
1219441
def _is_excluded(self, path, dir_only):
        """"""

        return self.npatterns and self._match_excluded(path, self.npatterns)
1171269
function getCategories()
    {
        $result = $this->db->query('SELECT * FROM category');

        $data = [];
        if (isset($result[0])) {
            foreach ($result as $v) {
                $data[$v->get('id')] = $v->get('name');
            }
        }
        return $data;
    }
499230
def normalize_excludes(excludes):
    """"""
    return [os.path.normpath(os.path.abspath(exclude)) for exclude in excludes]
632381
protected function getFilteredNewsIds()
    {
        try {
            $criteria = System::getContainer()
                ->get('codefog_news_categories.news_criteria_builder')
                ->getCriteriaForMenuModule($this->news_archives, $this);
        } catch (CategoryNotFoundException $e) {
            throw new PageNotFoundException($e->getMessage());
        }

        if ($criteria === null) {
            return [];
        }

        $table = $criteria->getNewsModelAdapter()->getTable();

        return Database::getInstance()
            ->prepare("SELECT id FROM $table WHERE " . implode(' AND ', $criteria->getColumns()))
            ->execute($criteria->getValues())
            ->fetchEach('id');
    }
20942
public function getSearchQuery($excludedCategories = [])
    {
        $queryParams = [];

        $aggregator = $this->getAggregator();
        $value      = (bool) $this->getValue();

        $queryClause = $aggregator === 'all' ? 'must' : 'should';

        foreach ($this->getConditions() as $condition) {
            $subQuery = $condition->getSearchQuery($excludedCategories);
            if ($subQuery !== null && $subQuery instanceof QueryInterface) {
                if ($value === false) {
                    $subQuery = $this->queryFactory->create(QueryInterface::TYPE_NOT, ['query' => $subQuery]);
                }

                $queryParams[$queryClause][] = $subQuery;
            }
        }

        $query = $this->queryFactory->create(QueryInterface::TYPE_BOOL, $queryParams);

        return $query;
    }
749232
private function getCategorySearchQuery($excludedCategories)
    {
        $categoryIds = array_diff(explode(',', $this->getValue()), $excludedCategories);
        $subQueries  = [];

        foreach ($categoryIds as $categoryId) {
            $subQuery = $this->getRule()->getCategorySearchQuery($categoryId, $excludedCategories);
            if ($subQuery !== null) {
                $subQueries[] = $subQuery;
            }
        }

        $query = null;

        if (count($subQueries) === 1) {
            $query = current($subQueries);
        } elseif (count($subQueries) > 1) {
            $query = $this->queryFactory->create(QueryInterface::TYPE_BOOL, ['should' => $subQueries]);
        }

        return $query;
    }
847187
private function getStandardCategoriesQuery(array $categoryIds, $excludedCategories)
    {
        $conditionsParams  = ['data' => ['attribute' => 'category_ids', 'operator' => '()', 'value' => $categoryIds]];
        $categoryCondition = $this->productConditionsFactory->create($conditionsParams);

        return $this->queryBuilder->getSearchQuery($categoryCondition, $excludedCategories);
    }
277983
def get_item_ids(self):
        """"""
        if self.has_item_ids():
            return IdList(self.my_osid_object._my_map['itemIds'],
                          runtime=self.my_osid_object._runtime,
                          proxy=self.my_osid_object._proxy)
        raise IllegalState()
1318483
def categories(self):
        
        r = [ch for ch in self._channels.values() if isinstance(ch, CategoryChannel)]
        r.sort(key=lambda c: (c.position, c.id))
        return r
899999
def get_category_metrics(self, category):
        """"""
        slug_list = self._category_slugs(category)
        return self.get_metrics(slug_list)
553103
def _get_selected_ids(self):
        """"""
        selection = self.get_selection()
        if selection.get_mode() != gtk.SELECTION_MULTIPLE:
            raise AttributeError('selected_ids only valid for select_multiple')
        model, selected_paths = selection.get_selected_rows()
        if selected_paths:
            return zip(*selected_paths)[0]
        else:
            return ()
59844
public function getCategoryIds()
    {
        return array_keys((new CmsCategoryRelationQuery)
                ->join('cms_category')->on('cms_category_id')
                ->whereObject()->equals($this->_object)
                ->andFieldObjectId()->equals($this->_objectId)
                ->findPairs('cms_category.id', 'cms_category.id'));
    }
1026048
public function getExcludedClasses()
    {
        $excludedClasses = [];

        foreach ($this->classes as $excludedClass) {
            $excludedClasses[] = $excludedClass->getName();
        }

        return $excludedClasses;
    }
1038912
def _get_filter_ids(cls, request):
        
        id_query = request.url.query.get('id', None)

        if id_query is None:
            return None

        filter_ids = id_query.split(',')
        for filter_id in filter_ids:
            cls._validate_id(filter_id)

        return filter_ids
182472
def __remove_category(self, id):
        """"""

        affected_query = """
            SELECT id
              FROM facts
             WHERE activity_id in (SELECT id FROM activities where category_id=?)
        """
        affected_ids = [res[0] for res in self.fetchall(affected_query, (id,))]

        update = "update activities set category_id = -1 where category_id = ?"
        self.execute(update, (id, ))

        self.execute("delete from categories where id = ?", (id, ))

        self.__remove_index(affected_ids)