Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
#-*- coding:utf-8 -*-
import psyco
psyco.full() # Speed-up
""" Tic-tac-toe opponent using a recursive search.
Uses a recursive search and picks
the moves that give the most likely results of a win.
#!/usr/bin/env python
#-*- coding:utf-8 -*-
""" This code takes a wordlist and records how many occurrences of this word are
in the file. It then prints a sorted list of words and their frequency to
the console. """
wl = {}
for line in file('wordlist.txt'):
line = line.replace("\"", '').replace('.','').replace('!','').replace(',','').replace(';','').replace('?','')
<?xml version="1.0" encoding="utf-8"?>
<note version="0.3" xmlns:link="http://beatniksoftware.com/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size" xmlns="http://beatniksoftware.com/tomboy">
<title>Escape characters</title>
<text xml:space="preserve"><note-content version="0.1">Escape characters
They do <bold>one of two things:</bold>
<list><list-item dir="ltr">If the character has a special meaning, escaping that character <bold>turns it off</bold> and makes it a <bold>plain</bold> character again.
<list><list-item dir="ltr">Putting quotes inside of quotes for example: " \" "
</list-item></list></list-item><list-item dir="ltr">if the character is a <bold>plain</bold> character, it gives it <bold>super powers</bold>
<list><list-item dir="ltr">The n character is normal, but put a backslash in front of it like so: \n And presto! You have a line break!</list-item></list></list-item></list>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (GNU/Linux)
mQGiBEfzmvMRBACUlRbSZ2jPzNrykhAG0xSP20R78CA5VckEwOWkOgZs+CMyh2J3
GElyVSvd2HXs8f5z8Zn2ElgrEZd5FUkaFM2XGFU8FnOdCqMW9KOO71AGbL2n82Gh
4zCphMuEnTMRtrY4emM8Nn9cLK9aw/bz4O74N6gruRzRU0klSWZaPBQ4ywCg1QTs
y2YX710CIpfrRFfkAfHf3y0D/33C19jVTeBZwxt5ACnrdQ38EmnPy1/B+/ApHNfr
FUYOoGKvk3HFD5tVB4y1KuGaTzgCInrXfQvp2QUIc3eYp8f6ZQlyMB9mdsiDRdrN
Z2wcPlK5zekOLaKS39njnvauR7YfycjumL+Vjo91WeSBzzU67QNrIahVCSZ/nrl6
SSZhBACTVSIdyo4MixIMPhSMZVpTEEDAmQiUoIwC18sv9VS1zvMr5br/UIF6DqRL
I enter piously the shrine
--Enshrouded, meek, in terry cloth--
To conduct rituals divine;
Alone, but for a moral moth.
The porcelain font, demurely veiled,
Summons me from its tiled apse.
Sabbath evenings, it’s oft regaled
Me through its copious tap.
linux-image-2.6.26.2:
Installed: 2.6.26.2-10.00.Custom
Candidate: 2.6.26.2-10.00.Custom
Version table:
*** 2.6.26.2-10.00.Custom 0
100 /var/lib/dpkg/status
import urllib2
import zipfile
import StringIO
print [
word.lower().strip()
for word in zipfile.ZipFile(
StringIO.StringIO(
urllib2.urlopen("http://superb-east.dl.sourceforge.net/sourceforge/wordlist/12dicts-5.0.zip").read()
)
).open("6of12.txt")
#!/usr/bin/env python
#-*- coding:utf-8 -*-
# Run it like this!
# python ./gs.py 'Sybil' 'sybil.appspot.com'
import sys
from textwrap import TextWrapper
try:
from xgoogle.search import GoogleSearch
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import re
import pprint
r = re.compile(r'^([\d.]+[KGM]?) +(\w+)')
homes = []
# How much is a K or an M or a G worth?
JAMES
JOHN
ROBERT
MICHAEL
WILLIAM
DAVID
RICHARD
CHARLES
JOSEPH
THOMAS