<commit_before>#!venv/bin/python
"""Calico..

Usage:
  calicoctl master --ip=<IP>
  calicoctl node --ip=<IP>
  calicoctl status
  calicoctl reset
  calicoctl version
  calicoctl addgroup <GROUP>
  calicoctl addtogroup <CONTAINER_ID> <GROUP>


Options:
 --ip=<IP>    The local management address to use.
"""
#Useful docker aliases
# alias docker_kill_all='sudo docker kill $(docker ps -q)'
# alias docker_rm_all='sudo docker rm -v `docker ps -a -q -f status=exited`'

from subprocess import call, check_output, CalledProcessError
import os
from docopt import docopt
from sh import mkdir
from sh import docker
from sh import modprobe
from sh import grep
import etcd
import sys
import socket
import json
import uuid
from collections import namedtuple

mkdir_p = mkdir.bake('-p')
hostname = socket.gethostname()

# etcd paths for Calico
HOST_PATH = "/calico/host/%(hostname)s/"
MASTER_IP_PATH = "/calico/master/ip"
GROUPS_PATH = "/calico/network/group/"<commit_msg>Change how we're using the "sh" module to be compatible with PyInstaller<commit_after>#!venv/bin/python
"""Calico..

Usage:
  calicoctl master --ip=<IP>
  calicoctl node --ip=<IP>
  calicoctl status
  calicoctl reset
  calicoctl version
  calicoctl addgroup <GROUP>
  calicoctl addtogroup <CONTAINER_ID> <GROUP>


Options:
 --ip=<IP>    The local management address to use.
"""
#Useful docker aliases
# alias docker_kill_all='sudo docker kill $(docker ps -q)'
# alias docker_rm_all='sudo docker rm -v `docker ps -a -q -f status=exited`'

from subprocess import call, check_output, CalledProcessError
import os
from docopt import docopt
import etcd
import sys
import socket
import json
import uuid
from collections import namedtuple
import sh

mkdir = sh.Command._create('mkdir')
docker = sh.Command._create('docker')
modprobe = sh.Command._create('modprobe')
grep = sh.Command._create('grep')

mkdir_p = mkdir.bake('-p')

hostname = socket.gethostname()

# etcd paths for Calico
HOST_PATH = "/calico/host/%(hostname)s/"
MASTER_IP_PATH = "/calico/master/ip"
GROUPS_PATH = "/calico/network/group/"
{'fraction_non_alphanumeric': 0.10846303501945526, 'fraction_numerical': 0.0, 'mean_word_length': 4.745810055865922, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1140993', 'n_tokens_mistral': 717, 'n_tokens_neox': 695, 'n_words': 218}