comparison deep/stacked_dae/utils.py @ 278:43afd29f3dbd

Ajouté fonctionnalité pour réinsérer de nouvelles jobs aux paramètres choisis manuellement, en liste, pour repartir des jobs spécifiques qui ont crashé
author fsavard
date Wed, 24 Mar 2010 14:35:11 -0400
parents c8fe09a65039
children 206374eed2fb
comparison
equal deleted inserted replaced
268:b077d9e97a3b 278:43afd29f3dbd
39 def test_produit_cartesien_jobs(): 39 def test_produit_cartesien_jobs():
40 vals = {'a': [1,2], 'b': [3,4,5]} 40 vals = {'a': [1,2], 'b': [3,4,5]}
41 print produit_cartesien_jobs(vals) 41 print produit_cartesien_jobs(vals)
42 42
43 43
44 def jobs_from_reinsert_list(cols, job_vals):
45 job_list = []
46 for vals in job_vals:
47 job = DD()
48 for i, col in enumerate(cols):
49 job[col] = vals[i]
50 job_list.append(job)
51
52 return job_list
53
44 # taken from http://stackoverflow.com/questions/276052/how-to-get-current-cpu-and-ram-usage-in-python 54 # taken from http://stackoverflow.com/questions/276052/how-to-get-current-cpu-and-ram-usage-in-python
45 """Simple module for getting amount of memory used by a specified user's 55 """Simple module for getting amount of memory used by a specified user's
46 processes on a UNIX system. 56 processes on a UNIX system.
47 It uses UNIX ps utility to get the memory usage for a specified username and 57 It uses UNIX ps utility to get the memory usage for a specified username and
48 pipe it to awk for summing up per application memory usage and return the total. 58 pipe it to awk for summing up per application memory usage and return the total.