<commit_before>//
//  TinyLayout.swift
//  Contra
//
//  Created by <NAME> on 01/02/15.
//  Copyright (c) 2015 RRocks. All rights reserved.
//

import Foundation
import UIKit


infix operator |=| { associativity right precedence 90 }
public func |=| (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) {
    (right.view, right.attri) |=| (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func |=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) {
    (right.view, right.attri) |=| (left.view, left.attri, 1,0)
}

public func |=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) {
    (right.view, right.attri) |=| (left.view, left.attri, 1,left.constant)
}

public func |=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) {

    if right.view.superview == nil {
        return
    }

    right.view.setTranslatesAutoresizingMaskIntoConstraints(false)

    right.view.superview!.addConstraint(NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .Equal, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant))
}


infix operator |=|& { associativity left }
public func |=|& (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) -> NSLayoutConstraint? {
    return (right.view, right.attri) |=|& (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func |=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) -> NSLayoutConstraint? {
    return (right.view, right.attri) |=|& (left.view, left.attri, 1,0)
}

public func |=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) -> NSLayoutConstraint? {
    return (right.view, right.attri) |=|& (left.view, left.attri, 1,left.constant)
}
public func |=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) -> NSLayoutConstraint? {

    if (right.view.superview == nil) {
        return nil
    }
    
    right.view.setTranslatesAutoresizingMaskIntoConstraints(false)

    return NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .Equal, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant)
}







infix operator >=| { associativity left }
public func >=| (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) {
    (right.view, right.attri) >=| (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func >=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) {
    (right.view, right.attri) >=| (left.view, left.attri, 1,0)
}

public func >=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) {
    (right.view, right.attri) >=| (left.view, left.attri, 1,left.constant)
}

public func >=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) {

    if right.view.superview == nil {
        return
    }

    right.view.superview!.addConstraint(NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .GreaterThanOrEqual, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant))
}

infix operator >=|& { associativity left }
public func >=|& (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) -> NSLayoutConstraint {
    return (right.view, right.attri) >=|& (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func >=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) -> NSLayoutConstraint {
    return (right.view, right.attri) >=|& (left.view, left.attri, 1,0)
}

public func >=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) -> NSLayoutConstraint {
    return (right.view, right.attri) >=|& (left.view, left.attri, 1,left.constant)
}
public func >=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) -> NSLayoutConstraint {

    right.view.setTranslatesAutoresizingMaskIntoConstraints(false)

    return NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .GreaterThanOrEqual, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant)
}







infix operator <=| { associativity left }
public func <=| (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) {
    (right.view, right.attri) <=| (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func <=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) {
    (right.view, right.attri) <=| (left.view, left.attri, 1,0)
}

public func <=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) {
    (right.view, right.attri) <=| (left.view, left.attri, 1,left.constant)
}

public func <=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) {

    if right.view.superview == nil {
        return
    }

    right.view.superview!.addConstraint(NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .LessThanOrEqual, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant))
}

infix operator <=|& { associativity left }
public func <=|& (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) -> NSLayoutConstraint {
    return (right.view, right.attri) <=|& (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func <=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) -> NSLayoutConstraint {
    return (right.view, right.attri) <=|& (left.view, left.attri, 1,0)
}

public func <=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) -> NSLayoutConstraint {
    return (right.view, right.attri) <=|& (left.view, left.attri, 1,left.constant)
}
public func <=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) -> NSLayoutConstraint {

    right.view.setTranslatesAutoresizingMaskIntoConstraints(false)

    return NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .LessThanOrEqual, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant)
}



<commit_msg>Return NSLayoutConstraint? for GreaterThanOrEqual >=|&  and  LessThanOrEqual <=|&<commit_after>//
//  TinyLayout.swift
//  Contra
//
//  Created by <NAME> on 01/02/15.
//  Copyright (c) 2015 RRocks. All rights reserved.
//

import Foundation
import UIKit


infix operator |=| { associativity right precedence 90 }
public func |=| (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) {
    (right.view, right.attri) |=| (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func |=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) {
    (right.view, right.attri) |=| (left.view, left.attri, 1,0)
}

public func |=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) {
    (right.view, right.attri) |=| (left.view, left.attri, 1,left.constant)
}

public func |=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) {

    if right.view.superview == nil {
        return
    }

    right.view.setTranslatesAutoresizingMaskIntoConstraints(false)

    right.view.superview!.addConstraint(NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .Equal, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant))
}


infix operator |=|& { associativity left }
public func |=|& (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) -> NSLayoutConstraint? {
    return (right.view, right.attri) |=|& (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func |=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) -> NSLayoutConstraint? {
    return (right.view, right.attri) |=|& (left.view, left.attri, 1,0)
}

public func |=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) -> NSLayoutConstraint? {
    return (right.view, right.attri) |=|& (left.view, left.attri, 1,left.constant)
}
public func |=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) -> NSLayoutConstraint? {

    if (right.view.superview == nil) {
        return nil
    }
    
    right.view.setTranslatesAutoresizingMaskIntoConstraints(false)

    return NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .Equal, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant)
}







infix operator >=| { associativity left }
public func >=| (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) {
    (right.view, right.attri) >=| (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func >=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) {
    (right.view, right.attri) >=| (left.view, left.attri, 1,0)
}

public func >=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) {
    (right.view, right.attri) >=| (left.view, left.attri, 1,left.constant)
}

public func >=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) {

    if right.view.superview == nil {
        return
    }

    right.view.superview!.addConstraint(NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .GreaterThanOrEqual, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant))
}

infix operator >=|& { associativity left }
public func >=|& (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) -> NSLayoutConstraint? {
    return (right.view, right.attri) >=|& (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func >=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) -> NSLayoutConstraint? {
    return (right.view, right.attri) >=|& (left.view, left.attri, 1,0)
}

public func >=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) -> NSLayoutConstraint? {
    return (right.view, right.attri) >=|& (left.view, left.attri, 1,left.constant)
}
public func >=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) -> NSLayoutConstraint? {

    right.view.setTranslatesAutoresizingMaskIntoConstraints(false)

    return NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .GreaterThanOrEqual, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant)
}







infix operator <=| { associativity left }
public func <=| (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) {
    (right.view, right.attri) <=| (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func <=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) {
    (right.view, right.attri) <=| (left.view, left.attri, 1,0)
}

public func <=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) {
    (right.view, right.attri) <=| (left.view, left.attri, 1,left.constant)
}

public func <=| (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) {

    if right.view.superview == nil {
        return
    }

    right.view.superview!.addConstraint(NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .LessThanOrEqual, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant))
}

infix operator <=|& { associativity left }
public func <=|& (right:(view:UIView, attri:NSLayoutAttribute), constant: CGFloat) -> NSLayoutConstraint? {
    return (right.view, right.attri) <=|& (nil, NSLayoutAttribute.NotAnAttribute, 1,constant)
}

public func <=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute)) -> NSLayoutConstraint? {
    return (right.view, right.attri) <=|& (left.view, left.attri, 1,0)
}

public func <=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, constant: CGFloat)) -> NSLayoutConstraint? {
    return (right.view, right.attri) <=|& (left.view, left.attri, 1,left.constant)
}
public func <=|& (right:(view:UIView, attri:NSLayoutAttribute), left:(view:UIView?, attri:NSLayoutAttribute, multiplier: CGFloat, constant:CGFloat)) -> NSLayoutConstraint? {

    right.view.setTranslatesAutoresizingMaskIntoConstraints(false)

    return NSLayoutConstraint(item: right.view, attribute: right.attri, relatedBy: .LessThanOrEqual, toItem: left.view, attribute: left.attri, multiplier: left.multiplier, constant: left.constant)
}




{'fraction_non_alphanumeric': 0.15682443190041975, 'fraction_numerical': 0.005210594876248371, 'mean_word_length': 5.986349848331648, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 62, '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': '4523903', 'n_tokens_mistral': 4698, 'n_tokens_neox': 4485, 'n_words': 882}