<commit_before>import Foundation

class FDatabaseGifsUserItem:FDatabaseProtocol
{
    var identifier:String?
    var parent:FDatabaseProtocol?
    let mark:DGif.Mark
    
    init(
        user:FDatabaseGifsUser,
        identifier:String,
        mark:DGif.Mark)
    {
        self.identifier = identifier
        self.mark = mark
        parent = user
    }
    
    required init?(json:Any)
    {
        guard
            
            let rawUsers:[String:Any] = json as? [String:AnyObject]
            
            else
        {
            return nil
        }
        
        var users:[FDatabaseCountriesItemUser] = []
        let usersIds:[String] = Array(rawUsers.keys)
        
        for userId:String in usersIds
        {
            guard
                
                let rawUser:Any = rawUsers[userId],
                let user:FDatabaseCountriesItemUser = FDatabaseCountriesItemUser(
                    json:rawUser)
                
                else
            {
                continue
            }
            
            user.identifier = userId
            users.append(user)
        }
        
        self.users = users
    }
}<commit_msg>Parse user item<commit_after>import Foundation

class FDatabaseGifsUserItem:FDatabaseProtocol
{
    var identifier:String?
    var parent:FDatabaseProtocol?
    let mark:DGif.Mark
    
    var json:Any?
    {
        get
        {
            return mark.rawValue
        }
    }
    
    init(
        user:FDatabaseGifsUser,
        identifier:String,
        mark:DGif.Mark)
    {
        self.identifier = identifier
        self.mark = mark
        parent = user
    }
    
    required init?(json:Any)
    {
        guard
            
            let rawMark:Int16 = json as? Int16,
            let mark:DGif.Mark = DGif.Mark(rawValue:rawMark)
        
        else
        {
            return nil
        }
        
        self.mark = mark
    }
}
{'fraction_non_alphanumeric': 0.06925064599483204, 'fraction_numerical': 0.0020671834625322996, 'mean_word_length': 1.2616822429906542, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6958587', 'n_tokens_mistral': 538, 'n_tokens_neox': 533, 'n_words': 98}