Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Krish Moodbidri
rc-scripts
Commits
9fc46275
Commit
9fc46275
authored
Feb 19, 2019
by
Krish Moodbidri
Browse files
calculate wait time between SLURM job submit and job start; using pandas
parents
Changes
1
Hide whitespace changes
Inline
Side-by-side
sacct_submit_to_start_time_calculator.ipynb
0 → 100644
View file @
9fc46275
%% Cell type:code id: tags:
```
python
!
sacct
-
u
$
USER
-
o
JobID
,
Submit
,
Start
--
starttime
$
MM
/
$
DD
-
n
>
$
FILE
```
%% Cell type:code id: tags:
```
python
import
datetime
import
csv
import
pandas
as
pd
with
open
(
$
FILE
)
as
csvfile
:
readCSV
=
csv
.
reader
(
csvfile
,
delimiter
=
' '
)
for
row
in
readCSV
:
d1
=
pd
.
to_datetime
(
row
[
0
],
format
=
'%Y-%m-%dT%H:%M:%S'
)
d2
=
pd
.
to_datetime
(
row
[
1
],
format
=
'%Y-%m-%dT%H:%M:%S'
)
print
(
d2
-
d1
)
```
%% Cell type:code id: tags:
```
python
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment