Last active
June 3, 2018 18:59
-
-
Save brianspiering/4266a8ff476b60413bdf09a0a07cbc16 to your computer and use it in GitHub Desktop.
Quilt to manage text data
This file contains hidden or 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 os | |
# Put text data into folder. In this case it is shakespeare/shakespeare.txt | |
# Build | |
os.system('quilt build BrianSpering/shakespeare shakespeare') | |
# Push | |
os.system('quilt push BrianSpering/shakespeare --public') | |
# Install | |
os.system('quilt install BrianSpering/shakespeare --force') | |
# Use | |
from quilt.data.spiering.shakespeare import shakespeare | |
filename = shakespeare._data() | |
with open(filename) as f: | |
text = f.read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment