<commit_before>// The contents of this file will be executed before any of
// your view controllers are ever executed, including the index.
// You have access to all functionality on the `Alloy` namespace.
//
// This is a great place to do any initialization for your app
// or create any global variables/functions that you'd like to
// make available throughout your app. You can easily make things
// accessible globally by attaching them to the `Alloy.Globals`
// object. For example:
//
// Alloy.Globals.someGlobalFunction = function(){};

var NavigationController = require('navigationService/NavigationController');
Alloy.Globals.navController = new NavigationController();

var AnalyticsController = require('analyticService/analyticService');
Alloy.Globals.analyticsController = new AnalyticsController();

var AdminModeController = require('adminModeService/AdminModeController');
Alloy.Globals.adminModeController = new AdminModeController();

// The urls for Development, Quality Assurance, and Production
var rootWebServiceUrls = {
	"dev": 		"http://excl.dreamhosters.com/dev/wp-json/v01/excl/museum/81",
	"qa": 		"http://excl.dreamhosters.com/qa/wp-json/v01/excl/museum/81",
	"prod": 	"http://excl.dreamhosters.com/prod/wp-json/v01/excl/museum/81"
};

Alloy.Globals.isInDefaultWordpressEnviroment = function(){
	return this.rootWebServiceUrl == rootWebServiceUrls["prod"];
};

Alloy.Globals.setRootWebServiceFromUrls = function(key){
	if( rootWebServiceUrls[key] )
		Alloy.Globals.rootWebServiceUrl = rootWebServiceUrls[key];
};

Alloy.Globals.setRootWebServiceUrl = function(url){
	if( url )
		Alloy.Globals.rootWebServiceUrl = url;
};

Alloy.Globals.rootWebServiceUrl = rootWebServiceUrls["prod"];

Alloy.Globals.setPathForLibDirectory = function(libFile){
	if ( typeof Titanium == 'undefined') {
		lib = require("../../lib/" + libFile);
	} else {
		lib = require(libFile);
	}
	return lib;<commit_msg>Our app is saving the environment, one leaf node at a time<commit_after>// The contents of this file will be executed before any of
// your view controllers are ever executed, including the index.
// You have access to all functionality on the `Alloy` namespace.
//
// This is a great place to do any initialization for your app
// or create any global variables/functions that you'd like to
// make available throughout your app. You can easily make things
// accessible globally by attaching them to the `Alloy.Globals`
// object. For example:
//
// Alloy.Globals.someGlobalFunction = function(){};

var NavigationController = require('navigationService/NavigationController');
Alloy.Globals.navController = new NavigationController();

var AnalyticsController = require('analyticService/analyticService');
Alloy.Globals.analyticsController = new AnalyticsController();

var AdminModeController = require('adminModeService/AdminModeController');
Alloy.Globals.adminModeController = new AdminModeController();

var StorageService = require('storageService/storageService');
Alloy.Globals.storageService = new StorageService();

// The urls for Development, Quality Assurance, and Production
var rootWebServiceUrls = {
	"dev": 		"http://excl.dreamhosters.com/dev/wp-json/v01/excl/museum/81",
	"qa": 		"http://excl.dreamhosters.com/qa/wp-json/v01/excl/museum/81",
	"prod": 	"http://excl.dreamhosters.com/prod/wp-json/v01/excl/museum/81"
};

Alloy.Globals.isInDefaultWordpressEnviroment = function(){
	return this.rootWebServiceUrl == rootWebServiceUrls["prod"];
};

Alloy.Globals.setRootWebServiceFromUrls = function(key){
	if( rootWebServiceUrls[key] )
		Alloy.Globals.setRootWebServiceUrl(rootWebServiceUrls[key]);
};

Alloy.Globals.setRootWebServiceUrl = function(url){
	if( url ) {
		Alloy.Globals.rootWebServiceUrl = url;
		Alloy.Globals.storageService.setStringProperty("rootWebServiceURL", url);
	}
};

if (Alloy.Globals.storageService.getStringProperty("rootWebServiceURL")) {
	Alloy.Globals.setRootWebServiceUrl(Alloy.Globals.storageService.getStringProperty("rootWebServiceURL"));
} else {
	Alloy.Globals.setRootWebServiceFromUrls("prod");
}

Alloy.Globals.setPathForLibDirectory = function(libFile){
	if ( typeof Titanium == 'undefined') {
		lib = require("../../lib/" + libFile);
	} else {
		lib = require(libFile);
	}
	return lib;
{'fraction_non_alphanumeric': 0.12303357595679737, 'fraction_numerical': 0.005635125616341864, 'mean_word_length': 5.339285714285714, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6131788', 'n_tokens_mistral': 1368, 'n_tokens_neox': 1311, 'n_words': 304}