This repository was archived by the owner on Dec 27, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 103
103
104
104
# Mac OS nonsense:
105
105
.DS_Store
106
+
107
+ # kubernetes stuff
108
+ kubernetes /jobs /
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ import sys
3
+ from boto3 import Session
4
+
5
+ if __name__ == "__main__" :
6
+ if len (sys .argv ) > 1 :
7
+ subject = sys .argv [1 ]
8
+
9
+ session = Session ()
10
+ credentials = session .get_credentials ()
11
+ # Credentials are refreshable, so accessing your access key / secret key
12
+ # separately can lead to a race condition. Use this to get an actual matched
13
+ # set.
14
+ current_credentials = credentials .get_frozen_credentials ()
15
+
16
+ access_key = current_credentials .access_key
17
+ secret_key = current_credentials .secret_key
18
+
19
+ with open ("run_dmriprep.yml.tmpl" , 'r' ) as template :
20
+ with open ("jobs/job_{}.yml" .format (subject ), 'w' ) as f :
21
+ all_text = "\n " .join (template .readlines ())
22
+ all_text = all_text .replace ("{{subject}}" , subject )
23
+ all_text = all_text .replace ("{{access_key}}" , access_key )
24
+ all_text = all_text .replace ("{{secret_key}}" , secret_key )
25
+ f .write (all_text )
26
+
You can’t perform that action at this time.
0 commit comments