This file contains 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
""" | |
Provides functions for the purpose of parsing a Sun Grid Engine (SGE) | |
accounting file for job metadata. | |
""" | |
__author__ = "Sam Nicholls <msn@aber.ac.uk>" | |
__copyright__ = "Copyright (c) Sam Nicholls" | |
__version__ = "0.0.32" | |
__maintainer__ = "Sam Nicholls <msn@aber.ac.uk>" |
This file contains 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
y3 = [86,90,90,68,86,79,79,78,61,62,45,60] | |
y2 = [81,81,79,79,77,73,55,55,86,84,83,81] | |
# 8 modules per band | |
BAND_SIZE = 8 | |
BAND_DELTA = len(y3) - BAND_SIZE | |
# Extract BAND_SIZE best year 3 modules | |
y3_sorted = sorted(y3) | |
band_3 = y3_sorted[-BAND_SIZE:] |
This file contains 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
# awk 3.1.7 | |
# 1hr 1m | |
awk '$1 ~ /@/ {++c} END {print c}' $1 | |
# 1hr 1m | |
awk '/^@/ {c++} END {print c}' $1 | |
# 55m | |
awk '{if (substr($0,0,1) == "@") { ++c }} END {print c}' $1 |
NewerOlder