<commit_before>internal final class DecodingContainer<K: CodingKey>:
    KeyedDecodingContainerProtocol,
    UnkeyedDecodingContainer,
    SingleValueDecodingContainer
{
    typealias Key = K

    var codingPath: [CodingKey] {
        return decoder.codingPath
    }

    var count: Int? {
        return nil
    }

    var isAtEnd: Bool {
        return false
    }

    var currentIndex: Int {
        return 0
    }

    var allKeys: [K] {
        return []
    }

    let decoder: SQLiteRowDecoder
    init(decoder: SQLiteRowDecoder) {
        self.decoder = decoder
    }

    func contains(_ key: K) -> Bool {
        let col = SQLiteColumn(name: key.stringValue)
        return decoder.row.fields.keys.contains(col)
    }

    func decodeNil(forKey key: K) throws -> Bool {
        return decoder.row[key.stringValue]?.isNull ?? true
    }

    func decode(_ type: Bool.Type, forKey key: K) throws -> Bool {
        fatalError("unimplemented")
    }

    func decode(_ type: Int.Type, forKey key: K) throws -> Int {
        guard let int = decoder.row[key.stringValue]?.fuzzyInt else {
            fatalError("No int found at key `\(key.stringValue)`")
        }

        return int
    }

    func decode(_ type: Int8.Type, forKey key: K) throws -> Int8 {
        fatalError("unimplemented")
    }

    func decode(_ type: Int16.Type, forKey key: K) throws -> Int16 {
        fatalError("unimplemented")
    }
<commit_msg>Allow bools to be decoded in SQLite<commit_after>internal final class DecodingContainer<K: CodingKey>:
    KeyedDecodingContainerProtocol,
    UnkeyedDecodingContainer,
    SingleValueDecodingContainer
{
    typealias Key = K

    var codingPath: [CodingKey] {
        return decoder.codingPath
    }

    var count: Int? {
        return nil
    }

    var isAtEnd: Bool {
        return false
    }

    var currentIndex: Int {
        return 0
    }

    var allKeys: [K] {
        return []
    }

    let decoder: SQLiteRowDecoder
    init(decoder: SQLiteRowDecoder) {
        self.decoder = decoder
    }

    func contains(_ key: K) -> Bool {
        let col = SQLiteColumn(name: key.stringValue)
        return decoder.row.fields.keys.contains(col)
    }

    func decodeNil(forKey key: K) throws -> Bool {
        return decoder.row[key.stringValue]?.isNull ?? true
    }

    func decode(_ type: Bool.Type, forKey key: K) throws -> Bool {
        guard let bool = decoder.row[key.stringValue]?.fuzzyBool else {
            fatalError("No bool found at key `\(key.stringValue)`")
        }
        return bool
    }

    func decode(_ type: Int.Type, forKey key: K) throws -> Int {
        guard let int = decoder.row[key.stringValue]?.fuzzyInt else {
            fatalError("No int found at key `\(key.stringValue)`")
        }

        return int
    }

    func decode(_ type: Int8.Type, forKey key: K) throws -> Int8 {
        fatalError("unimplemented")
    }

    func decode(_ type: Int16.Type, forKey key: K) throws -> Int16 {
        fatalError("unimplemented")
    }

{'fraction_non_alphanumeric': 0.10179045092838196, 'fraction_numerical': 0.004641909814323607, 'mean_word_length': 2.2336548767416935, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '3005353', 'n_tokens_mistral': 971, 'n_tokens_neox': 902, 'n_words': 246}