Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Nonsense generators

Name: Anonymous 2008-08-04 18:16

Name: Anonymous 2008-08-04 18:18

lrn2Markov chain generator

Name: Anonymous 2008-08-04 18:38

>>2
Valid faggot post.

Name: Anonymous 2008-08-04 18:46

>>3
What?

Name: Anonymous 2008-08-04 19:15

>>4
Valid "What?" post.

Name: Anonymous 2008-08-04 19:20

>>5
What?

Name: Anonymous 2008-08-04 20:00

>>6
Invalid “Valid “Valid “What?” post” post.

Name: Anonymous 2008-08-04 20:11

>>7
Syntax error: Expected ”

Name: >:( 2008-08-04 20:37

Invalid “Invalid “Valid “Valid “What?” post” post” post” post.

Name: Anonymous 2008-08-05 12:44

FIOC alert:

from random import choice,randint
def randsent(x,f):
    """x-number of words,f-maximum number of syllables"""
    pbal='bcdfghjklmnpqrstvwxyz'
        bal='aeiou'
        l=['110','10']
        c=[]
        z=''
        for i in range(x):
                for y in range(randint(1,f)):
                    q=choice(l)
                    for i in q:
                        if i=='0':
                            z+=choice(bal)
                        else:
                            z+=choice(pbal)
                if y==0:
                    z=z.capitalize()
                c.append(z)
                z=''
        r=' '.join(c)
        return r+'.'

Name: Anonymous 2008-08-05 12:56

FIOC indeed.

from random import choice,randint
def randsent(x,f):
        """x-number of words,f-maximum number of syllables"""
        pbal='bcdfghjklmnpqrstvwxyz'
        bal='aeiou'
        l=['110','10']
        c=[]
        z=''
        for i in range(x):
                for y in range(randint(1,f)):
                    q=choice(l)
                    for i in q:
                        if i=='0':
                            z+=choice(bal)
                        else:
                            z+=choice(pbal)
                if i==0:
                    z.capitalize()
                c.append(z)
                z=''
        r=' '.join(c)
        return r+'.'

Name: Anonymous 2008-08-05 12:57

#    shaney.py              by Greg McFarlane
#                           some editing by Joe Strout
#
#    search for "Mark V.  Shaney" on the WWW for more info!

import sys
import rand
import string

def run(filename=''):
    if filename=='':
        file = open( raw_input('Enter name of a textfile to read: '), 'r')
    else:
        file = open( filename, 'r')
   
    text = file.read()
    file.close()
    words = string.split(text)
   
    end_sentence = []
    dict = {}
    prev1 = ''
    prev2 = ''
    for word in words:
      if prev1 != '' and prev2 != '':
        key = (prev2, prev1)
        if dict.has_key(key):
          dict[key].append(word)
        else:
          dict[key] = [word]
          if prev1[-1:] == '.':
            end_sentence.append(key)
      prev2 = prev1
      prev1 = word
   
    if end_sentence == []:
      print 'Sorry, there are no sentences in the text.'
      return
   
    key = ()
    count = 10
   
    while 1:
      if dict.has_key(key):
        word = rand.choice(dict[key])
        print word,
        key = (key[1], word)
        if key in end_sentence:
          print
          count = count - 1
          if count <= 0:
        break
      else:
        key = rand.choice(end_sentence)
   
# end of run() function

# immediate-mode commands, for drag-and-drop or execfile() execution
if __name__ == '__main__':
    if len(sys.argv) == 2:
        run(sys.argv[1])        # accept a command-line filename
    else:
        run()
    print
    raw_input("press Return>")
else:
    print "Module shaney imported."
    print "To run, type: shaney.run()"
    print "To reload after changes to the source, type: reload(shaney)"

# end of shaney.py

Name: Anonymous 2009-03-06 7:52

I could go on   a jihad in   your name If.

Name: Anonymous 2009-03-06 15:15

Except a TRUCKLOAD OF.

Name: Anonymous 2010-11-13 15:04

Name: Anonymous 2011-02-03 0:47

Don't change these.
Name: Email:
Entire Thread Thread List