This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Fortran namelist parser. Converts nameslists to python dictionaries. | |
Should be fairly robust. Cannot be used for verifying fortran namelists as it | |
is rather forgiving. | |
Error messages during parsing are kind of messy right now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import multiprocessing as mp | |
import time | |
#max number to look up to | |
max_number = 10000 | |
#four processes per cpu | |
num_processes = mp.cpu_count() * 4 | |
def chunks(seq, chunks): |