Skip to content

Instantly share code, notes, and snippets.

@juwencheng
Last active May 12, 2017 01:51
Show Gist options
  • Save juwencheng/143b22536997cd0757491e044206cf4d to your computer and use it in GitHub Desktop.
Save juwencheng/143b22536997cd0757491e044206cf4d to your computer and use it in GitHub Desktop.
floyd tutorial demo
# coding=utf-8
print("Hello World!")
print("你好!")
# generate output file
floyd run "python floyd-tutorial-hello.py > /output/hello-output.txt"
# get the output id
floyd info [previouse run id]
# use output as input. the previous data will mount at /input folder, we can access it by /input/hello-output.txt
floyd run --data [output id] "python floyd-tutorial-read-output.py"
# coding=utf-8
with open('./hello-output.txt','r') as f:
print(f.read())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment