<commit_before>#!/usr/bin/env python

import yaml
import tasks
import sys
import argparse
import os

class color:
  PURPLE = '\033[95m'
  CYAN = '\033[96m'
  DARKCYAN = '\033[36m'
  BLUE = '\033[94m'
  GREEN = '\033[92m'
  YELLOW = '\033[93m'
  RED = '\033[91m'
  BOLD = '\033[1m'
  UNDERLINE = '\033[4m'
  END = '\033[0m'

def clear_todo():
  if os.path.exists('todo.yml'):
    os.unlink('todo.yml')

parser = argparse.ArgumentParser(description='Setup AWS services by settings given by sequence of tasks.')
parser.add_argument('-d', '--doc', help='show known commands and exit.', action='store_true')
parser.add_argument('--syntax-check', help='perform a syntax check on the playbook, but do not execute it', action='store_true')
parser.add_argument('path', help='path to folder with settings.', default=os.getcwd(), nargs='?')
args = parser.parse_args()

if args.doc:
  tasks.print_doc()
  sys.exit(0)

os.chdir(args.path)

print "Processing content of %s ..." % os.getcwd()
config = yaml.load(open('config.yml').read())
receipt = yaml.load(open('tasks.yml').read())

if os.path.exists('todo.yml'):
  todo = set(yaml.load(open('todo.yml').read()))
else:
  todo = set()
<commit_msg>V prikazove radce lze registrovat udalosti, ktere lze provadet<commit_after>#!/usr/bin/env python

import yaml
import tasks
import sys
import argparse
import os

class color:
  PURPLE = '\033[95m'
  CYAN = '\033[96m'
  DARKCYAN = '\033[36m'
  BLUE = '\033[94m'
  GREEN = '\033[92m'
  YELLOW = '\033[93m'
  RED = '\033[91m'
  BOLD = '\033[1m'
  UNDERLINE = '\033[4m'
  END = '\033[0m'

def clear_todo():
  if os.path.exists('todo.yml'):
    os.unlink('todo.yml')

parser = argparse.ArgumentParser(description='Setup AWS services by settings given by sequence of tasks.')
parser.add_argument('-d', '--doc', help='show known commands and exit.', action='store_true')
parser.add_argument('--syntax-check', help='perform a syntax check on the playbook, but do not execute it', action='store_true')
parser.add_argument('-r', '--register', help='explicitly register events to do (can be used more times)', action='append')
parser.add_argument('path', help='path to folder with settings.')
args = parser.parse_args()

if args.doc:
  tasks.print_doc()
  sys.exit(0)

os.chdir(args.path)

print "Processing content of %s ..." % os.getcwd()
config = yaml.load(open('config.yml').read())
receipt = yaml.load(open('tasks.yml').read())

if os.path.exists('todo.yml'):
  todo = set(yaml.load(open('todo.yml').read()))
else:
  todo = set()

if args.register:
  todo.update(args.register)

{'fraction_non_alphanumeric': 0.17683881064162754, 'fraction_numerical': 0.03755868544600939, 'mean_word_length': 4.463675213675214, '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': '384585', 'n_tokens_mistral': 1021, 'n_tokens_neox': 937, 'n_words': 230}