<commit_before>//
//  UIDevice+AppIdioms.swift
//  Swiftlier
//
//  Created by <NAME> on 2/22/17.
//  Copyright © 2017 Drewag. All rights reserved.
//

#if os(iOS)
import UIKit

public enum AppIdiom {
    case phone, pad
}

extension UIDevice {
    public var appIdiom: AppIdiom {
        switch self.userInterfaceIdiom {
        case .pad, .tv, .carPlay, .unspecified:
            return .pad
        case .phone:
            return .phone
        }
    }
}
#endif<commit_msg>[NF] Add modelName to UIDevice<commit_after>//
//  UIDevice+AppIdioms.swift
//  Swiftlier
//
//  Created by <NAME> on 2/22/17.
//  Copyright © 2017 Drewag. All rights reserved.
//

#if os(iOS)
import UIKit

public enum AppIdiom {
    case phone, pad
}

extension UIDevice {
    public var appIdiom: AppIdiom {
        switch self.userInterfaceIdiom {
        case .pad, .tv, .carPlay, .unspecified:
            return .pad
        case .phone:
            return .phone
        }
    }

    public var modelName: String {
        var systemInfo = utsname()
        uname(&systemInfo)
        let machineMirror = Mirror(reflecting: systemInfo.machine)
        return machineMirror.children.reduce("") { identifier, element in
            guard let value = element.value as? Int8, value != 0 else { return identifier }
            return identifier + String(UnicodeScalar(UInt8(value)))
        }
    }
}
#endif
{'fraction_non_alphanumeric': 0.10678210678210678, 'fraction_numerical': 0.015151515151515152, 'mean_word_length': 2.109865470852018, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6517404', 'n_tokens_mistral': 468, 'n_tokens_neox': 434, 'n_words': 124}