Changeset 79729d5 in flex_extract.git for source/python/mods
- Timestamp:
- Mar 8, 2019, 4:07:28 PM (5 years ago)
- Branches:
- master, ctbto, dev
- Children:
- d727af2
- Parents:
- 82c2959
- Location:
- source/python/mods
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
source/python/mods/__init__.py
r25b14be r79729d5 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 # -*- coding: utf-8 -*- 3 3 #******************************************************************************* -
source/python/mods/checks.py
rf20af73 r79729d5 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 # -*- coding: utf-8 -*- 3 3 #******************************************************************************* … … 31 31 except ImportError: 32 32 import builtins as exceptions 33 from .tools import my_error, silent_remove34 33 from datetime import datetime 35 34 import numpy as np 35 from .tools import my_error, silent_remove 36 36 # ------------------------------------------------------------------------------ 37 37 # FUNCTIONS -
source/python/mods/disaggregation.py
r6f951ca r79729d5 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 # -*- coding: utf-8 -*- 3 3 #******************************************************************************* -
source/python/mods/get_mars_data.py
rf20af73 r79729d5 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 # -*- coding: utf-8 -*- 3 3 #******************************************************************************* … … 176 176 with open(marsfile, 'w') as f: 177 177 f.write('request_number' + ', ') 178 f.write(', '.join(str(key) for key in sorted(attrs. iterkeys())))178 f.write(', '.join(str(key) for key in sorted(attrs.keys()))) 179 179 f.write('\n') 180 180 -
source/python/mods/prepare_flexpart.py
rf20af73 r79729d5 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 # -*- coding: utf-8 -*- 3 3 #******************************************************************************* -
source/python/mods/profiling.py
r25b14be r79729d5 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 # -*- coding: utf-8 -*- 3 3 #************************************************************************ … … 66 66 result = fn(*args, **kwargs) 67 67 t2 = time.time() 68 print("@timefn:" + fn. func_name+ " took " + str(t2 - t1) + " seconds")68 print("@timefn:" + fn.__name__ + " took " + str(t2 - t1) + " seconds") 69 69 70 70 return result -
source/python/mods/tools.py
rf20af73 r79729d5 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 # -*- coding: utf-8 -*- 3 3 #******************************************************************************* … … 368 368 stderr=subprocess.PIPE, 369 369 bufsize=1) 370 pout = p.communicate(input=message + '\n\n')[0]370 pout = p.communicate(input=message.encode() + '\n\n')[0] 371 371 except ValueError as e: 372 372 print('... ERROR: ' + str(e)) … … 433 433 ''' 434 434 try: 435 pools = map(tuple, args)* kwds.get('repeat', 1)435 pools = [tuple(arg) for arg in args] * kwds.get('repeat', 1) 436 436 result = [[]] 437 437 for pool in pools: … … 533 533 ipar = [] 534 534 for par in cpar: 535 for k, v in table.ite ritems():535 for k, v in table.items(): 536 536 if par == k or par == v: 537 537 ipar.append(int(k)) … … 574 574 spar = [] 575 575 for par in cpar: 576 for k, v in table.ite ritems():576 for k, v in table.items(): 577 577 if par == k or par == v: 578 578 spar.append(k + '.128') … … 726 726 sys.exit('... ECACCESS-JOB-SUBMIT FAILED!') 727 727 728 return job_id 728 return job_id.decode() 729 729 730 730 … … 827 827 828 828 if not purefc: 829 it = ((end_date - start_date).days + 1) * 24 /int(dtime)829 it = ((end_date - start_date).days + 1) * 24 // int(dtime) 830 830 else: 831 831 # #no of step * #no of times * #no of days
Note: See TracChangeset
for help on using the changeset viewer.