Skip to content

Instantly share code, notes, and snippets.

@mousetail
Created December 22, 2017 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mousetail/3dd664edf79c756887a951d3b09fe930 to your computer and use it in GitHub Desktop.
Save mousetail/3dd664edf79c756887a951d3b09fe930 to your computer and use it in GitHub Desktop.
import random
class Number:
def __str__(self):
return str(random.randint(0, 2**random.randint(1,8)+1))
words = ['move', 'write', 'him', 'mark', 'gave', 'often', 'red', 'never', 'ever', 'great',
'second', 'money', 'old', 'keep', 'produce', 'remember', 'problem', "don't", 'laugh', 'make',
'might', 'beauty', 'while', 'off', 'same', 'other', 'real', 'place', 'first', 'warm', 'be',
'people', 'tell', 'size', 'sun', 'north', 'under', 'head', 'too', 'dog', 'differ', 'go',
'city', 'form', 'lot', 'may', 'order', 'among', 'sound', 'base', 'bring', 'fish', 'listen',
'wood', 'stop', 'like', 'am', 'lead', 'eat', 'front', 'over', 'short', 'say', 'your', 'mile',
'sleep', 'and', 'bed', 'hold', 'man', 'home', 'inch', 'full', 'island', 'clear', 'turn',
'sentence', 'no', 'south', 'game', 'machine', 'wheel', 'mean', 'girl', 'teach', 'he', 'plan',
'field', 'think', 'to', 'heard', 'ready', 'lay', 'about', 'decide', 'now', 'right', 'gold',
'since', 'weight', 'than', 'music', 'black', 'big', 'earth', 'out', 'surface', 'are', 'need',
'heat', 'run', 'certain', 'care', 'children', 'voice', 'river', 'group', 'little', 'seem',
'star', 'from', 'happen', 'as', 'center', 'large', 'here', 'correct', 'for', 'wind', 'draw',
'less', 'we', 'found', 'answer', 'down', 'eye', 'once', 'always', 'hot', 'high', 'she',
'self', 'stood', 'kind', 'family', 'after', 'school', 'were', 'small', 'nothing', 'minute',
'war', 'white', 'interest', 'add', 'act', 'way', 'play', 'how', 'also', 'soon', 'own',
'book', 'east', 'fast', 'set', 'picture', 'water', 'far', 'can', 'ago', 'study', 'mountain',
'green', 'cry', 'came', 'pose', 'by', '.', 'use', 'through', 'mother', 'or', 'week', 'stand',
'figure', 'talk', 'sit', 'question', 'person', 'cut', 'rock', 'west', 'behind', 'both',
'fill', 'next', 'room', 'got', 'map', 'want', 'tail', 'face', 'yes', 'miss', 'fact', 'carry',
'still', 'wonder', 'though', 'work', 'took', 'serve', 'follow', 'usual', 'door', 'many',
'quick', 'which', 'then', 'letter', 'late', 'with', 'live', 'back', 'see', 'you', 'yet',
'begin', 'class', 'there', 'fly', 'let', 'change', 'world', 'cover', 'paper',
'strong', 'sing', 'course', 'end', 'if', 'try', 'done', 'why', 'start', 'night', 'on', 'a',
'of', 'stay', 'that', 'well', 'but', 'food', 'life', 'until', 'point', 'thousand', 'at',
'age', 'ship', 'country', 'take', 'notice', 'rest', 'call', 'put', 'rank', 'my', 'been',
'toward', 'best', 'will', 'three', 'near', 'numeral', 'fine', 'sure', 'only', 'do', 'ease',
'object', 'had', 'true', 'dark', 'moon', 'this', 'last', 'mind', 'left', 'several', 'tree',
'our', 'them', 'list', 'early', 'was', 'note', 'come', 'box', 'find', 'state', 'brought',
'table', 'those', 'unit', 'boy', 'most', 'sea', 'year', 'such', 'even', 'free', 'record',
'test', 'reach', 'show', 'wait', 'above', 'half', 'king', 'direct', 'power', 'page', 'in',
'story', 'town', 'six', 'began', 'horse', 'area', 'able', 'busy', 'friend', 'light', 'again',
'press', 'feel', 'product', 'hundred', 'farm', 'his', 'men', 'cause', 'her', 'read', 'good',
'when', 'together', 'said', 'an', 'govern', 'knew', 'main', 'give', 'road', 'rain', 'one',
'snow', 'check', 'possible', 'animal', 'went', 'dry', 'cold', 'just', 'more', 'four', 'plain',
'language', 'special', 'during', 'travel', 'fire', 'new', 'their', 'ran', 'low', 'some',
'made', 'told', 'me', 'who', 'close', 'round', 'thought', 'five', 'build', 'hard', 'blue',
'each', 'us', 'final', 'plant', 'walk', 'where', 'slow', 'thing', 'enough', 'name',
'perhaps', 'fall', 'look', 'saw', 'body', 'science', 'plane', 'ask', 'hour', 'leave', 'step',
'pattern', 'piece', 'word', 'has', 'develop', 'does', 'should', 'did', 'contain', 'complete',
'rule', 'ground', 'simple', 'line', 'part', 'pull', 'must', 'so', 'before', 'open', 'it', 'boat',
'learn', 'morning', 'land', 'air', 'better', 'grow', 'ten', 'number', 'hear', 'song', 'these',
'appear',
'force', 'pound', 'feet', 'drive', 'hand', 'know', 'few', 'noun', 'between', 'all', 'color',
'spell', 'watch', 'is', 'street', 'young', 'whole', 'very', 'up', 'cross', 'against', 'any',
'pass', 'I', 'love', 'top', 'what', 'shape', 'time', 'would', 'side', 'example', 'house',
'measure', 'have', 'they', 'every', 'foot', 'father', 'could', 'bird', 'car', 'vowel',
'idea', 'much', 'two', 'get', 'day', 'help', 'common', 'port', 'the', 'long', 'deep', 'oh',
'bot', 'paragraph', 'sentence', 'capital', 'Sweden', 'Istanbul', 'lecture', 'website',
'bronchitus', 'python', 'localhost', 'computer', 'folder', 'modified', 'entity', 'component'
'dinosaur', 'Jim', 'Arnold', 'Firefox', 'add-on', 'devenagri', 'Asia', 'API', 'list',
'collection', 'group', 'landmine', 'hovercraft', 'bed', 'thundercloud', 'candle',
'millimeter', 'millimeters', 'harddrive', 'symbol', 'delta', 'wasteland',
'alpha', 'else', 'therefore', 'thus', 'thereby', 'future', 'bond',
'quantum', 'string theory', Number(), Number()]
def sentence(cap=True):
sens = " ".join(str(random.choice(words)) for i in range(random.randint(4, random.randint(5,20))))+\
random.choice((".",",",":",".",".",";","."))
if cap:
sens = sens[0].upper() + sens[1:]
if sens[-1]==".":
return sens, True
else:
return sens, False
def paragraph():
ans = ""
cap = True
for i in range(random.randint(4,random.randint(7,15))):
a2, cap = sentence(cap)
ans+=" "+a2
return ans[1:]
def text():
return "\r\n\r\n".join(paragraph() for i in range(random.randint(2, 7)))
print (text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment