<commit_before># ............................................................................................... #
#
# Copyright (c) 2012-2015 Institut National des Sciences Appliquées de Lyon (INSA-Lyon)
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# ............................................................................................... #

----
This module provides helper functions to deal with ANSI escape codes for console outputs.

All function names are self-explanatory. Note that `ansi_likely_supported` tests if the current
operating system is _likely_ to support ANSI codes. It merely checks that the host operating
system is not MS Windows.

See also: [Wikipedia on ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
----
module gololang.AnsiCodes

function ansi_likely_supported = ->
  not System.getProperty("os.name"): contains("Windows")

function reset = -> print("\u001B[0m")

function bold           = -> print("\u001B[1m")
function underscore     = -> print("\u001B[4m")
function blink          = -> print("\u001B[5m")
function reverse_video  = -> print("\u001B[7m")
function concealed      = -> print("\u001B[8m")

function fg_black   = -> print("\u001B[30m")
function fg_red     = -> print("\u001B[31m")
function fg_green   = -> print("\u001B[32m")
function fg_yellow  = -> print("\u001B[33m")
function fg_blue    = -> print("\u001B[34m")
function fg_magenta = -> print("\u001B[35m")
function fg_cyan    = -> print("\u001B[36m")
function fg_white   = -> print("\u001B[37m")

function bg_black   = -> print("\u001B[40m")
function bg_red     = -> print("\u001B[41m")<commit_msg>Minor tweaks<commit_after># ............................................................................................... #
#
# Copyright (c) 2012-2015 Institut National des Sciences Appliquées de Lyon (INSA-Lyon)
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# ............................................................................................... #

----
This module provides helper functions to deal with ANSI escape codes for console outputs.

All function names are self-explanatory. Note that `likelySupported` tests if the current
operating system is _likely_ to support ANSI codes. It merely checks that the host operating
system is not MS Windows, which does not support ANSI codes without a 3rd-party driver.

See also: [Wikipedia on ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
----
module gololang.AnsiCodes

function likelySupported = ->
  not System.getProperty("os.name"): contains("Windows")

function reset = -> print("\u001B[0m")

function bold           = -> print("\u001B[1m")
function underscore     = -> print("\u001B[4m")
function blink          = -> print("\u001B[5m")
function reverse_video  = -> print("\u001B[7m")
function concealed      = -> print("\u001B[8m")

function fg_black   = -> print("\u001B[30m")
function fg_red     = -> print("\u001B[31m")
function fg_green   = -> print("\u001B[32m")
function fg_yellow  = -> print("\u001B[33m")
function fg_blue    = -> print("\u001B[34m")
function fg_magenta = -> print("\u001B[35m")
function fg_cyan    = -> print("\u001B[36m")
function fg_white   = -> print("\u001B[37m")

function bg_black   = -> print("\u001B[40m")
function bg_red     = -> print("\u001B[41m")
{'fraction_non_alphanumeric': 0.2218014606437652, 'fraction_numerical': 0.04679469840411144, 'mean_word_length': 2.5319961795606494, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 37, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '7293054', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1064, 'n_words': 310}