This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#The majority of this code was taken from | |
# http://twistedmatrix.com/documents/current/core/howto/clients.html#auto5 | |
#While the original code would have worked fine for a bot, I didn't like the | |
#way they handled logging. Why reinvent the wheel when Python has an | |
#excellent built-in module (`logging`) for doing just that? | |
#Anyway, this bot creates a "database" of registered users that it loads on | |
#run and saves on exit. | |
# | |
#python ircbot.py -build-db | |
#python ircbot.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chapter 2 - Ancient Near East | |
=== | |
Human-Headed Winged Lion (Lamassu) | |
--- | |
* Guardian figure from Assyrian palace of Assumasirpal II (ruled 883-859 BC) | |
* Carved limestone, 10ft high | |
Gate of the Citadel of Sargon II | |
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re, sys | |
class note: | |
def __init__(self,fname): | |
self.notes = [] | |
self.fname = fname | |
def parse(self): | |
_f = open(self.fname,'r') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class bresenham: | |
def __init__(self, start, end): | |
self.start = list(start) | |
self.end = list(end) | |
self.path = [] | |
self.steep = abs(self.end[1]-self.start[1]) > abs(self.end[0]-self.start[0]) | |
if self.steep: | |
print 'Steep' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys, Image | |
size = 328, 328 | |
outdir='D:\\pics\\thumbs' | |
files = [] | |
glob = None | |
try: | |
for root, dirs, files in os.walk("%s" % (sys.argv[1])): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.7 | |
#Auto survey | |
import re,sys,os | |
class answer: | |
def __init__(self): | |
self.ans = [] | |
def answer(self,a): | |
self.ans.append(a) |
NewerOlder