<commit_before><?php
// lang is also passwed
$DISCOUNT_START = "2018-05-12 00:00";
$DISCOUNT_END = "2018-05-15 00:00";

$TEST_IP = '172.16.31.10';

date_default_timezone_set('UTC');
$iosVersion  = isset($_GET['os']) && $_GET['os'] == 'ios';
$appVersion3 = isset($_REQUEST['version']) && (strpos($_REQUEST['version'] , '3.') ) !== false;
$today = date("Y-m-d H:i");

if(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] == $TEST_IP) {
	echo file_get_contents("messages/test_motd.json");	
} else if($today > $DISCOUNT_START && $today < $DISCOUNT_END) {
	$start = date("d-m-Y H:i", strtotime($DISCOUNT_START));
	$end = date("d-m-Y H:i", strtotime($DISCOUNT_END));
	if($iosVersion) {
		// url supported: 
		// 1. screen in app [screen:in_apps], [in_app:<inappid>]
		// 2. http url supported
		$txt = file_get_contents("messages/discount_ios.json");
	} else {
		// url supported: 
		// 1. "osmand-market-app:net.osmand.plus" - market redirect
		// 2. http url supported
		$txt = file_get_contents("messages/discount.json");
	}
	$json = json_decode($txt);
	$json->start = $start;
	$json->end = $end;
	echo json_encode($json);
} else if(!$iosVersion && $appVersion3) {
	echo file_get_contents("messages/top_wikivoyage.json");		
} else {
	echo "{}"
}

?><commit_msg>Add world cup info<commit_after><?php
// lang is also passwed
$DISCOUNT_START = "2018-05-12 00:00";
$DISCOUNT_END = "2018-05-15 00:00";

$TEST_IP = '172.16.31.10';

date_default_timezone_set('UTC');
$iosVersion  = isset($_GET['os']) && $_GET['os'] == 'ios';
$appVersion3 = isset($_REQUEST['version']) && (strpos($_REQUEST['version'] , '3.') ) !== false;
$today = date("Y-m-d H:i");

if(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] == $TEST_IP) {
	echo file_get_contents("messages/test_motd.json");	
} else if($today > $DISCOUNT_START && $today < $DISCOUNT_END) {
	$start = date("d-m-Y H:i", strtotime($DISCOUNT_START));
	$end = date("d-m-Y H:i", strtotime($DISCOUNT_END));
	if($iosVersion) {
		// url supported: 
		// 1. screen in app [screen:in_apps], [in_app:<inappid>]
		// 2. http url supported
		$txt = file_get_contents("messages/discount_ios.json");
	} else {
		// url supported: 
		// 1. "osmand-market-app:net.osmand.plus" - market redirect
		// 2. http url supported
		$txt = file_get_contents("messages/discount.json");
	}
	$json = json_decode($txt);
	$json->start = $start;
	$json->end = $end;
	echo json_encode($json);
} else if(!$iosVersion && $appVersion3) {
	echo file_get_contents("messages/top_wikivoyage.json");		
} else {
	echo "{}";
}

?>
{'fraction_non_alphanumeric': 0.2123719464144996, 'fraction_numerical': 0.03152088258471237, 'mean_word_length': 4.7704545454545455, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5860797', 'n_tokens_mistral': 1068, 'n_tokens_neox': 984, 'n_words': 177}