<commit_before>#!/usr/bin/python
#Currently unstable. Don't use.

#determine where config files are
import subprocess
import struct
#if needed install dropbox


#if dropbox is set up


def install_dropbox():
    if((struct.calcsize("P") *8) is 32):
    #TODO: insert code to check if already installed    
        subprocess.call('cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -', shell = True)
        subprocess.call('~/.dropbox-dist/dropboxd', shell=True)#TODO download management
    elif((struct.calcsize("P") * 8) is 64):
        pass #TODO: 64bit
#todo determine if you can pass parameters to this.

#download dropbox control script



#TODO: set apt-name
apt = "apt-get"

def install_git():
    subprocess.call("sudo " + apt + " install git -y", shell=True)


def config_git(email, name):
    subprocess.call("git config --global user.email " + email, shell=True)
    subprocess.call("git config --global user.name " + name, shell=True)

# config_git("<EMAIL>", "'<NAME>'")
def config_git_editor(editor):
    #TODO: Code to verify editor is in quotes
    subprocess.call('git config --global core.editor ' + editor, shell=True)

def config_gitignore(gitignore):
    subprocess.call('git config --global core.excludesfile ' + gitignore, shell=True)

def set_ssh_config(config):
    subprocess.call("ln -ifb " + config + " ~/.ssh/config",shell=True)

def set_aliases(aliases):
    subprocess.call("ln -ifb " + aliases + " ~/.bash_aliases", shell=True)

def set_profile(profile):
    subprocess.call("ln -ifb " + profile + " ~/.profile", shell=True)

def set_bashrc(bashrc):
    subprocess.call("ln -ifb " + bashrc + " ~/.bashrc", shell=True)

install_dropbox()
install_git()
config_git("<EMAIL>", "'<NAME>'")
config_git_editor('"vim"')
config_gitignore("~/Dropbox/config/.gitignore_global")
set_ssh_config("~/Dropbox/config/ssh_config")
set_aliases("~/Dropbox/config/.bash_aliases")
set_profile("~/Dropbox/config/.profile")
set_bashrc("~/Dropbox/config/.bashrc")<commit_msg>Break work into two stages<commit_after>#!/usr/bin/python
#Currently unstable. Don't use.

#determine where config files are
import subprocess
import struct
#if needed install dropbox


#if dropbox is set up


def install_dropbox():
    if((struct.calcsize("P") *8) is 32):
    #TODO: insert code to check if already installed    
        subprocess.call('cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -', shell = True)
        subprocess.call('~/.dropbox-dist/dropboxd', shell=True)#TODO download management
    elif((struct.calcsize("P") * 8) is 64):
        pass #TODO: 64bit
#todo determine if you can pass parameters to this.

#download dropbox control script



#TODO: set apt-name
apt = "apt-get"

def install_git():
    subprocess.call("sudo " + apt + " install git -y", shell=True)


def config_git(email, name):
    subprocess.call("git config --global user.email " + email, shell=True)
    subprocess.call("git config --global user.name " + name, shell=True)

# config_git("<EMAIL>", "'<NAME>'")
def config_git_editor(editor):
    #TODO: Code to verify editor is in quotes
    subprocess.call('git config --global core.editor ' + editor, shell=True)

def config_gitignore(gitignore):
    subprocess.call('git config --global core.excludesfile ' + gitignore, shell=True)

def set_ssh_config(config):
    subprocess.call("ln -ifb " + config + " ~/.ssh/config",shell=True)

def set_aliases(aliases):
    subprocess.call("ln -ifb " + aliases + " ~/.bash_aliases", shell=True)

def set_profile(profile):
    subprocess.call("ln -ifb " + profile + " ~/.profile", shell=True)

def set_bashrc(bashrc):
    subprocess.call("ln -ifb " + bashrc + " ~/.bashrc", shell=True)

def part_a():
    install_dropbox()
    install_git()
    config_git("<EMAIL>", "'<NAME>'")
    config_git_editor('"vim"')
def part_b():
    config_gitignore("~/Dropbox/config/.gitignore_global")
    set_ssh_config("~/Dropbox/config/ssh_config")
    set_aliases("~/Dropbox/config/.bash_aliases")
    set_profile("~/Dropbox/config/.profile")
    set_bashrc("~/Dropbox/config/.bashrc")

part_a()
#part_b()

{'fraction_non_alphanumeric': 0.15662943176299174, 'fraction_numerical': 0.0048567265662943174, 'mean_word_length': 4.168130489335006, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '73011', 'n_tokens_mistral': 1463, 'n_tokens_neox': 1388, 'n_words': 329}