Skip to content

Instantly share code, notes, and snippets.

@brianspiering
Last active June 3, 2018 18:59
Show Gist options
  • Save brianspiering/4266a8ff476b60413bdf09a0a07cbc16 to your computer and use it in GitHub Desktop.
Save brianspiering/4266a8ff476b60413bdf09a0a07cbc16 to your computer and use it in GitHub Desktop.
Quilt to manage text data
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