<commit_before>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
'use strict';

import types = require('vs/base/common/types');
import * as Platform from 'vs/base/common/platform';

interface ISafeWindow {
	Worker: any;
}

interface ISafeDocument {
	URL:string;
	createElement(tagName:'div'):HTMLDivElement;
	createElement(tagName:string):HTMLElement;
}

interface INavigator {
	userAgent:string;
}

interface ILocation {
	search: string;
}

interface IGlobalScope {
	window:ISafeWindow;
	navigator:INavigator;
	parent:IGlobalScope;
	document:ISafeDocument;
	history: {
		pushState:any
	};
	isTest:boolean;
	location: ILocation;
}

var globals = <IGlobalScope><any> (typeof self === 'object' ? self : global);

// MAC:
// chrome: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.100 Safari/535.2"
// safari: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"
//
// WINDOWS:
// chrome: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.102 Safari/535.2"
// IE: "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC LM 8; InfoPath.3; Zune 4.7)"
// Opera:	"Opera/9.80 (Windows NT 6.1; U; en) Presto/2.9.168 Version/11.52"
// FF: "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0"

// LINUX:
// chrome: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36"
// firefox: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0"

var userAgent = globals.navigator ? globals.navigator.userAgent : '';
var isTest = !!globals.isTest;
var isPseudo = globals.document && globals.document.URL.match(/[^\?]*\?[^\#]*pseudo=true/);<commit_msg>Included Edge UserAgent<commit_after>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
'use strict';

import types = require('vs/base/common/types');
import * as Platform from 'vs/base/common/platform';

interface ISafeWindow {
	Worker: any;
}

interface ISafeDocument {
	URL:string;
	createElement(tagName:'div'):HTMLDivElement;
	createElement(tagName:string):HTMLElement;
}

interface INavigator {
	userAgent:string;
}

interface ILocation {
	search: string;
}

interface IGlobalScope {
	window:ISafeWindow;
	navigator:INavigator;
	parent:IGlobalScope;
	document:ISafeDocument;
	history: {
		pushState:any
	};
	isTest:boolean;
	location: ILocation;
}

var globals = <IGlobalScope><any> (typeof self === 'object' ? self : global);

// MAC:
// chrome: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.100 Safari/535.2"
// safari: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"
//
// WINDOWS:
// chrome: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.102 Safari/535.2"
// IE: "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC LM 8; InfoPath.3; Zune 4.7)"
// Opera:	"Opera/9.80 (Windows NT 6.1; U; en) Presto/2.9.168 Version/11.52"
// FF: "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0"
// Edge: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246"

// LINUX:
// chrome: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36"
// firefox: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0"

var userAgent = globals.navigator ? globals.navigator.userAgent : '';
var isTest = !!globals.isTest;
var isPseudo = globals.document && globals.document.URL.match(/[^\?]*\?[^\#]*pseudo=true/);
{'fraction_non_alphanumeric': 0.2299325647161192, 'fraction_numerical': 0.09092886665216446, 'mean_word_length': 2.8412698412698414, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5875955', 'n_tokens_mistral': 1946, 'n_tokens_neox': 1695, 'n_words': 397}