<commit_before>//
//  PDFPage.swift
//  PDFGenerator
//
//  Created by <NAME> on 2016/06/21.
//
//

import Foundation
import UIKit


/**
 PDF page model.
 
 - WhitePage: A white view (CGSize)
 - View:      A view. (UIView)
 - Image:     An image (UIImage)
 - ImagePath: ImagePath: An image path (String)
 - Binary:    Binary data (NSData)
 - ImageRef:  Image ref (CGImage)
 */
public enum PDFPage {
    /// A white view (CGSize)
    case WhitePage(CGSize)
    /// A view. (UIView)
    case View(UIView)
    /// An image (UIImage)
    case Image(UIImage)
    /// ImagePath: An image path (String)
    case ImagePath(String)
    /// Binary data (NSData)
    case Binary(NSData)
    /// Image ref (CGImage)
    case ImageRef(CGImage)
    
    /**
     Convert views to PDFPage models.
     
     - parameter views: Array of `UIVIew`
     
     - returns: Array of `PDFPage`
     */
    static func pages(views: [UIView]) -> [PDFPage] {
        return views.map { .View($0) }
    }
    
    /**
     Convert images to PDFPage models.
     
     - parameter views: Array of `UIImage`
     
     - returns: Array of `PDFPage`
     */
    static func pages(images: [UIImage]) -> [PDFPage] {
        return images.map { .Image($0) }
    }
    
    /**
     Convert image path to PDFPage models.
     
     - parameter views: Array of `String`(image path)
     
     - returns: Array of `PDFPage`
     */
    static func pages(imagePaths: [String]) -> [PDFPage] {
        return imagePaths.map { .ImagePath($0) }
    }
}

/// PDF page size (pixel, 72dpi)
public struct PDFPageSize {
    private init() {}
    /// A4
    static let A4 = CGSize(width: 595.0, height: 842.0)
    /// B5
    static let B5 = CGSize(width: 516.0, height: 729.0)
}
<commit_msg>Fix PDFPageSize's access control (to public).<commit_after>//
//  PDFPage.swift
//  PDFGenerator
//
//  Created by <NAME> on 2016/06/21.
//
//

import Foundation
import UIKit


/**
 PDF page model.
 
 - WhitePage: A white view (CGSize)
 - View:      A view. (UIView)
 - Image:     An image (UIImage)
 - ImagePath: ImagePath: An image path (String)
 - Binary:    Binary data (NSData)
 - ImageRef:  Image ref (CGImage)
 */
public enum PDFPage {
    /// A white view (CGSize)
    case WhitePage(CGSize)
    /// A view. (UIView)
    case View(UIView)
    /// An image (UIImage)
    case Image(UIImage)
    /// ImagePath: An image path (String)
    case ImagePath(String)
    /// Binary data (NSData)
    case Binary(NSData)
    /// Image ref (CGImage)
    case ImageRef(CGImage)
    
    /**
     Convert views to PDFPage models.
     
     - parameter views: Array of `UIVIew`
     
     - returns: Array of `PDFPage`
     */
    static func pages(views: [UIView]) -> [PDFPage] {
        return views.map { .View($0) }
    }
    
    /**
     Convert images to PDFPage models.
     
     - parameter views: Array of `UIImage`
     
     - returns: Array of `PDFPage`
     */
    static func pages(images: [UIImage]) -> [PDFPage] {
        return images.map { .Image($0) }
    }
    
    /**
     Convert image path to PDFPage models.
     
     - parameter views: Array of `String`(image path)
     
     - returns: Array of `PDFPage`
     */
    static func pages(imagePaths: [String]) -> [PDFPage] {
        return imagePaths.map { .ImagePath($0) }
    }
}

/// PDF page size (pixel, 72dpi)
public struct PDFPageSize {
    private init() {}
    /// A4
    public static let A4 = CGSize(width: 595.0, height: 842.0)
    /// B5
    public static let B5 = CGSize(width: 516.0, height: 729.0)
}

{'fraction_non_alphanumeric': 0.13299377475947935, 'fraction_numerical': 0.01867572156196944, 'mean_word_length': 2.0136402387041774, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5293436', 'n_tokens_mistral': 1220, 'n_tokens_neox': 1189, 'n_words': 351}