<commit_before>//
//  SwipeUpCollectionControllerCollectionViewController.swift
//  SwipeUp
//
//  Created by <NAME> on 6/5/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import UIKit

class SwipeUpCollectionController: UICollectionViewController, SwipeUpCellDelegate {

    var items: NSMutableArray =  NSMutableArray(array: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }

    // MARK: UICollectionViewDataSource

    override func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int {
        return 1
    }

    override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return items.count
    }

    override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCellWithReuseIdentifier(SwipeUpCell.cellID(), forIndexPath: indexPath) as! SwipeUpCell
        let tagNumber = items[indexPath.item] as! NSNumber
        cell.configure(self, tag: tagNumber)
        // Configure the cell
    
        return cell
    }
    
    func swipeUpDidFinish(tag: NSNumber) {
        let lock = dispatch_queue_create("com.otanistudio.SwipeUp.lockQueue", nil)
        dispatch_sync(lock, { () -> Void in
            let indexToRemove = self.items.indexOfObject(tag)
            let indexPathToRemove = NSIndexPath(forItem: indexToRemove, inSection: 0)
            self.items.removeObjectAtIndex(indexToRemove)
            self.collectionView?.deleteItemsAtIndexPaths([indexPathToRemove])
        })
    }

}<commit_msg>swift equiv to pragma mark<commit_after>//
//  SwipeUpCollectionControllerCollectionViewController.swift
//  SwipeUp
//
//  Created by <NAME> on 6/5/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import UIKit

class SwipeUpCollectionController: UICollectionViewController, SwipeUpCellDelegate {

    var items: NSMutableArray =  NSMutableArray(array: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }

    // MARK: UICollectionViewDataSource

    override func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int {
        return 1
    }

    override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return items.count
    }

    override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCellWithReuseIdentifier(SwipeUpCell.cellID(), forIndexPath: indexPath) as! SwipeUpCell
        let tagNumber = items[indexPath.item] as! NSNumber
        cell.configure(self, tag: tagNumber)
        // Configure the cell
    
        return cell
    }
    
    // MARK: SwipeUpCellDelegate
    
    func swipeUpDidFinish(tag: NSNumber) {
        let lock = dispatch_queue_create("com.otanistudio.SwipeUp.lockQueue", nil)
        dispatch_sync(lock, { () -> Void in
            let indexToRemove = self.items.indexOfObject(tag)
            let indexPathToRemove = NSIndexPath(forItem: indexToRemove, inSection: 0)
            self.items.removeObjectAtIndex(indexToRemove)
            self.collectionView?.deleteItemsAtIndexPaths([indexPathToRemove])
        })
    }

}
{'fraction_non_alphanumeric': 0.09027169149868536, 'fraction_numerical': 0.012854221443178498, 'mean_word_length': 3.2323856613102597, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '3420607', 'n_tokens_mistral': 1043, 'n_tokens_neox': 988, 'n_words': 222}