<commit_before>//
//  OperatorsView.swift
//  LaconicDemo
//
//  Created by <NAME> on 07.11.15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import Foundation
import UIKit


// MARK: Manipulating views

infix operator ~> { associativity left precedence 160 }

/**
Updates view's background color.
 
- Parameters:
    - view: View, which background color will be updated.
 
    - backgroundColor: New background color for specified view.
 
- returns: View with updated background color.
*/
func ~> (view: UIView, backgroundColor: UIColor) -> UIView {
    view.backgroundColor = backgroundColor
    return view
}

/**
Updates view's background color.
 
- Parameters:
    - view: View, which frame will be updated.
 
    - frame: New frame for specified view.
 
- returns: View with updated frame.
*/
func ~> (view: UIView, frame: CGRect) -> UIView {
    view.frame = frame
    return view
}

/**
Updates view's frame.
 
- Parameters:
    - view: View, which frame will be updated.
 
    - frameParameters: Structure containing values for new frame.
 
- returns: View with updated frame.
*/
func ~> (view: UIView, frameParameters: (x: Int, y: Int, width: Int, height: Int)) -> UIView {
    let frame = CGRect(x: frameParameters.x, y: frameParameters.y, width: frameParameters.width, height: frameParameters.height)
    view.frame = frame
    return view
}

/**
Updates view's frame.
 
- Parameters:
    - view: View, which frame will be updated.
 
    - frameParameters: Structure containing values for new frame.
 
- returns: View with updated frame.
*/
func ~> (view: UIView, frameParameters: (x: CGFloat, y: CGFloat, width: CGFloat, height: CGFloat)) -> UIView {
    let frame = CGRect(x: frameParameters.x, y: frameParameters.y, width: frameParameters.width, height: frameParameters.height)
    view.frame = frame
    return view
}

/**
Updates view's frame.
 
- Parameters:
    - view: View, which frame will be updated.
 
    - frameParameters: Structure containing values for new frame.
 
- returns: View with updated frame.
*/
func ~> (view: UIView, frameParameters: (x: Double, y: Double, width: Double, height: Double)) -> UIView {
    let frame = CGRect(x: frameParameters.x, y: frameParameters.y, width: frameParameters.width, height: frameParameters.height)
    view.frame = frame
    return view
}

/**
Updates view's background color.
 
- Parameters:
    - view: View, that will be added to container.
 
    - container: Superview for specified view.
 
- returns: View, that was added to container.
*/
func ~> (view: UIView, container: UIView) -> UIView {
    container.addSubview(view)
    return view
}


<commit_msg>Added public keyword to several operators<commit_after>//
//  OperatorsView.swift
//  LaconicDemo
//
//  Created by <NAME> on 07.11.15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import Foundation
import UIKit


// MARK: Manipulating views

infix operator ~> { associativity left precedence 160 }

/**
Updates view's background color.
 
- Parameters:
    - view: View, which background color will be updated.
 
    - backgroundColor: New background color for specified view.
 
- returns: View with updated background color.
*/
public func ~> (view: UIView, backgroundColor: UIColor) -> UIView {
    view.backgroundColor = backgroundColor
    return view
}

/**
Updates view's background color.
 
- Parameters:
    - view: View, which frame will be updated.
 
    - frame: New frame for specified view.
 
- returns: View with updated frame.
*/
public func ~> (view: UIView, frame: CGRect) -> UIView {
    view.frame = frame
    return view
}

/**
Updates view's frame.
 
- Parameters:
    - view: View, which frame will be updated.
 
    - frameParameters: Structure containing values for new frame.
 
- returns: View with updated frame.
*/
public func ~> (view: UIView, frameParameters: (x: Int, y: Int, width: Int, height: Int)) -> UIView {
    let frame = CGRect(x: frameParameters.x, y: frameParameters.y, width: frameParameters.width, height: frameParameters.height)
    view.frame = frame
    return view
}

/**
Updates view's frame.
 
- Parameters:
    - view: View, which frame will be updated.
 
    - frameParameters: Structure containing values for new frame.
 
- returns: View with updated frame.
*/
public func ~> (view: UIView, frameParameters: (x: CGFloat, y: CGFloat, width: CGFloat, height: CGFloat)) -> UIView {
    let frame = CGRect(x: frameParameters.x, y: frameParameters.y, width: frameParameters.width, height: frameParameters.height)
    view.frame = frame
    return view
}

/**
Updates view's frame.
 
- Parameters:
    - view: View, which frame will be updated.
 
    - frameParameters: Structure containing values for new frame.
 
- returns: View with updated frame.
*/
public func ~> (view: UIView, frameParameters: (x: Double, y: Double, width: Double, height: Double)) -> UIView {
    let frame = CGRect(x: frameParameters.x, y: frameParameters.y, width: frameParameters.width, height: frameParameters.height)
    view.frame = frame
    return view
}

/**
Updates view's background color.
 
- Parameters:
    - view: View, that will be added to container.
 
    - container: Superview for specified view.
 
- returns: View, that was added to container.
*/
public func ~> (view: UIView, container: UIView) -> UIView {
    container.addSubview(view)
    return view
}



{'fraction_non_alphanumeric': 0.11140186915887851, 'fraction_numerical': 0.00485981308411215, 'mean_word_length': 3.240095087163233, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 33, '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': '1768796', 'n_tokens_mistral': 1660, 'n_tokens_neox': 1554, 'n_words': 573}