<commit_before># -*- coding: utf-8 -*-

# Copyright (c) 2013, Activision Publishing, Inc.
# Copyright (c) 2014, 2015 <NAME> <<EMAIL>>

# the cog project is free software under 3-clause BSD licence
# see the LICENCE file in the project root for copying terms

# user group object handling

import os
import sys
from functools import wraps

import ldap
import ldap.modlist as modlist

import cog.directory as dir
from cog.util.misc import loop_on
from cog.config.settings import Profiles
from cog.directory import has_rfc2307bis

settings = Profiles()
rfc2307bis_object_class = settings.rfc2307bis_group_object_class
rfc2307bis_member_attribute = settings.rfc2307bis_group_member_attribute


class Group(object):
    def __init__(self, gid, group_data=None):
        self.tree = dir.Tree()
        self.gid = gid
        self.base_dn = settings.group_dn
        self.ldap_query = settings.group_query % (self.gid)
        self.exists = True
        if has_rfc2307bis():
            print has_rfc2307bis()
            self.rfc2307bis = True
        else:
            settings.use_memberuid = True
            self.rfc2307bis = False
        groups = self.tree.search(self.base_dn, search_filter=self.ldap_query)
        if len(groups) > 1:
            raise dir.MultipleObjectsFound
        elif len(groups) == 1:<commit_msg>Remove unnecessary print().<commit_after># -*- coding: utf-8 -*-

# Copyright (c) 2013, Activision Publishing, Inc.
# Copyright (c) 2014, 2015 <NAME> <<EMAIL>>

# the cog project is free software under 3-clause BSD licence
# see the LICENCE file in the project root for copying terms

# user group object handling

import os
import sys
from functools import wraps

import ldap
import ldap.modlist as modlist

import cog.directory as dir
from cog.util.misc import loop_on
from cog.config.settings import Profiles
from cog.directory import has_rfc2307bis

settings = Profiles()
rfc2307bis_object_class = settings.rfc2307bis_group_object_class
rfc2307bis_member_attribute = settings.rfc2307bis_group_member_attribute


class Group(object):
    def __init__(self, gid, group_data=None):
        self.tree = dir.Tree()
        self.gid = gid
        self.base_dn = settings.group_dn
        self.ldap_query = settings.group_query % (self.gid)
        self.exists = True
        if has_rfc2307bis():
            self.rfc2307bis = True
        else:
            settings.use_memberuid = True
            self.rfc2307bis = False
        groups = self.tree.search(self.base_dn, search_filter=self.ldap_query)
        if len(groups) > 1:
            raise dir.MultipleObjectsFound
        elif len(groups) == 1:
{'fraction_non_alphanumeric': 0.08044224170796797, 'fraction_numerical': 0.03812428516965307, 'mean_word_length': 3.138801261829653, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '72463', 'n_tokens_mistral': 893, 'n_tokens_neox': 814, 'n_words': 229}