<commit_before>//
//  RenderViewController.swift
//  sandbox
//
//  Created by color_box on 2017/03/04.
//  Copyright © 2017年 sonson. All rights reserved.
//

import UIKit

class RenderViewController: UIViewController {


    var renderers:[Renderer] = []

    @IBOutlet weak var scrollView: UIScrollView!


    override func viewDidLoad() {
        super.viewDidLoad()

        renderers.append(LineGraphRenderer())
        renderers.append(LineGraphRenderer())
        renderers.append(LineGraphRenderer())
        renderers.append(LineGraphRenderer())

    }


    override func viewWillAppear(_ animated: Bool) {
        self.render()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }


    func render(){

        let size = self.view.frame.size
        // renderer 取り出してscrollviewに追加
        for renderer in renderers {
            let imageView = UIImageView(image: renderer.render(size: size))
            imageView.frame.origin = CGPoint(x: 0, y: scrollView.contentSize.height)
            scrollView.addSubview(imageView)
            scrollView.contentSize.height += size.height
        }
    }


}<commit_msg>Fix image size<commit_after>//
//  RenderViewController.swift
//  sandbox
//
//  Created by color_box on 2017/03/04.
//  Copyright © 2017年 sonson. All rights reserved.
//

import UIKit

class RenderViewController: UIViewController {


    var renderers:[Renderer] = []

    @IBOutlet weak var scrollView: UIScrollView!


    override func viewDidLoad() {
        super.viewDidLoad()

        renderers.append(LineGraphRenderer())
        renderers.append(LineGraphRenderer())
        renderers.append(LineGraphRenderer())
        renderers.append(LineGraphRenderer())

    }


    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        self.render()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }


    func render(){

        let size = self.view.frame.size
        // renderer 取り出してscrollviewに追加
        for renderer in renderers {
            let image = renderer.render(size: size)

            let imageView = UIImageView(image: image)
            imageView.frame.size = size
            imageView.contentMode = .scaleToFill
            imageView.frame.origin = CGPoint(x: 0, y: scrollView.contentSize.height)
            scrollView.addSubview(imageView)
            scrollView.contentSize.height += size.height
        }
    }


}
{'fraction_non_alphanumeric': 0.09687750200160128, 'fraction_numerical': 0.010408326661329063, 'mean_word_length': 2.451657458563536, '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': '1203470', 'n_tokens_mistral': 767, 'n_tokens_neox': 702, 'n_words': 148}