<commit_before>#
# Docker, Boot2Docker and Docker Compose helpers. Also initializes boot2docker's
# environment variables if they aren't set
#
# Authors: <NAME> <<EMAIL>>
#

if (( ! $+commands[docker] )); then
  return 1
fi

if (( $+commands[boot2docker] )); then
  alias b2d="boot2docker"
  alias b2di="$(boot2docker shellinit 2>/dev/null)"

  # Start boot2docker if it isn't running
  boot2docker_status=$(boot2docker status)

  if [[ "${boot2docker_status}" = "running" ]]; then
    $(boot2docker shellinit 2>/dev/null)
  fi

  unset boot2docker_status
fi

if (( $+commands[docker-machine] )); then
  alias dm="docker-machine"
  alias dmi="eval \"$(docker-machine env boot2docker)\""

  # Start the machine if it isn't running
  boot2docker_status="$(docker-machine ls | grep '^boot2docker' | awk '{ print $3 }')"

  if [[ "${boot2docker_status:l}" = "running" ]]; then
    eval "$(docker-machine env boot2docker)"
  fi
fi

if (( $+commands[docker-compose] )); then
  alias compose="docker-compose"
fi

#
# Some aliases
#
alias dockit="docker run -it --rm"<commit_msg>execute subshell at expansion time...<commit_after>#
# Docker, Boot2Docker and Docker Compose helpers. Also initializes boot2docker's
# environment variables if they aren't set
#
# Authors: <NAME> <<EMAIL>>
#

if (( ! $+commands[docker] )); then
  return 1
fi

if (( $+commands[boot2docker] )); then
  alias b2d="boot2docker"
  alias b2di="\$(boot2docker shellinit 2>/dev/null)"

  # Start boot2docker if it isn't running
  boot2docker_status=$(boot2docker status)

  if [[ "${boot2docker_status}" = "running" ]]; then
    $(boot2docker shellinit 2>/dev/null)
  fi

  unset boot2docker_status
fi

if (( $+commands[docker-machine] )); then
  alias dm="docker-machine"
  alias dmi="eval \"\$(docker-machine env boot2docker)\""

  # Start the machine if it isn't running
  boot2docker_status="$(docker-machine ls | grep '^boot2docker' | awk '{ print $3 }')"

  if [[ "${boot2docker_status:l}" = "running" ]]; then
    eval "$(docker-machine env boot2docker)"
  fi
fi

if (( $+commands[docker-compose] )); then
  alias compose="docker-compose"
fi

#
# Some aliases
#
alias dockit="docker run -it --rm"
{'fraction_non_alphanumeric': 0.15267527675276754, 'fraction_numerical': 0.02029520295202952, 'mean_word_length': 4.4772727272727275, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '340946', 'n_tokens_mistral': 815, 'n_tokens_neox': 718, 'n_words': 203}