<commit_before><?php

/**
 * Return a URI to the icon.
 * @param string $context Context for the icon
 * @param string $name Name of the icon
 * @param integer $size Icon size
 * @return string URI to the icon
 */
function ti_get_image_uri($context, $name, $size=null) {
  $size = $size === null ? sfConfig::get('app_tango_icons_size', TangoIconsSize::EXTRA_SMALL) : $size;
  $size = TangoIconsSize::normalize($size);
  return sprintf('%s/sfTangoIconsPlugin/images/%dx%d/%s/%s.png',
    sfContext::getInstance()->getRequest()->getRelativeUrlRoot(),
    $size, $size, $context, $name);
}

/**
 * Return a URI to the action icon.
 * @param string $name Name of the action icon
 * @param integer $size Icon size
 * @return string URI to the action icon
 */
function ti_get_action_icon_uri($name, $size=null) {
    return ti_get_image_uri(TangoIconsAction::getContext(), $name, $size);
}

/**
 * Return a URI to the application icon.
 * @param string $name Name of the application icon
 * @param integer $size Icon size
 * @return string URI to the application icon
 */
function ti_get_application_icon_uri($name, $size=null) {
    return ti_get_image_uri(TangoIconsApplication::getContext(), $name, $size);
}
<commit_msg>add new helper functions<commit_after><?php

/**
 * Return a URI to the icon.
 * @param string $context Context for the icon
 * @param string $name Name of the icon
 * @param integer $size Icon size
 * @return string URI to the icon
 */
function ti_get_image_uri($context, $name, $size=null) {
  $size = $size === null ? sfConfig::get('app_tango_icons_size', TangoIconsSize::EXTRA_SMALL) : $size;
  $size = TangoIconsSize::normalize($size);
  return sprintf('%s/sfTangoIconsPlugin/images/%dx%d/%s/%s.png',
    sfContext::getInstance()->getRequest()->getRelativeUrlRoot(),
    $size, $size, $context, $name);
}

/**
 * Return a URI to the action icon.
 * @param string $name Name of the action icon
 * @param integer $size Icon size
 * @return string URI to the action icon
 */
function ti_get_action_icon_uri($name, $size=null) {
    return ti_get_image_uri(TangoIconsAction::getContext(), $name, $size);
}

/**
 * Return a URI to the application icon.
 * @param string $name Name of the application icon
 * @param integer $size Icon size
 * @return string URI to the application icon
 */
function ti_get_application_icon_uri($name, $size=null) {
    return ti_get_image_path(TangoIconsApplication::getContext(), $name, $size);
}

/**
 * Return a URI to the category icon.
 * @param string $name Name of the category icon
 * @param integer $size Icon size
 * @return string URI to the category icon
 */
function ti_get_category_icon_uri($name, $size) {
    return ti_get_image_path('categories', $name, $size);
}

/**
 * Return a URI to the device icon.
 * @param string $name Name of the device icon
 * @param integer $size Icon size
 * @return string URI to the device icon
 */
function ti_get_device_icon_uri($name, $size) {
    return ti_get_image_path('devices', $name, $size);
}

/**
 * Return a URI to the emblem icon.
 * @param string $name Name of the emblem icon
 * @param integer $size Icon size
 * @return string URI to the emblem icon
 */
function ti_get_emblem_icon_uri($name, $size) {
    return ti_get_image_path('emblems', $name, $size);
}

/**
 * Return a URI to the emot icon.
 * @param string $name Name of the emot icon
 * @param integer $size Icon size
 * @return string URI to the emot icon
 */
function ti_get_emot_icon_uri($name, $size) {
    return ti_get_image_path('emotes', $name, $size);
}

/**
 * Return a URI to the mime type icon.
 * @param string $name Name of the mime type icon
 * @param integer $size Icon size
 * @return string URI to the mime type icon
 */
function ti_get_mime_type_icon_uri($name, $size) {
    return ti_get_image_path('mimetypes', $name, $size);
}

/**
 * Return a URI to the place icon.
 * @param string $name Name of the place icon
 * @param integer $size Icon size
 * @return string URI to the place icon
 */
function ti_get_place_icon_uri($name, $size) {
    return ti_get_image_path('places', $name, $size);
}
{'fraction_non_alphanumeric': 0.12616136919315404, 'fraction_numerical': 0.0, 'mean_word_length': 4.454666666666666, 'pattern_counts': {'":': 0, '<': 5, '<?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': '222057', 'n_tokens_mistral': 1303, 'n_tokens_neox': 1308, 'n_words': 448}