Last active
May 28, 2017 19:32
-
-
Save dylanbstorey/b5a5dbcff070e9533f377ae605298a46 to your computer and use it in GitHub Desktop.
2017-02-09-Doit_for_automating_tasks
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
Dummy File |
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
with open('Hello.txt','w') as f: | |
f.write('Hello World!') |
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
import glob | |
def task_ingest(): | |
file_deps = glob.glob('data/*.in') | |
for f in file_deps: | |
yield{ | |
'name' : 'ingest_{}'.format(f), | |
'actions' :['python Ingestor.py {}'.format(f)], | |
'file_dep': [f], | |
'targets' :['{}.out'.format(f)] | |
} |
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
import sys | |
import time | |
time.sleep(1) | |
with open('{}.out'.format(sys.argv[1]),'w') as f: | |
f.write('yay') |
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
Should I Say it? |
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
def task_hello_world(): | |
return{ | |
'actions' :['python HelloWorld.py'], | |
'file_dep':['ShouldISayHello'], | |
'targets' :['Hello.txt'] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment