<commit_before>MUSIC_HOST='music'

alias playing=music_status
alias play='music_control play; playing'
alias pause='music_control pause'
alias skip='music_control next; playing'
alias music="open http://$MUSIC_HOST"

# usage: 'music_control play', music_control pause'
function music_control() {
  echo "$1\nclose" | nc $MUSIC_HOST 6600 > /dev/null
}

function music_status() {
  echo "currentsong\nclose" | nc $MUSIC_HOST 6600 | grep -E "(^Artist|^Title|^Album|^file)"
}

# usage 'radio', 'radio 4'. Defaults to 6 music
function radio() {
  music_control "random 0"
  station=${1:-6}
  if [ $station -eq 6 ]; then
    playlist="BBC $station Music"
  else
    playlist="BBC Radio $station"
  fi
  music_control clear
  music_control "load \"radio/$playlist.m3u\""
  music_control play
}

# play 1 massive random playlist
function random() {
  music_control "random 1"
  music_control clear
  music_control "add music"
  music_control play
  playing
}

<commit_msg>use  as a shortcut to pause<commit_after>MUSIC_HOST='music'

alias playing=music_status
alias play='music_control play; playing'
alias pause='music_control pause'
alias p=pause
alias skip='music_control next; playing'
alias music="open http://$MUSIC_HOST"

# usage: 'music_control play', music_control pause'
function music_control() {
  echo "$1\nclose" | nc $MUSIC_HOST 6600 > /dev/null
}

function music_status() {
  echo "currentsong\nclose" | nc $MUSIC_HOST 6600 | grep -E "(^Artist|^Title|^Album|^file)"
}

# usage 'radio', 'radio 4'. Defaults to 6 music
function radio() {
  music_control "random 0"
  station=${1:-6}
  if [ $station -eq 6 ]; then
    playlist="BBC $station Music"
  else
    playlist="BBC Radio $station"
  fi
  music_control clear
  music_control "load \"radio/$playlist.m3u\""
  music_control play
}

# play 1 massive random playlist
function random() {
  music_control "random 1"
  music_control clear
  music_control "add music"
  music_control play
  playing
}


{'fraction_non_alphanumeric': 0.11912065439672802, 'fraction_numerical': 0.018404907975460124, 'mean_word_length': 4.705539358600583, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3045486', 'n_tokens_mistral': 705, 'n_tokens_neox': 656, 'n_words': 191}