Skip to content

Instantly share code, notes, and snippets.

@language-engineering
Last active October 11, 2015 22:38
Show Gist options
  • Select an option

  • Save language-engineering/3930626 to your computer and use it in GitHub Desktop.

Select an option

Save language-engineering/3930626 to your computer and use it in GitHub Desktop.
from random import sample # sample is a function in Python's built-in random module
training_data_subset = sample(training_data, k) # Selects a random sample of k reviews
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment