<commit_before><?php if (! defined('BASEPATH')) exit('No direct script access allowed');


/**
 * Returns the URL for serving raw content from the CDN
 *
 * @param	string $object The ID of the object to serve
 * @param	boolean $force_download Whether or not the URL should stream to the browser, or forcibly download
 * @return	string
 */
if (!function_exists('cdn_serve'))
{
	function cdn_serve($object, $force_download = FALSE)
	{
		get_instance()->load->library('cdn/cdn');

		return get_instance()->cdn->url_serve($object, $force_download);
	}
}


// --------------------------------------------------------------------------


/**
 * Returns the URL for serving raw content from the CDN
 *
 * @param	array	$object	An array of IDs to zip together
 * @return	string
 */
if (!function_exists('cdn_serve_zipped'))
{
	function cdn_serve_zipped($objects, $filename = 'download.zip')
	{
		get_instance()->load->library('cdn/cdn');

		return get_instance()->cdn->url_serve_zipped($objects, $filename);
	}
}


// --------------------------------------------------------------------------


/**
 * Returns the URL for a thumbnail generated on the CDN
 *
 * @param	string	$bucket	The bucket which the image resides in
 * @param	string	$file	The filename of the image we're 'thumbing'
 * @param	string	$width	The width of the thumbnail
 * @param	string	$height	The height of the thumbnail
 * @return	string
 */
if (!function_exists('cdn_thumb'))
{
	function cdn_thumb($object, $width, $height)
	{
		get_instance()->load->library('cdn/cdn');

		return get_instance()->cdn->url_thumb($object, $width, $height);
	}
}


// --------------------------------------------------------------------------


/**
 * Returns the URL for a scaled image generated on the CDN
 *
 * @param	string	$bucket	The bucket which the image resides in
 * @param	string	$file	The filename of the image we're 'scaling'
 * @param	string	$width	The width of the scaled image
 * @param	string	$height	The height of the scaled image
 * @return	string
 */
if (!function_exists('cdn_scale'))
{
	function cdn_scale($object, $width, $height)
	{
		get_instance()->load->library('cdn/cdn');

		return get_instance()->cdn->url_scale($object, $width, $height);
	}
}


// --------------------------------------------------------------------------


/**
 * Returns the URL for a placeholder graphic
 *
 * @param	string	$width	The width of the placeholder
 * @param	string	$height	The height of the placeholder
 * @param	string	$border	The width of the border, if any
 * @return	string
 */
if (!function_exists('cdn_placeholder'))
{
	function cdn_placeholder($width = 100, $height = 100, $border = 0)
	{
		get_instance()->load->library('cdn/cdn');

		return get_instance()->cdn->url_placeholder($width, $height, $border);
	}
}


// --------------------------------------------------------------------------


/**
 * Returns the URL for a blank avatar graphic
 *
 * @param	string	$width	The width of the placeholder
 * @param	string	$height	The height of the placeholder
 * @param	string	$border	The width of the border, if any
 * @return	string
 */
if (!function_exists('cdn_blank_avatar'))
{
	function cdn_blank_avatar($width = 100, $height = 100, $sex = 'male')<commit_msg>Change of default blank avatar<commit_after><?php if (! defined('BASEPATH')) exit('No direct script access allowed');


/**
 * Returns the URL for serving raw content from the CDN
 *
 * @param	string $object The ID of the object to serve
 * @param	boolean $force_download Whether or not the URL should stream to the browser, or forcibly download
 * @return	string
 */
if (!function_exists('cdn_serve'))
{
	function cdn_serve($object, $force_download = FALSE)
	{
		get_instance()->load->library('cdn/cdn');

		return get_instance()->cdn->url_serve($object, $force_download);
	}
}


// --------------------------------------------------------------------------


/**
 * Returns the URL for serving raw content from the CDN
 *
 * @param	array	$object	An array of IDs to zip together
 * @return	string
 */
if (!function_exists('cdn_serve_zipped'))
{
	function cdn_serve_zipped($objects, $filename = 'download.zip')
	{
		get_instance()->load->library('cdn/cdn');

		return get_instance()->cdn->url_serve_zipped($objects, $filename);
	}
}


// --------------------------------------------------------------------------


/**
 * Returns the URL for a thumbnail generated on the CDN
 *
 * @param	string	$bucket	The bucket which the image resides in
 * @param	string	$file	The filename of the image we're 'thumbing'
 * @param	string	$width	The width of the thumbnail
 * @param	string	$height	The height of the thumbnail
 * @return	string
 */
if (!function_exists('cdn_thumb'))
{
	function cdn_thumb($object, $width, $height)
	{
		get_instance()->load->library('cdn/cdn');

		return get_instance()->cdn->url_thumb($object, $width, $height);
	}
}


// --------------------------------------------------------------------------


/**
 * Returns the URL for a scaled image generated on the CDN
 *
 * @param	string	$bucket	The bucket which the image resides in
 * @param	string	$file	The filename of the image we're 'scaling'
 * @param	string	$width	The width of the scaled image
 * @param	string	$height	The height of the scaled image
 * @return	string
 */
if (!function_exists('cdn_scale'))
{
	function cdn_scale($object, $width, $height)
	{
		get_instance()->load->library('cdn/cdn');

		return get_instance()->cdn->url_scale($object, $width, $height);
	}
}


// --------------------------------------------------------------------------


/**
 * Returns the URL for a placeholder graphic
 *
 * @param	string	$width	The width of the placeholder
 * @param	string	$height	The height of the placeholder
 * @param	string	$border	The width of the border, if any
 * @return	string
 */
if (!function_exists('cdn_placeholder'))
{
	function cdn_placeholder($width = 100, $height = 100, $border = 0)
	{
		get_instance()->load->library('cdn/cdn');

		return get_instance()->cdn->url_placeholder($width, $height, $border);
	}
}


// --------------------------------------------------------------------------


/**
 * Returns the URL for a blank avatar graphic
 *
 * @param	string	$width	The width of the placeholder
 * @param	string	$height	The height of the placeholder
 * @param	string	$border	The width of the border, if any
 * @return	string
 */
if (!function_exists('cdn_blank_avatar'))
{
	function cdn_blank_avatar($width = 100, $height = 100, $sex = '')
{'fraction_non_alphanumeric': 0.23247175359851416, 'fraction_numerical': 0.004024144869215292, 'mean_word_length': 2.5369458128078817, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, 'https://': 0, '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': '3673053', 'n_tokens_mistral': 1953, 'n_tokens_neox': 1808, 'n_words': 608}