Update scripts with division factor
Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
parent
98257b746c
commit
d151b9b3e4
@ -1,15 +1,16 @@
|
||||
import sys
|
||||
import re
|
||||
|
||||
if len(sys.argv) != 5:
|
||||
print("Usage: python preds.py <iaca> <mca> <osaca> <uica>")
|
||||
if len(sys.argv) != 6:
|
||||
print("Usage: python preds.py <iaca> <mca> <osaca> <uica> <div_factor>")
|
||||
sys.exit(1)
|
||||
|
||||
iaca_pred = float(sys.argv[1])
|
||||
mca_pred = float(sys.argv[2])
|
||||
osaca_pred = float(sys.argv[3])
|
||||
uica_pred = float(sys.argv[4])
|
||||
preds = [iaca_pred, mca_pred, osaca_pred, uica_pred]
|
||||
div_factor = float(sys.argv[5])
|
||||
preds = [x / div_factor for x in [iaca_pred, mca_pred, osaca_pred, uica_pred]]
|
||||
|
||||
start = -4.0
|
||||
end = 36.0
|
||||
|
@ -1,17 +1,18 @@
|
||||
import sys
|
||||
import re
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: python string_to_agr.py input_filename")
|
||||
if len(sys.argv) != 3:
|
||||
print("Usage: python string_to_agr.py <input_filename> <div_factor>")
|
||||
sys.exit(1)
|
||||
|
||||
input_filename = sys.argv[1]
|
||||
div_factor = float(sys.argv[2])
|
||||
result_list = []
|
||||
|
||||
with open(input_filename, 'r') as file:
|
||||
for line in file:
|
||||
numbers = re.findall(r'\d+\.\d+', line)
|
||||
divided_numbers = [float(number) / 8 for number in numbers]
|
||||
divided_numbers = [float(number) / div_factor for number in numbers]
|
||||
result_list.append(divided_numbers)
|
||||
|
||||
start = -2.5
|
||||
|
Loading…
Reference in New Issue
Block a user