<commit_before>//
//  Util.swift
//  Few
//
//  Created by <NAME> on 12/28/14.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import Foundation

func GET(URL: NSURL, fn: (NSDictionary!, NSURLResponse!, NSError!) -> ()) {
	NSURLSession.sharedSession().dataTaskWithURL(URL) { (data, response, error) in
		if data == nil {
			fn(nil, response, error)
			return
		}

		var JSONError: NSError?
		let result = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions(0), error: &JSONError) as? NSDictionary
		fn(result, response, JSONError)
	}.resume()
}

func uniqueKey(file: String = __FILE__, line: Int = __LINE__) -> String {
	return "\(file)+\(line)"
}
<commit_msg>Include the column in the unique key.<commit_after>//
//  Util.swift
//  Few
//
//  Created by <NAME> on 12/28/14.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import Foundation

func GET(URL: NSURL, fn: (NSDictionary!, NSURLResponse!, NSError!) -> ()) {
	NSURLSession.sharedSession().dataTaskWithURL(URL) { (data, response, error) in
		if data == nil {
			fn(nil, response, error)
			return
		}

		var JSONError: NSError?
		let result = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions(0), error: &JSONError) as? NSDictionary
		fn(result, response, JSONError)
	}.resume()
}

func uniqueKey(file: String = __FILE__, line: Int = __LINE__, column: Int = __COLUMN__) -> String {
	return "\(file)+\(line)+\(column)"
}

{'fraction_non_alphanumeric': 0.1553398058252427, 'fraction_numerical': 0.015256588072122053, 'mean_word_length': 4.02787456445993, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '3347351', 'n_tokens_mistral': 536, 'n_tokens_neox': 492, 'n_words': 133}