toxic thought waste site

Theological whimsy, metaphysical larks, and other spiritually radioactive waste products.

Saturday, June 14, 2008

The KJV in a blender

(A markov chain bible chapter using the entire KJV as input. The final verse is especially, er, chilling)

1:01 crow, thou shalt take the goods of his land:

1:02 And thou shalt fear, and let him acknowledge that the children of Ammon;

1:03 And Gilead, and Galilee, all the set feasts, by number, according to Christ Jesus:

1:04 That ye love one another, even as a servant, for a memorial before the ark of the Chaldeans:

1:05 for thou shalt not be purged from thy glory, and wisdom, and bow myself in great abundance.

1:06 And Solomon said, If we say then? Shall we give, or shall the earth feared, and said, He is antichrist, that denieth me before men, to pray before the LORD;

1:07 for he beareth not fruit he taketh away:

1:08 and they shall smite him;

1:09 or if there be any work that they might stand before their eyes, and, behold, they are consumed out of your dwellings.

1:10 And Pharaoh said unto them, and returned unto the king, That Daniel, which art infamous and much vexed.

1:11 Behold, the Hebrews hath met with us of his person, and well favoured.

1:12 And it came to her maidens.

1:13 She considereth a field, and thou shalt eat it in her month they shall burn it on a smoke, because the LORD which is a feast by an ordinance for Israel unto this day;

1:14 give me half thine house, and his hand toward heaven, that thou doest well to draw water.

1:15 And he answered, Here am I.

1:16 Are they not judge.

1:17 Shall I yet to cry unto God a more sure word of God made a covenant of the offering up of the LORD was there upon me.

1:18 They that forsake the idols of Egypt:

1:19 in vain shalt thou change them, and the priests of the children free.

1:20 Notwithstanding, lest we should pray for you in Egypt since it became as a bride adorned for her husband.

1:21 And I will make drunk her princes, and gave him to be feared above all gods.

1:22 For all this people, who have purposed to return unto thee the righteous shall be of the priests the Levites which are my people, and tongues, stood before the testimony, and cover you with mine own bowels:

1:23 Whom I would not destroy it for me, O thou fairest among women? what is his body, according to the earth.

1:24 And when the Jews which dwelt in a strange woman, from the pestilence;

1:25 that they might put us therein.

1:26 And when they had emerods in their own souls by their own confusion, as with his face about, and when thou shalt make two cherubims of gold, and for every man's money was not to covetousness.

1:27 Turn away my peace be with the mouth of the tabernacle of the LORD thy God, those deliver thou me.

1:28 For ye know these things will I send pestilence among you;

1:29 that ye might be the woman returned out of the night, saying, Holy, holy, holy, is the stumblingblock of their enemies:

1:30 and awake for thee, and as for me, which to day into mine hand?

1:31 Now therefore kill every woman

Labels: ,

[digg]

Make Your Own Bible Verses

I was reading this article on the unholy union of Garfield and Markov models and it reminded me that I'd never gotten around to trying out markov modelling first hand.

Over my lunch hour I cranked out the code at the bottom of this entry. And yes I write code over my lunch hour as a form of relaxation. What do you do?

In any case, the previous blog entry was the result of running this script on the book of Mark. Mark, Markov, get it?

Any way if you've ever wanted to generate your own biblical sounding text, here's your chance. Just download some scripture and crank up your python interpreter and away you go!

BTW, I'm really curious if Mark(ov) Chapter 1 get's any hits from people seeking Biblical inspiration. I know it inspired me.


import sys
import random
import itertools

#http://www.o-bible.org/download/kjv.txt

def make_frequencies(words):
result = {}

for i in range(2, len(words)):
w1, w2, w3 = words[i-2:i+1]
if (w1,w2) not in result:
result[(w1,w2)] = {}
if w3 not in result[(w1,w2)]:
result[(w1,w2)][w3] = 0
result[(w1,w2)][w3] += 1

return result

def find_first_random(freqs):
return get_random_ith_item(list(set([x[0] for x in freqs])))

def find_second_random(first, freqs):
pair = get_random_ith_item(list(set(x for x in freqs if x[0] == first)))
if not pair:
return find_first_random(freqs)
return pair[1]

def find_markov_random(first, second, freqs):
markov_words = freqs.get((first,second), {})
word = get_random_ith_item(itertools.chain(*[[x]*count for (x,count) in markov_words.items()]))
if not word:
return find_second_random(second, freqs)

return word

def get_random_ith_item(stream):
item = None
for i,x in enumerate(stream):
if random.randint(0,i) == 0:
item = x

return item

def markovize(freqs, output_length):
result = [find_first_random(freqs)]
result.append(find_second_random(result[0], freqs))
output_length -= 2

while output_length > 0:
w1, w2 = result[-2:]
result.append(find_markov_random(w1,w2,freqs))
output_length -= 1

return result

def main():
output_length = 500

words = ' '.join(sys.stdin.readlines())

word_frequencies = make_frequencies(words.split())
print ' '.join(markovize(word_frequencies, output_length))

if __name__ == '__main__':
main()

Labels: ,

[digg]

Thursday, June 12, 2008

Bible Study: Mark(ov) Chapter 1

Mark(ov) 1:01 he, casting away his wife, and raise up seed unto his disciples, How hardly shall they cast stones, and wounded him in the ship again departed to the poor, and thou shalt deny me thrice.

Mark(ov) 1:02 And when they had sent forth and laid hold on him: for they have heard the word, and it becometh unfruitful.

Mark(ov) 1:03 And these are they which are sown on good ground, and prayed that, if it were but the end shall not be among you: but whosoever shall say to you, Lo, here is Christ;

Mark(ov) 1:04 or, lo, he that hath, to him from every quarter.

Mark(ov) 1:05 And again he sent him away empty.

Mark(ov) 1:06 And again he sent another;

Mark(ov) 1:07 and him they cast stones, and wounded him in the bush God spake unto him, Seest thou these things?

Mark(ov) 1:08 And Jesus answered and said unto them, Why, what evil hath he done?

Mark(ov) 1:09 And they call the King of the physician, but they that were rich cast in of their abundance;

Mark(ov) 1:10 but she of her daughter.

Mark(ov) 1:11 But Jesus answereth again, and saith unto him, Go thy way;

Mark(ov) 1:12 the devil out of the palsy, Thy sins be forgiven thee.

Mark(ov) 1:13 But Jesus said, Verily I say unto him, Why do ye premeditate: but whatsoever shall be hated of all men counted John, that he would not suffer that any man should cast seed into the hall, called Praetorium;

Mark(ov) 1:14 and they bring a blind man by the farther side of the multitude, they took up twelve baskets full of fragments took ye up?

Mark(ov) 1:15 And they all saw him, and killed him, and said, And thou also wast with Jesus and his disciples asked him again of the Blessed?

Mark(ov) 1:16 And Jesus said, Forbid him not: for of such is the kingdom of God of the Jews?

Mark(ov) 1:17 For he taught in the morning: Lest coming suddenly he find you sleeping.

Mark(ov) 1:18 And what I will, but what thou sayest.

Mark(ov) 1:19 And he cometh, and findeth them sleeping, and saith unto him, By what authority doest thou these things?

Mark(ov) 1:20 and what shall a man satisfy these men with bread here in the days of Abiathar the high priest rent his clothes, and saith, What need we any further witnesses?

Mark(ov) 1:21 Ye have heard the word that was possessed with the wild beasts;

Mark(ov) 1:22 and the cock crew.

Mark(ov) 1:23 And Peter calling to remembrance saith unto them, How is it ago since this came unto him, and put it on his eyes, and put his hands again upon his eyes, and put his own house.

Mark(ov) 1:24 And the unclean spirits, when they looked, they saw no man of him.

Mark(ov) 1:25 And always, night and day, and the chains had been seen of her, believed not.

Mark(ov) 1:26 After that he was as one that was sown in their synagogue a man leave his wife behind him, and from Idumaea, and from Idumaea, and from Judaea, And from thence he arose, and rebuked the foul spirit, saying unto him, By what authority doest thou these things?

Mark(ov) 1:27 and what buildings are here!

Mark(ov) 1:28 And Jesus answered and said

Labels: ,

[digg]

Saturday, January 19, 2008

A Random Walk Through The Bible: Hosea 7:4

Using our random verse finder and the basic methodology:
Hosea 7:4 (New International Version)

They are all adulterers, burning like an oven whose fire the baker need not stir from the kneading of the dough till it rises.


So last time God said I was to be his messenger (or something like that). Now this has *got* to be the message.

  • discern the spiritual principle in this verse
    • God hates adulterers

  • ask what was god trying to get across to these people when he spoke these words
    • you are going to experience the powers of a convection oven, up close and personal like

  • ask how does this apply to me
    • I'm not an adulterer (that you can prove) so, *whew*.



I wonder if God has any more important messages to give to me (and to the world by me). I guess we'll find out next time on the next installment of A Random Walk Through the Bible!

Labels: ,

[digg]

Sunday, January 13, 2008

A Random Walk Through The Bible: Exodus 19:6

Using our random verse finder and the basic methodology:

Exodus 19:6 (New International Version)

you will be for me a kingdom of priests and a holy nation. These are the words you are to speak to the Israelites.

  • discern the spiritual principle in this verse
    • God wants me to be his priest unto the Israelites

  • ask what was god trying to get across to these people when he spoke these words
    • He wants me to tell them something

  • ask how does this apply to me
    • Stand by for an important announcement...



OK, folks God has chosen me to present a message. I don't know what it is yet, but I think it's going to be important!

Labels: ,

[digg]

Saturday, January 05, 2008

A Random Walk Through the Bible: 2 Chronicles 18:23

Using our random verse finder and the basic methodology:

2 Chronicles 18:23 (New International Version)

Then Zedekiah son of Kenaanah went up and slapped Micaiah in the face. "Which way did the spirit from the LORD go when he went from me to speak to you?" he asked.


  • discern the spiritual principle in this verse
    • huh?

  • ask what was god trying to get across to these people when he spoke these words
    • um.....

  • ask how does this apply to me
    • errr....



One verse is more profound and meaningful than the next. No wonder people people find such meaning and solace in this grand old tome. Oh, what's that you say, no one actually reads it? I guess that makes more sense.

Labels: ,

[digg]

Saturday, December 29, 2007

A Random Walk Through the Bible: Psalm 148:12

Psalm 148:12 (New International Version)

young men and maidens, old men and children.


Using our random verse finder and the basic methodology we begin our adventure.

  • discern the spiritual principle in this verse
    • no idea

  • ask what was god trying to get across to these people when he spoke these words
    • no idea

  • ask how does this apply to me
    • no idea



OK, God is not going to make this easy I see. Perhaps it's more meaningful in the original Klingon.....

I guess I'll meditate on those profound words and try again next week. Let me know if anyone sees the wisdom of these words that I'm missing....

Labels: ,

[digg]

Friday, December 28, 2007

A verse a day keeps the hellfire away...

"When you begin to ask yourself questions you will hear God speaking to you"


As you may have discerned by now I have an unhealthy fascination with Christian radio. On a recent program they were talking about the book "He Speaks to Me" (starts around 1h20m). Among other things they discussed the wonderful efficacy of reading a random verse a day and trying to apply it to your life. Now they suggested that you start with John, but that's not very random. Hence the program I posted yesterday.

Now I'm all about giving God a chance to talk to me. Unlike some religious skeptics I actually have no problem with a universe with a god in it. I just don't happen to think that this is such a place. But if it was I'd rather know. Just for the truthiness if not the eternal life (or at least avoidance of eternal torment).

So on the advice of the above program I will endeavor to occasionally (let's say weekly for now), take one verse completely at random (or by God's influence?) and do the following:

- discern the spiritual principle in this verse
- ask what was god trying to get across to these people when he spoke these words
- ask how does this apply to me

Also I vow not to cherry pick. I will take the very first one I find (ie I will just run the random verse picker once). If God has a message to get thru to me it should be easy enough to direct me to the important bits and show me things that relate to my life right now.

Tune into the next posting for the first episode of this feature.

PS: The random aspect of this experiment reminds of this interesting video series I saw awhile ago with Knuth talking about, among other things, his semi-random exploration of the Bible.

Labels: , ,

[digg]

Finding random Bible verses

The code below can be saved in a file (e.g. find_random_verse.py) and run as: python find_random_verse.py. The verse statistics were taken from: http://www.deafmissions.com/tally/bkchptrvrs.html. I was surprised to learn that there are 137 verse that are "unnumbered" (in Psalms). Just assume that those belong to the previous numbered verse.

Why do I or anyone else need a random Bible verse finder? Stay tuned for the exciting conclusion.... (or is it just the beginning?)


verses_data = {
'1 CHRONICLES': {1: 54, 2: 55, 3: 24, 4: 43, 5: 26, 6: 81, 7: 40, 8: 40, 9: 44, 10: 14, 11: 47, 12: 40, 13: 14, 14: 17, 15: 29, 16: 43, 17: 27, 18: 17, 19: 19, 20: 8, 21: 30, 22: 19, 23: 32, 24: 31, 25: 31, 26: 32, 27: 34, 28: 21, 29: 30},
'1 CORINTHIANS': {1: 31, 2: 16, 3: 23, 4: 21, 5: 13, 6: 20, 7: 40, 8: 13, 9: 27, 10: 33, 11: 34, 12: 31, 13: 13, 14: 40, 15: 58, 16: 24},
'1 JOHN': {1: 10, 2: 29, 3: 24, 4: 21, 5: 21},
'1 KINGS': {1: 53, 2: 46, 3: 28, 4: 34, 5: 18, 6: 38, 7: 51, 8: 66, 9: 28, 10: 29, 11: 43, 12: 33, 13: 34, 14: 31, 15: 34, 16: 34, 17: 24, 18: 46, 19: 21, 20: 43, 21: 29, 22: 53},
'1 PETER': {1: 25, 2: 25, 3: 22, 4: 19, 5: 14},
'1 SAMUEL': {1: 28, 2: 36, 3: 21, 4: 22, 5: 12, 6: 21, 7: 17, 8: 22, 9: 27, 10: 27, 11: 15, 12: 25, 13: 23, 14: 52, 15: 35, 16: 23, 17: 58, 18: 30, 19: 24, 20: 42, 21: 15, 22: 23, 23: 29, 24: 22, 25: 44, 26: 25, 27: 12, 28: 25, 29: 11, 30: 31, 31: 13},
'1 THESSALONIANS': {1: 10, 2: 20, 3: 13, 4: 18, 5: 28},
'1 TIMOTHY': {1: 20, 2: 15, 3: 16, 4: 16, 5: 25, 6: 21},
'2 CHRONICLES': {1: 17, 2: 18, 3: 17, 4: 22, 5: 14, 6: 42, 7: 22, 8: 18, 9: 31, 10: 19, 11: 23, 12: 16, 13: 22, 14: 15, 15: 19, 16: 14, 17: 19, 18: 34, 19: 11, 20: 37, 21: 20, 22: 12, 23: 21, 24: 27, 25: 28, 26: 23, 27: 9, 28: 27, 29: 36, 30: 27, 31: 21, 32: 33, 33: 25, 34: 33, 35: 27, 36: 23},
'2 CORINTHIANS': {1: 24, 2: 17, 3: 18, 4: 18, 5: 21, 6: 18, 7: 16, 8: 24, 9: 15, 10: 18, 11: 33, 12: 21, 13: 14},
'2 JOHN': {1: 13},
'2 KINGS': {1: 18, 2: 25, 3: 27, 4: 44, 5: 27, 6: 33, 7: 20, 8: 29, 9: 37, 10: 36, 11: 21, 12: 21, 13: 25, 14: 29, 15: 38, 16: 20, 17: 41, 18: 37, 19: 37, 20: 21, 21: 26, 22: 20, 23: 37, 24: 20, 25: 30},
'2 PETER': {1: 21, 2: 22, 3: 18},
'2 SAMUEL': {1: 27, 2: 32, 3: 39, 4: 12, 5: 25, 6: 23, 7: 29, 8: 18, 9: 13, 10: 19, 11: 27, 12: 31, 13: 39, 14: 33, 15: 37, 16: 23, 17: 29, 18: 33, 19: 43, 20: 26, 21: 22, 22: 51, 23: 39, 24: 25},
'2 THESSALONIANS': {1: 12, 2: 17, 3: 18},
'2 TIMOTHY': {1: 18, 2: 26, 3: 17, 4: 22},
'3 JOHN': {1: 15},
'ACTS': {1: 26, 2: 47, 3: 26, 4: 37, 5: 42, 6: 15, 7: 60, 8: 40, 9: 43, 10: 48, 11: 30, 12: 25, 13: 52, 14: 28, 15: 41, 16: 40, 17: 34, 18: 28, 19: 41, 20: 38, 21: 40, 22: 30, 23: 35, 24: 27, 25: 27, 26: 32, 27: 44, 28: 31},
'AMOS': {1: 15, 2: 16, 3: 15, 4: 13, 5: 27, 6: 14, 7: 17, 8: 14, 9: 15},
'COLOSSIANS': {1: 29, 2: 23, 3: 25, 4: 18},
'DANIEL': {1: 21, 2: 49, 3: 30, 4: 37, 5: 31, 6: 28, 7: 28, 8: 27, 9: 27, 10: 21, 11: 45, 12: 13},
'DEUTERONOMY': {1: 46, 2: 37, 3: 29, 4: 49, 5: 33, 6: 25, 7: 26, 8: 20, 9: 29, 10: 22, 11: 32, 12: 32, 13: 18, 14: 29, 15: 23, 16: 22, 17: 20, 18: 22, 19: 21, 20: 20, 21: 23, 22: 30, 23: 25, 24: 22, 25: 19, 26: 19, 27: 26, 28: 68, 29: 29, 30: 20, 31: 30, 32: 52, 33: 29, 34: 12},
'ECCLESIASTES': {1: 18, 2: 26, 3: 22, 4: 16, 5: 20, 6: 12, 7: 29, 8: 17, 9: 18, 10: 20, 11: 10, 12: 14},
'EPHESIANS': {1: 23, 2: 22, 3: 21, 4: 32, 5: 33, 6: 24},
'ESTHER': {1: 22, 2: 23, 3: 15, 4: 17, 5: 14, 6: 14, 7: 10, 8: 17, 9: 32, 10: 3},
'EXODUS': {1: 22, 2: 25, 3: 22, 4: 31, 5: 23, 6: 30, 7: 25, 8: 32, 9: 35, 10: 29, 11: 10, 12: 51, 13: 22, 14: 31, 15: 27, 16: 36, 17: 16, 18: 27, 19: 25, 20: 26, 21: 36, 22: 31, 23: 33, 24: 18, 25: 40, 26: 37, 27: 21, 28: 43, 29: 46, 30: 38, 31: 18, 32: 35, 33: 23, 34: 35, 35: 35, 36: 38, 37: 29, 38: 31, 39: 43, 40: 38},
'EZEKIEL': {1: 28, 2: 10, 3: 27, 4: 17, 5: 17, 6: 14, 7: 27, 8: 18, 9: 11, 10: 22, 11: 25, 12: 28, 13: 23, 14: 23, 15: 8, 16: 63, 17: 24, 18: 32, 19: 14, 20: 49, 21: 32, 22: 31, 23: 49, 24: 27, 25: 17, 26: 21, 27: 36, 28: 26, 29: 21, 30: 26,
31: 18, 32: 32, 33: 33, 34: 31, 35: 15, 36: 38, 37: 28, 38: 23, 39: 29, 40: 49, 41: 26, 42: 20, 43: 27, 44: 31, 45: 25, 46: 24, 47: 23, 48: 35},
'EZRA': {1: 11, 2: 70, 3: 13, 4: 24, 5: 17, 6: 22, 7: 28, 8: 36, 9: 15, 10: 44},
'GALATIANS': {1: 24, 2: 21, 3: 29, 4: 31, 5: 26, 6: 18},
'GENESIS': {1: 31, 2: 25, 3: 24, 4: 26, 5: 32, 6: 22, 7: 24, 8: 22, 9: 29, 10: 32, 11: 32, 12: 20, 13: 18, 14: 24, 15: 21, 16: 16, 17: 27, 18: 33, 19: 38, 20: 18, 21: 34, 22: 24, 23: 20, 24: 67, 25: 34, 26: 35, 27: 46, 28: 22, 29: 35, 30: 43, 31: 55, 32: 32, 33: 20, 34: 31, 35: 29, 36: 43, 37: 36, 38: 30, 39: 23, 40: 23, 41: 57, 42: 38, 43: 34, 44: 34, 45: 28, 46: 34,
47: 31, 48: 22, 49: 33, 50: 26},
'HABAKKUK': {1: 17, 2: 20, 3: 19},
'HAGGAI': {1: 15, 2: 23},
'HEBREWS': {1: 14, 2: 18, 3: 19, 4: 16, 5: 14, 6: 20, 7: 28, 8: 13, 9: 28, 10: 39, 11: 40, 12: 29, 13: 25},
'HOSEA': {1: 11, 2: 23, 3: 5, 4: 19, 5: 15, 6: 11, 7: 16, 8: 14, 9: 17, 10: 15, 11: 12, 12: 14, 13: 16, 14: 9},
'ISAIAH': {1: 31, 2: 22, 3: 26, 4: 6, 5: 30, 6: 13, 7: 25, 8: 22, 9: 21, 10: 34, 11: 16, 12: 6, 13: 22, 14: 32, 15: 9, 16: 14, 17: 14, 18: 7, 19: 25, 20: 6, 21: 17, 22: 25, 23: 18, 24: 23, 25: 12, 26: 21, 27: 13, 28: 29, 29: 24, 30: 33, 31: 9, 32: 20, 33: 24, 34: 17, 35: 10, 36: 22, 37: 38, 38: 22, 39: 8, 40: 31, 41: 29, 42: 25, 43: 28, 44: 28, 45: 25, 46: 13,
47: 15, 48: 22, 49: 26, 50: 11, 51: 23, 52: 15, 53: 12, 54: 17, 55: 13, 56: 12, 57: 21, 58: 14, 59: 21, 60: 22, 61: 11, 62: 12, 63: 19, 64: 12, 65: 25, 66: 24},
'JAMES': {1: 27, 2: 26, 3: 18, 4: 17, 5: 20},
'JEREMIAH': {1: 19, 2: 37, 3: 25, 4: 31, 5: 31, 6: 30, 7: 34, 8: 22, 9: 26, 10: 25, 11: 23, 12: 17, 13: 27, 14: 22, 15: 21, 16: 21, 17: 27, 18: 23, 19: 15, 20: 18, 21: 14, 22: 30, 23: 40, 24: 10, 25: 38, 26: 24, 27: 22, 28: 17, 29: 32, 30: 24, 31: 40, 32: 44, 33: 26, 34: 22, 35: 19, 36: 32, 37: 21, 38: 28, 39: 18, 40: 16, 41: 18, 42: 22, 43: 13, 44: 30, 45: 5, 46: 28,
47: 7, 48: 47, 49: 39, 50: 46, 51: 64, 52: 34},
'JOB': {1: 22, 2: 13, 3: 26, 4: 21, 5: 27, 6: 30, 7: 21, 8: 22, 9: 35, 10: 22, 11: 20, 12: 25, 13: 28, 14: 22, 15: 35, 16: 22, 17: 16, 18: 21, 19: 29, 20: 29, 21: 34, 22: 30, 23: 17, 24: 25, 25: 6, 26: 14, 27: 23, 28: 28, 29: 25, 30: 31, 31: 40, 32: 22, 33: 33, 34: 37, 35: 16, 36: 33, 37: 24, 38: 41, 39: 30, 40: 24, 41: 34, 42: 17},
'JOEL': {1: 20, 2: 32, 3: 21},
'JOHN': {1: 51, 2: 25, 3: 36, 4: 54, 5: 47, 6: 71, 7: 53, 8: 59, 9: 41, 10: 42, 11: 57, 12: 50, 13: 38, 14: 31, 15: 27, 16: 33, 17: 26, 18: 40, 19: 42, 20: 31, 21: 25},
'JONAH': {1: 17, 2: 10, 3: 10, 4: 11},
'JOSHUA': {1: 18, 2: 24, 3: 17, 4: 24, 5: 15, 6: 27, 7: 26, 8: 35, 9: 27, 10: 43, 11: 23, 12: 24, 13: 33, 14: 15, 15: 63, 16: 10, 17: 18, 18: 28, 19: 51, 20: 9, 21: 45, 22: 34, 23: 16, 24: 33},
'JUDE': {1: 25},
'JUDGES': {1: 36, 2: 23, 3: 31, 4: 24, 5: 31, 6: 40, 7: 25, 8: 35, 9: 57, 10: 18, 11: 40, 12: 15, 13: 25, 14: 20, 15: 20, 16: 31, 17: 13, 18: 31, 19: 30, 20: 48, 21: 25},
'LAMENTATIONS': {1: 22, 2: 22, 3: 66, 4: 22, 5: 22},
'LEVITICUS': {1: 17, 2: 16, 3: 17, 4: 35, 5: 19, 6: 30, 7: 38, 8: 36, 9: 24, 10: 20, 11: 47, 12: 8, 13: 59, 14: 57, 15: 33, 16: 34, 17: 16, 18: 30, 19: 37, 20: 27, 21: 24, 22: 33, 23: 44, 24: 23, 25: 55, 26: 46, 27: 34},
'LUKE': {1: 80, 2: 52, 3: 38, 4: 44, 5: 39, 6: 49, 7: 50, 8: 56, 9: 62, 10: 42, 11: 54, 12: 59, 13: 35, 14: 35, 15: 32, 16: 31, 17: 37, 18: 43, 19: 48, 20: 47, 21: 38, 22: 71, 23: 56, 24: 53},
'MALACHI': {1: 14, 2: 17, 3: 18, 4: 6},
'MARK': {1: 45, 2: 28, 3: 35, 4: 41, 5: 43, 6: 56, 7: 37, 8: 38, 9: 50, 10: 52, 11: 33, 12: 44, 13: 37, 14: 72, 15: 47, 16: 20},
'MATTHEW': {1: 25, 2: 23, 3: 17, 4: 25, 5: 48, 6: 34, 7: 29, 8: 34, 9: 38, 10: 42, 11: 30, 12: 50, 13: 58, 14: 36, 15: 39, 16: 28, 17: 27, 18: 35, 19: 30, 20: 34, 21: 46, 22: 46, 23: 39, 24: 51, 25: 46, 26: 75, 27: 66, 28: 20},
'MICAH': {1: 16, 2: 13, 3: 12, 4: 13, 5: 15, 6: 16, 7: 20},
'NAHUM': {1: 15, 2: 13, 3: 19},
'NEHEMIAH': {1: 11, 2: 20, 3: 32, 4: 23, 5: 19, 6: 19, 7: 73, 8: 18, 9: 38, 10: 39, 11: 36, 12: 47, 13: 31},
'NUMBERS': {1: 54, 2: 34, 3: 51, 4: 49, 5: 31, 6: 27, 7: 89, 8: 26, 9: 23, 10: 36, 11: 35, 12: 16, 13: 33, 14: 45, 15: 41, 16: 50, 17: 13, 18: 32, 19: 22, 20: 29, 21: 35, 22: 41, 23: 30, 24: 25, 25: 18, 26: 65, 27: 23, 28: 31, 29: 40, 30: 16, 31: 54, 32: 42, 33: 56, 34: 29, 35: 34, 36: 13},
'OBADIAH': {1: 21},
'PHILEMON': {1: 25},
'PHILIPPIANS': {1: 30, 2: 30, 3: 21, 4: 23},
'PROVERBS': {1: 33, 2: 22, 3: 35, 4: 27, 5: 23, 6: 35, 7: 27, 8: 36, 9: 18, 10: 32, 11: 31, 12: 28, 13: 25, 14: 35, 15: 33, 16: 33, 17: 28, 18: 24, 19: 29, 20: 30, 21: 31, 22: 29, 23: 35, 24: 34, 25: 28, 26: 28, 27: 27, 28: 28, 29: 27, 30: 33, 31: 31},
'PSALMS': {1: 6, 2: 12, 3: 8, 4: 8, 5: 12, 6: 10, 7: 17, 8: 9, 9: 20, 10: 18, 11: 7, 12: 8, 13: 6, 14: 7, 15: 5, 16: 11, 17: 15, 18: 50, 19: 14, 20: 9, 21: 13, 22: 31, 23: 6, 24: 10, 25: 22, 26: 12, 27: 14, 28: 9, 29: 11, 30: 12, 31: 24, 32: 11, 33: 22, 34: 22, 35: 28, 36: 12, 37: 40, 38: 22, 39: 13, 40: 17, 41: 13, 42: 11, 43: 5, 44: 26, 45: 17, 46: 11,
47: 9, 48: 14, 49: 20, 50: 23, 51: 19, 52: 9, 53: 6, 54: 7, 55: 23, 56: 13, 57: 11, 58: 11, 59: 17, 60: 12, 61: 8, 62: 12, 63: 11, 64: 10, 65: 13, 66: 20, 67: 7, 68: 35, 69: 36, 70: 5, 71: 24, 72: 20, 73: 28, 74: 23, 75: 10, 76: 12, 77: 20,
78: 72, 79: 13, 80: 19, 81: 16, 82: 8, 83: 18, 84: 12, 85: 13, 86: 17, 87: 7, 88: 18, 89: 52, 90: 17, 91: 16, 92: 15, 93: 5, 94: 23, 95: 11, 96: 13, 97: 12, 98: 9, 99: 9, 100: 5, 101: 8, 102: 28, 103: 22, 104: 35, 105: 45, 106: 48, 107: 43, 108: 13,
109: 31, 110: 7, 111: 10, 112: 10, 113: 9, 114: 8, 115: 18, 116: 19, 117: 2, 118: 29, 119: 176, 120: 7, 121: 8, 122: 9, 123: 4, 124: 8, 125: 5, 126: 6, 127: 5, 128: 6, 129: 8, 130: 8, 131: 3, 132: 18, 133: 3, 134: 3, 135: 21, 136: 26, 137: 9, 138: 8, 139: 24,
140: 13, 141: 10, 142: 7, 143: 12, 144: 15, 145: 21, 146: 10, 147: 20, 148: 14, 149: 9, 150: 6},
'REVELATION': {1: 20, 2: 29, 3: 22, 4: 11, 5: 14, 6: 17, 7: 17, 8: 13, 9: 21, 10: 11, 11: 19, 12: 17, 13: 18, 14: 20, 15: 8, 16: 21, 17: 18, 18: 24, 19: 21, 20: 15, 21: 27, 22: 21},
'ROMANS': {1: 32, 2: 29, 3: 31, 4: 25, 5: 21, 6: 23, 7: 25, 8: 39, 9: 33, 10: 21, 11: 36, 12: 21, 13: 14, 14: 23, 15: 33, 16: 27},
'RUTH': {1: 22, 2: 23, 3: 18, 4: 22},
'SONG OF SONGS': {1: 17, 2: 17, 3: 11, 4: 16, 5: 16, 6: 13, 7: 13, 8: 14},
'TITUS': {1: 16, 2: 15, 3: 15},
'ZECHARIAH': {1: 21, 2: 13, 3: 10, 4: 14, 5: 11, 6: 15, 7: 14, 8: 23, 9: 17, 10: 12, 11: 17, 12: 14, 13: 9, 14: 21},
'ZEPHANIAH': {1: 18, 2: 15, 3: 20}
}

import random

def random_verse(data):
index = 1
current = None
for b in data:
for c, vc in data[b].items():
for v in range(1,vc+1):
if random.choice(range(index)) == 0:
current = (b,c,v)
index += 1

return current

def main():
print random_verse(verses_data)

if __name__ == '__main__':
main()

Labels: , ,

[digg]