<commit_before>import socket
import inspect, os

dirpath = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) 

if 'eso-macbook' in socket.gethostname():
    execfile(os.path.join(dirpath,'run_pipeline_cyg.py'))
elif 'cleese' in socket.gethostname():
    execfile(os.path.join(dirpath,'run_pipeline_cleese.py'))
else:
    raise ValueError("Machine {0} not recognized.".format(socket.gethostname()))


try:
    label = "_v"+subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
except CalledProcessError:
    label = ""

logfile = ("".join([time.strftime("apexcmzpipeline{0}_%y_%m_%d_%H:%M:%S"),".log"])).format(label)

with log.log_to_file(logfile):
    for dataset in make_apex_cubes.datasets_ao:
        make_apex_cubes.build_cube_ao(window='high', datasets=[dataset],
                                      datapath=make_apex_cubes.aorawpath,
                                      outpath=make_apex_cubes.aopath,
                                      timewise_pca=True, pca_clean=True,
                                      freq=True,)

    for dataset in make_apex_cubes.datasets_2014:
        mapnames = make_apex_cubes.datasets_2014[dataset]

        build_cube_2014(mapnames,
                        datapath=make_apex_cubes.april2014path,
                        outpath=make_apex_cubes.april2014path,
                        lowhigh='low',
                        pca_clean=True,
                        pcakwargs={},
                        datasets=[dataset])

    for dataset in make_apex_cubes.datasets_2013:

        build_cube_2013(datapath=make_apex_cubes.june2013path,
                        outpath=make_apex_cubes.june2013path,
                        lowhigh='low',
                        pca_clean=True,
                        pcakwargs={},
                        datasets=[dataset])<commit_msg>namespace fix<commit_after>import socket
import inspect, os

dirpath = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) 

if 'eso-macbook' in socket.gethostname():
    execfile(os.path.join(dirpath,'run_pipeline_cyg.py'))
elif 'cleese' in socket.gethostname():
    execfile(os.path.join(dirpath,'run_pipeline_cleese.py'))
else:
    raise ValueError("Machine {0} not recognized.".format(socket.gethostname()))


try:
    label = "_v"+subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
except CalledProcessError:
    label = ""

logfile = ("".join([time.strftime("apexcmzpipeline{0}_%y_%m_%d_%H:%M:%S"),".log"])).format(label)

with log.log_to_file(logfile):
    for dataset in make_apex_cubes.datasets_2014:
        mapnames = make_apex_cubes.datasets_2014[dataset]

        make_apex_cubes.build_cube_2014(mapnames,
                                        datapath=make_apex_cubes.april2014path,
                                        outpath=make_apex_cubes.april2014path,
                                        lowhigh='low', pca_clean=True,
                                        pcakwargs={}, datasets=[dataset])

    for dataset in make_apex_cubes.datasets_2013:

        make_apex_cubes.build_cube_2013(datapath=make_apex_cubes.june2013path,
                                        outpath=make_apex_cubes.june2013path,
                                        lowhigh='low', pca_clean=True,
                                        pcakwargs={}, datasets=[dataset])

    for dataset in make_apex_cubes.datasets_ao:
        make_apex_cubes.build_cube_ao(window='high', datasets=[dataset],
                                      datapath=make_apex_cubes.aorawpath,
                                      outpath=make_apex_cubes.aopath,
                                      timewise_pca=True, pca_clean=True,
                                      freq=True,)

{'fraction_non_alphanumeric': 0.11137629276054097, 'fraction_numerical': 0.02015380535666932, 'mean_word_length': 2.064175467099919, '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': 15, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3500661', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1153, 'n_words': 140}