<commit_before>from django.core.management import BaseCommand
from fabric.state import output
import sys
from golive.stacks.stack import StackFactory, Stack
import yaml


class Command(BaseCommand):
    help = 'Creates a basic exampe configuration file'
    output['stdout'] = False

    example = """CONFIG:
    PLATFORM: DEDICATED
    STACK: CLASSIC

ENVIRONMENTS:
    DEFAULTS:
        INIT_USER: fatrix
        PROJECT_NAME: django_example
        PUBKEY: $HOME/user.pub
    TESTING:
        SERVERNAME: golive-sandbox1
        ROLES:
            APP_HOST:
                - testbox1
            DB_HOST:
                - testbox1
            WEB_HOST:
                - testbox1"""

    def handle(self, *args, **options):

        example_file = open(Stack.CONFIG, 'w')
        example_file.write(Command.example)
        example_file.close()

    def end(self):
        self.stdout.write('Done\n')<commit_msg>modify initial config<commit_after>from django.core.management import BaseCommand
from fabric.state import output
import sys
from golive.stacks.stack import StackFactory, Stack
import yaml


class Command(BaseCommand):
    help = 'Creates a basic exampe configuration file'
    output['stdout'] = False

    example = """CONFIG:
    PLATFORM: DEDICATED
    STACK: CLASSIC

ENVIRONMENTS:
    DEFAULTS:
        INIT_USER: root
        PROJECT_NAME: djangoproject
        PUBKEY: $HOME/.ssh/id_dsa.pub
    TESTING:
        SERVERNAME: testserver
        ROLES:
            APP_HOST:
                - testserver
            DB_HOST:
                - testserver
            WEB_HOST:
                - testserver"""

    def handle(self, *args, **options):

        example_file = open(Stack.CONFIG, 'w')
        example_file.write(Command.example)
        example_file.close()

    def end(self):
        self.stdout.write('Done\n')
{'fraction_non_alphanumeric': 0.08716838115863562, 'fraction_numerical': 0.002165674066053059, 'mean_word_length': 2.1972318339100347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4928681', 'n_tokens_mistral': 566, 'n_tokens_neox': 538, 'n_words': 129}