<commit_before># -*- coding: utf-8 -*-
'''
.. module:: genomics.popgen
   :synopsis: Population genetics/genomics
   :noindex:
   :copyright: Copyright 2014 by Tiago Antao
   :license: GNU Affero, see LICENSE for details

.. moduleauthor:: <NAME> <<EMAIL>>

'''<commit_msg>mapreduce<commit_after># -*- coding: utf-8 -*-
'''
.. module:: genomics.mapreduce
   :synopsis: MapReduce framework
   :noindex:
   :copyright: Copyright 2014 by <NAME>
   :license: GNU Affero, see LICENSE for details

.. moduleauthor:: <NAME> <<EMAIL>>

'''
import pickle
import tempfile

import genomics

mr_dir = genomics.cfg.mr_dir


def pickle_in(datum):
    w, fname = tempfile.mkstemp(dir=mr_dir)
    pickle.dump(datum, w)
    w.close()
    return fname
{'fraction_non_alphanumeric': 0.1446111869031378, 'fraction_numerical': 0.013642564802182811, 'mean_word_length': 3.7662337662337664, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '1053340', 'n_tokens_mistral': 263, 'n_tokens_neox': 251, 'n_words': 67}