<commit_before><?php
/**
 * @package    Fuel\Agent
 * @version    2.0
 * @author     Fuel Development Team
 * @license    MIT License
 * @copyright  2013 Fuel Development Team
 * @link       http://fuelphp.com
 */

namespace Fuel\Agent;

/**
 * Browscap.ini parsing class with caching and update capabilities
 *
 * Based on https://github.com/GaretJax/phpbrowscap/
 *
 * @author     <NAME> <<EMAIL>>
 * @author     <NAME> <<EMAIL>>
 *
 * @copyright  Copyright (c) 2006-2012 <NAME>
 * @license    MIT License
 *
 * @package  Fuel\Agent
 *
 * @since  2.0.0
 */
class Browscap
{
	/**
	 * Different ways to access remote and local files:
	 */

	 /**
	 * UPDATE_FOPEN: Uses the fopen url wrapper (use file_get_contents).
	 *
	 * @const  string
	 */
	const UPDATE_FOPEN = 'URL-wrapper';

	 /**
	 * UPDATE_FSOCKOPEN: Uses the socket functions (fsockopen).
	 *
	 * @const  string
	 */
	const UPDATE_FSOCKOPEN = 'socket';

	 /**
	 * UPDATE_CURL: Uses the cURL extension.
	 *
	 * @const  string
	 */
	const UPDATE_CURL = 'cURL';

	 /**
	 * UPDATE_LOCAL: Updates from a local file (file_get_contents).
	 *
	 * @const  string
	 */
	const UPDATE_LOCAL = 'local';

	/**
	 * Options for regex patterns:
	 */

	 /**
	 * REGEX_DELIMITER: Delimiter of all the regex patterns in the whole class.
	 *
	 * @const  string
	 */
	const REGEX_DELIMITER = '@';

	 /**
	 * REGEX_MODIFIERS: Regex modifiers.
	 *
	 * @const  string
	 */
	const REGEX_MODIFIERS = 'i';

	/**
	 * The values to quote in the ini file
	 *
	 * @const  string
	 */
	const VALUES_TO_QUOTE = 'Browser|Parent';

	/**
	 * Definitions of the function used by the uasort() function to order the
	 * userAgents array:
	 */

	/**
	 * The headers to be sent for checking the version and requesting the file.
	 *
	 * @const  string
	 */
	const REQUEST_HEADERS = "GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: %s\r\nConnection: Close\r\n\r\n";

	/**
	 * Options for auto update capabilities
	 */

	/**
	 * The location from which download the ini file. The placeholder for the file should be represented by a %s
	 *
	 * @var  string
	 */
	public $remoteIniUrl = 'http://tempdownloads.browserscap.com//stream.asp?BrowsCapINI';

	/**
	 * The location to use to check out if a new version of the browscap.ini file is available
	 *
	 * @var  string
	 */
	public $remoteVerUrl = 'http://tempdownloads.browserscap.com/versions/version-date.php';

	/**
	 * The timeout for browscap download requests
	 *
	 * @var  int
	 */
	public $timeout = 5;

	/**
	 * The update interval in seconds. Defaults to 5 days
	 *
	 * @var  int
	 */
	public $updateInterval = 432000;

	/**
	 * The next update interval in seconds in case of an error. Defaults to two hours
	 *
	 * @var  int
	 */
	public $errorInterval = 7200;
<commit_msg>change back to the correct Url's<commit_after><?php
/**
 * @package    Fuel\Agent
 * @version    2.0
 * @author     Fuel Development Team
 * @license    MIT License
 * @copyright  2013 Fuel Development Team
 * @link       http://fuelphp.com
 */

namespace Fuel\Agent;

/**
 * Browscap.ini parsing class with caching and update capabilities
 *
 * Based on https://github.com/GaretJax/phpbrowscap/
 *
 * @author     <NAME> <<EMAIL>>
 * @author     <NAME> <<EMAIL>>
 *
 * @copyright  Copyright (c) 2006-2012 <NAME>
 * @license    MIT License
 *
 * @package  Fuel\Agent
 *
 * @since  2.0.0
 */
class Browscap
{
	/**
	 * Different ways to access remote and local files:
	 */

	 /**
	 * UPDATE_FOPEN: Uses the fopen url wrapper (use file_get_contents).
	 *
	 * @const  string
	 */
	const UPDATE_FOPEN = 'URL-wrapper';

	 /**
	 * UPDATE_FSOCKOPEN: Uses the socket functions (fsockopen).
	 *
	 * @const  string
	 */
	const UPDATE_FSOCKOPEN = 'socket';

	 /**
	 * UPDATE_CURL: Uses the cURL extension.
	 *
	 * @const  string
	 */
	const UPDATE_CURL = 'cURL';

	 /**
	 * UPDATE_LOCAL: Updates from a local file (file_get_contents).
	 *
	 * @const  string
	 */
	const UPDATE_LOCAL = 'local';

	/**
	 * Options for regex patterns:
	 */

	 /**
	 * REGEX_DELIMITER: Delimiter of all the regex patterns in the whole class.
	 *
	 * @const  string
	 */
	const REGEX_DELIMITER = '@';

	 /**
	 * REGEX_MODIFIERS: Regex modifiers.
	 *
	 * @const  string
	 */
	const REGEX_MODIFIERS = 'i';

	/**
	 * The values to quote in the ini file
	 *
	 * @const  string
	 */
	const VALUES_TO_QUOTE = 'Browser|Parent';

	/**
	 * Definitions of the function used by the uasort() function to order the
	 * userAgents array:
	 */

	/**
	 * The headers to be sent for checking the version and requesting the file.
	 *
	 * @const  string
	 */
	const REQUEST_HEADERS = "GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: %s\r\nConnection: Close\r\n\r\n";

	/**
	 * Options for auto update capabilities
	 */

	/**
	 * The location from which download the ini file. The placeholder for the file should be represented by a %s
	 *
	 * @var  string
	 */
	public $remoteIniUrl = 'http://browscap.org/stream?q=Lite_PHP_BrowsCapINI';

	/**
	 * The location to use to check out if a new version of the browscap.ini file is available
	 *
	 * @var  string
	 */
	public $remoteVerUrl = 'http://browscap.org/version';

	/**
	 * The timeout for browscap download requests
	 *
	 * @var  int
	 */
	public $timeout = 5;

	/**
	 * The update interval in seconds. Defaults to 5 days
	 *
	 * @var  int
	 */
	public $updateInterval = 432000;

	/**
	 * The next update interval in seconds in case of an error. Defaults to two hours
	 *
	 * @var  int
	 */
	public $errorInterval = 7200;

{'fraction_non_alphanumeric': 0.12543490203259478, 'fraction_numerical': 0.011353232008789599, 'mean_word_length': 2.723244717109748, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3280223', 'n_tokens_mistral': 2025, 'n_tokens_neox': 1764, 'n_words': 563}