<commit_before># Tested with Python 2.7.6 (OS X), 2.7.8(CYGWIN), 2.7.9(OS X/Linux),
# 3.4.3(OS X/Linux)
import os
import sys
import time
import datetime
import getpass
import shlex
import subprocess
import logging

# Backup your Digitalocean Droplets
__version__ = '1.0.7'
__author__ = '<NAME> ( https://corndogcomputers.com )'
__author_email__ = '<EMAIL>'
__license__ = 'The MIT License (MIT)'
__copyright__ = 'Copyright (c) 2015 <NAME>'


class Backup(object):

    # Attributes accepted at creation time:
    #     droplet: Droplet - droplet obj
    #     ssh_user: str - user for rsync connections when connecting to droplet
    #     ssh_key: str - ssh key file (full path/key_name) NO PASSWORD ACCESS
    #     remote_dirs: list() - list of directories to rsync from droplet to local
    #     rsync_excludes: list() - list of  rsync excludes
    #     snapshot_hour: int - the hour of day to create a snapshot
    #     keep_snapshots: int - number of backup snapshots to keep
    #     backup_dir: str - the local folder for your droplet backups
    #     delay: int - api delay between calls

    def __init__(self, *args, **kwargs):
        self.success = None  # completion bool
        self.delay = 5  # delay between api calls
        self.ssh_user = ''  # ssh user name
        self.ssh_key = ''  # ssh key
        self.remote_dirs = []  # droplet directories to rsync
        self.rsync_excludes = []  # excludes for rsync
        self.freshlog = False  # start a new log if true
        self.use_ip = False  # use ip instead of droplet name for ssh
        self.user = getpass.getuser()  # local system username
        self.home = os.path.expanduser('~')  # local system home path
        self.backup_dir = '%s/Droplets' % self.home  # backup dir<commit_msg>cleanup<commit_after># Tested with Python 2.7.6 (OS X), 2.7.8(CYGWIN), 2.7.9(OS X/Linux),
# 3.4.3(OS X/Linux)
import os
import sys
import time
import datetime
import getpass
import shlex
import subprocess
import logging

# Backup your Digitalocean Droplets
__version__ = '1.0.7'
__author__ = '<NAME> ( https://corndogcomputers.com )'
__author_email__ = '<EMAIL>'
__license__ = 'The MIT License (MIT)'
__copyright__ = 'Copyright (c) 2015 <NAME>'


class Backup(object):

    # droplet: Droplet - droplet obj
    # ssh_user: str - user for rsync connections when connecting to droplet
    # ssh_key: str - ssh key file (full path/key_name) NO PASSWORD ACCESS
    # remote_dirs: list() - list of directories to rsync from droplet to local
    # rsync_excludes: list() - list of  rsync excludes
    # snapshot_hour: int - the hour of day to create a snapshot
    # keep_snapshots: int - number of backup snapshots to keep
    # backup_dir: str - the local folder for your droplet backups
    # delay: int - api delay between calls

    def __init__(self, *args, **kwargs):
        self.success = None  # completion bool
        self.delay = 5  # delay between api calls
        self.ssh_user = ''  # ssh user name
        self.ssh_key = ''  # ssh key
        self.remote_dirs = []  # droplet directories to rsync
        self.rsync_excludes = []  # excludes for rsync
        self.freshlog = False  # start a new log if true
        self.use_ip = False  # use ip instead of droplet name for ssh
        self.user = getpass.getuser()  # local system username
        self.home = os.path.expanduser('~')  # local system home path
        self.backup_dir = '%s/Droplets' % self.home  # backup dir
{'fraction_non_alphanumeric': 0.09411085450346421, 'fraction_numerical': 0.011547344110854504, 'mean_word_length': 2.8372093023255816, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '337289', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1061, 'n_words': 382}