Skip to content

Instantly share code, notes, and snippets.

@jessex
Created September 5, 2011 19:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessex/1195691 to your computer and use it in GitHub Desktop.
Save jessex/1195691 to your computer and use it in GitHub Desktop.
Cool Madison: Past and Present
Congress shall make no law respecting an establishment of religion,
or prohibiting the free exercise thereof; or abridging the freedom of speech,
or of the press, or the right of the people peaceably to assemble,
and to petition the Government for a redress of grievances.
A well-regulated militia, being necessary to the security of a free State,
the right of the people to keep and bear arms, shall not be infringed.
No soldier shall, in time of peace be quartered in any house,
without the consent of the owner, nor in time of war,
but in a manner to be prescribed by law.
The right of the people to be secure in their persons, houses, papers,
and effects, against unreasonable searches and seizures, shall not be violated,
and no Warrants shall issue, but upon probable cause, supported by oath
or affirmation, and particularly describing the place to be searched,
and the persons or things to be seized.
No person shall be held to answer for a capital, or otherwise infamous crime,
unless on a presentment or indictment of a Grand Jury, except in cases arising
in the land or naval forces, or in the Militia, when in actual service
in time of War or public danger; nor shall any person be subject for
the same offense to be twice put in jeopardy of life or limb;
nor shall be compelled in any criminal case to be a witness against himself,
nor be deprived of life, liberty, or property, without due process of law;
nor shall private property be taken for public use without just compensation.
In all criminal prosecutions, the accused shall enjoy the right to a
speedy and public trial, by an impartial jury of the State and district
wherein the crime shall have been committed, which district shall have
been previously ascertained by law, and to be informed of the nature
and cause of the accusation; to be confronted with the witnesses against him;
to have compulsory process for obtaining witnesses in his favor,
and to have the assistance of counsel for his defense.
In suits at common law, where the value in controversy shall exceed
twenty dollars, the right of trial by jury shall be preserved,
and no fact tried by a jury shall be otherwise re-examined in any court
of the United States, than according to the rules of the common law.
Excessive bail shall not be required nor excessive fines imposed,
nor cruel and unusual punishments inflicted.
The enumeration in the Constitution, of certain rights,
shall not be construed to deny or disparage others retained by the people.
The powers not delegated to the United States by the Constitution,
nor prohibited by it to the States, are reserved to the States respectively,
or to the people.
import random, string
def isPunct(char):
return char in string.punctuation
def main():
#opens up bill of rights and pulls random line based on randint
f = open('billofrights.txt', 'r')
lineNum = random.randint(1,40)
a = 0
chosenLine = ""
for line in f: #scrolls through bill of rights text
a += 1
if a == lineNum:
chosenLine += line #sets J-Mad quotable equal to randint
f.close()
print
print "Cool Madison says: ", chosenLine, #prints J-Mad quotable
m = open('Jmad.txt', 'r') #file containing ASCII art of J-Mad
for line in m:
print line,
m.close()
print
main()
#!/usr/bin/env python
from random import randint
BILL_FILE = "billofrights.txt"
MAD_FILE = "Jmad.txt"
BY_LINE = "Cool Madison says: "
def main():
file = open(BILL_FILE, "r")
lines = file.readlines()
file.close()
line_num = randint(1, len(lines)) - 1
quote = "\n" + BY_LINE + lines[line_num]
file = open(MAD_FILE, "r")
madison = file.read()
file.close()
print quote, madison
if __name__ == "__main__":
main()
____
/(( )) /
( )6 -( ) /
(_) l (_) /
\ <> )
) (
.----\""/----.
| \/ |
| | . | |
| | . | |____/__
\ \ . (_____/_=
\ \ \
\/\=[]===)
(""\ |
| |_/ |
| | |
$ python coolmadison.py
Cool Madison says: No soldier shall, in time of peace be quartered in any house,
____
/(( )) /
( )6 -( ) /
(_) l (_) /
\ <> )
) (
.----\""/----.
| \/ |
| | . | |
| | . | |____/__
\ \ . (_____/_=
\ \ \
\/\=[]===)
(""\ |
| |_/ |
| | |
$ ./coolmadisonv2.py
Cool Madison says: without the consent of the owner, nor in time of war,
____
/(( )) /
( )6 -( ) /
(_) l (_) /
\ <> )
) (
.----\""/----.
| \/ |
| | . | |
| | . | |____/__
\ \ . (_____/_=
\ \ \
\/\=[]===)
(""\ |
| |_/ |
| | |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment