<commit_before>__author__ = 'Taio'

import os
from utils.noflib import Noflib
import logging

logger = logging.getLogger('install-modules')
logging.basicConfig(filename='install-modules.log', level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')


run = Noflib()




def get_modules():
    '''get modules from github'''
    run.execute_get_output('git', 'clone', 'https://github.com/rthalley/dnspython.git')

def install_modules():
    '''install dnspython to package-sites'''
    run.execute_get_output('python', 'setup.py', 'install')


def main():
    if not os.path.exists('/var/log/get-dns'):
        logger.info('Making directory /var/log/get-dns')
        run.execute_get_output('sudo', 'mkdir', '/var/log/get-dns')

    logger.info('Getting modules')
    get_modules()
    logger.info('Installing modules')
    install_modules()



if __name__ == '__main__':
    if os.getuid() == 0:
        main()
    else:
        print 'You do not have permission, please run as root.'
        exit()<commit_msg>Add log location<commit_after>__author__ = 'Taio'

import os
from utils.noflib import Noflib
import logging

logger = logging.getLogger('install-modules')
logging.basicConfig(filename='/var/log/install-modules.log', level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')


run = Noflib()




def get_modules():
    '''get modules from github'''
    run.execute_get_output('git', 'clone', 'https://github.com/rthalley/dnspython.git')

def install_modules():
    '''install dnspython to package-sites'''
    run.execute_get_output('python', 'setup.py', 'install')


def main():
    if not os.path.exists('/var/log/get-dns'):
        logger.info('Making directory /var/log/get-dns')
        run.execute_get_output('sudo', 'mkdir', '/var/log/get-dns')

    logger.info('Getting modules')
    get_modules()
    logger.info('Installing modules')
    install_modules()



if __name__ == '__main__':
    if os.getuid() == 0:
        main()
    else:
        print 'You do not have permission, please run as root.'
        exit()
{'fraction_non_alphanumeric': 0.16251198465963568, 'fraction_numerical': 0.0009587727708533077, 'mean_word_length': 3.679372197309417, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7416927', 'n_tokens_mistral': 722, 'n_tokens_neox': 689, 'n_words': 149}