<commit_before>//
//  ViewController.swift
//  Scholarship
//
//  Created by <NAME> on 06/02/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import UIKit
import Cartography
import ReactiveCocoa

class WelcomeViewController: UIViewController {

    private lazy var avatarButton: UIButton = {
        let button = UIButton()
        button.backgroundColor = UIColor.redColor()
        button.layer.masksToBounds = true
        button.setImage(UIImage(named: "Laurin"), forState: .Normal)
        
        let images = [UIImage(named: "Laurin-wink"), UIImage(named: "Laurin-sarcastic")]
        
        let setImageAtIndex: (Int) -> () = { index in
            let image = images[index]
            button.setImage(image, forState: .Highlighted)
        }
        
        setImageAtIndex(0)
        button.rac_signalForControlEvents(.TouchUpInside).subscribeNext { _ in
            let index = Int(arc4random_uniform(UInt32(images.count)))
            setImageAtIndex(index)
        }
        
        button.rac_valuesForKeyPath("bounds", observer: self).subscribeNext { _ in
            button.layer.cornerRadius = button.bounds.height/2.0
        }
        
        return button
    }()
    
    private lazy var titleLabel: UILabel = {
        let label = UILabel()
        label.text = "Hi There!"
        label.font = UIFont.lightHelveticaNeueWithSize(24.0)
        label.numberOfLines = 1
        label.textColor = UIColor(white: 0.0, alpha: 0.8)
        label.textAlignment = .Center
        
        return label
        }()
    
    private lazy var textLabel: UILabel = {
        let label = UILabel()
        label.text = "My name is <NAME>. I’m a 20-year-old student living in Switzerland.\n \nI started programming when I was 14. With 15 I released my first iOS application.\nSince then, I have worked with various programming languages."
        label.font = UIFont.lightHelveticaNeueWithSize(18.0)
        label.numberOfLines = 0<commit_msg>Make easter egg less random<commit_after>//
//  ViewController.swift
//  Scholarship
//
//  Created by <NAME> on 06/02/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import UIKit
import Cartography
import ReactiveCocoa

class WelcomeViewController: UIViewController {

    private lazy var avatarButton: UIButton = {
        let button = UIButton()
        button.backgroundColor = UIColor.redColor()
        button.layer.masksToBounds = true
        button.setImage(UIImage(named: "Laurin"), forState: .Normal)
        
        let images = [UIImage(named: "Laurin-wink"), UIImage(named: "Laurin-sarcastic")]
        
        let setNewImage: () -> () = {
            var index = 0
            return {
                let image = images[index]
                button.setImage(image, forState: .Highlighted)
                
                index += 1
                if index >= images.count {
                    index = 0
                }
            }
        }()
        
        setNewImage()
        button.rac_signalForControlEvents(.TouchUpInside).subscribeNext { _ in
            setNewImage()
        }
        
        button.rac_valuesForKeyPath("bounds", observer: self).subscribeNext { _ in
            button.layer.cornerRadius = button.bounds.height/2.0
        }
        
        return button
    }()
    
    private lazy var titleLabel: UILabel = {
        let label = UILabel()
        label.text = "Hi There!"
        label.font = UIFont.lightHelveticaNeueWithSize(24.0)
        label.numberOfLines = 1
        label.textColor = UIColor(white: 0.0, alpha: 0.8)
        label.textAlignment = .Center
        
        return label
        }()
    
    private lazy var textLabel: UILabel = {
        let label = UILabel()
        label.text = "My name is <NAME>. I’m a 20-year-old student living in Switzerland.\n \nI started programming when I was 14. With 15 I released my first iOS application.\nSince then, I have worked with various programming languages."
        label.font = UIFont.lightHelveticaNeueWithSize(18.0)
        label.numberOfLines = 0
{'fraction_non_alphanumeric': 0.09778325123152709, 'fraction_numerical': 0.01650246305418719, 'mean_word_length': 2.041947565543071, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 12, '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': '2963751', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1153, 'n_words': 294}