<commit_before>from __future__ import division, unicode_literals, print_function

"""
Put data into mongo database
"""

import sys
import os
import json
import logging

from pymatgen.io.vaspio import Outcar

from matgendb.creator import VaspToDbTaskDrone, get_uri

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(name)s - %(levelname)s - %(message)s')
sh = logging.StreamHandler(stream=sys.stdout)
sh.setFormatter(formatter)
logger.addHandler(sh)


class MPINTVaspToDbTaskDrone(VaspToDbTaskDrone):  
    """
    
    modified VaspToDbTaskDrone
    
    """
    def __init__def __init__(self, host="127.0.0.1", port=27017, database="vasp",
                             user=None, password=<PASSWORD>, collection="nanoparticles",
                             parse_dos=False, compress_dos=False, simulate_mode=False,
                             additional_fields=None, update_duplicates=True,
                             mapi_key=None, use_full_uri=True, runs=None):
        """
        Additional_fields = {'authors':[a.as_dict() for a in self.authors],
                             'projects': ,
                              'refernces': ,
                              }
        """
        VaspToDbTaskDrone. __init__(self, host=host, port=port, database=database,
                                    user=user, password=password, collection=collection,
                                    parse_dos=parse_dos, compress_dos=compress_dos,
                                    simulate_mode=simulate_mode, additional_fields=additional_fields,
                                     update_duplicates=update_duplicates,
                                     mapi_key=mapi_key, use_full_uri=use_full_uri, runs=runs)


    def post_process(self, dir_name, d):
        """
        overridden
        adds system.json to the dictionary
        """<commit_msg>fixed typos<commit_after>from __future__ import division, unicode_literals, print_function

"""
Put data into mongo database
"""

import sys
import os
import json
import logging

from pymatgen.io.vaspio import Outcar

from matgendb.creator import VaspToDbTaskDrone, get_uri

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(name)s - %(levelname)s - %(message)s')
sh = logging.StreamHandler(stream=sys.stdout)
sh.setFormatter(formatter)
logger.addHandler(sh)


class MPINTVaspToDbTaskDrone(VaspToDbTaskDrone):  
    """
    
    modified VaspToDbTaskDrone
    
    """
    def __init__(self, host="127.0.0.1", port=27017, database="vasp",
                             user=None, password=<PASSWORD>, collection="nanoparticles",
                             parse_dos=False, compress_dos=False, simulate_mode=False,
                             additional_fields=None, update_duplicates=True,
                             mapi_key=None, use_full_uri=True, runs=None):
        """
        Additional_fields = {'authors':[a.as_dict() for a in self.authors],
                             'projects': ,
                              'refernces': ,
                              }
        """
        VaspToDbTaskDrone.__init__(self, host=host, port=port, database=database,
                                    user=user, password=password, collection=collection,
                                    parse_dos=parse_dos, compress_dos=compress_dos,
                                    simulate_mode=simulate_mode, additional_fields=additional_fields,
                                     update_duplicates=update_duplicates,
                                     mapi_key=mapi_key, use_full_uri=use_full_uri, runs=runs)


    def post_process(self, dir_name, d):
        """
        overridden
        adds system.json to the dictionary
        """
{'fraction_non_alphanumeric': 0.09112457203055044, 'fraction_numerical': 0.0057940479325783514, 'mean_word_length': 2.053054662379421, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6781010', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1051, 'n_words': 187}