-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_funcs.py
59 lines (42 loc) · 1.62 KB
/
index_funcs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from saving_data import folderChreation, folderVhrideos, folderArudio
import threading
import argparse
def mkpaths(situ, numdaysubj=None, folder_name=None):
if situ == "tb":
path_day, path_data, path_figs, path_datalocal = folderChreation(
numdaysubj, "n", folder_name
)
path_videos = folderVhrideos(numdaysubj, "n", folder_name)
path_audio = folderArudio(numdaysubj, "n", folder_name)
elif situ == "ex":
path_day, path_data, path_figs, path_datalocal = folderChreation(
numdaysubj, "y", folder_name
)
path_videos = folderVhrideos(numdaysubj, "y", folder_name)
path_audio = folderArudio(numdaysubj, "y", folder_name)
return path_day, path_data, path_figs, path_datalocal, path_videos, path_audio
def parsingSituation():
parser = argparse.ArgumentParser(
description="Experimental situation: troubleshooting (tb) or experimenting (ex)"
)
parser.add_argument("-s", type=str)
parser.add_argument("-p", type=str, default=None)
parser.add_argument("-ns", type=str, default=None)
args = parser.parse_args()
part = args.p
situ = args.s
n_staircase = args.ns
return situ, part, n_staircase
def experiment_part():
parser = argparse.ArgumentParser(description="Experiment part: folder name")
args = parser.parse_args()
part = args.p
return part
def threadFunctions(funcs):
threads_start = []
for func in funcs:
threads_start.append(threading.Thread(target=func[0], args=func[1]))
for x in threads_start:
x.start()
for x in threads_start:
x.join()