Commit 63bb95ed authored by Michael Murtaugh's avatar Michael Murtaugh
Browse files

Merge branch 'master' of relearn:git/relearn

parents 3a430368 8b17a612
......@@ -10,6 +10,25 @@
<h1 id="rise-of-the-botnet">2084 Rise of the botnet</h1>
It is a beautiful week in the summer of the year 2084. The sun still shines and the stars do still sparkle. As mr. Orwell predicted a dystopic world in 1984, a group of people in 2014 did predict another dystopia to be realized in 2084: the internet as we knew it, collapsed. But: "There is a life after Google &amp; the Cloud!"*
Welcome to the Botnet and welcome to the year 2084. We communicate through IRC, a chatting programm based on Written Speech**. How are you doing? Are you already connected to the internet again? There are multiple servers around here that will bring you back in touch with your friends and the rest of the world. The servers are named after different Famous Bots from history.*** Bots, Botties, "the Bot Family"*. They have been born, they grow up, they develop, and they die, just as humans do. They ask you questions, they reply, they exchange, and they entertain. They even love you, they doge you, they touch you. The Bots are communicative tools, an extention of the human voice.
Feel free to enter the Bot-house, a collection of rooms filled by bots. The houses' floorplan is not fixed, as the labyrith is changing according to your descisions. So, take the hand of the tourguide, and experience how it feels to be part of the Botnet network in 2084.
* quotes from the relearn week in 2014 are placed in double quotes
** from: Introduction to the Botnet, http://relearn/botnet/Ten_things_IRC.html
*** imaginative bot-conversations with the historical bots Cindi, Daneel, Eliza, Eugene and Futura: http://relearn/botnet/portraits_piratebots_def.html
<p><img src="" title="Cindi Mayweather (aka Janelle Monae)" alt="Cindi Mayweather (aka Janelle Monae)" /> <img src="" title="ELIZA" alt="ELIZA" /> <img src="" title="R. Daneel Olivaw" /> <img src="" title="Futura (Metropolis)" alt="Futura (Metropolis)" /></p>
<li><a href="Ten_things_to_do_with_SSH.html">Ten ways to network (using ssh)</a></li>
def multiwordReplace(text, wordDic):
#take a text and replace words that match a key in a dictionary with
#the associated value, return the changed text
rc = re.compile('|'.join(map(re.escape, wordDic)))
def translate(match):
return wordDic[]
return rc.sub(translate, text)
class HelloBot(
def __init__(self, channel, nickname, server, port=6667):, [(server, port)], nickname, nickname) = channel
def on_welcome(self, c, e):
print "Bot connected"
def on_privmsg(self, c, e):
self.on_pubmsg(c, e)
def on_pubmsg(self, c, e):
nick = e.source.nick
if nick != 'SF-2084':
dictionary= {
'th':'all together',
'he':'it empowers',
'an':'results in',
're':'it will zip',
'er':'questions questions',
'in':'loops into',
' ':'.',
'.':'it ends',
',':'a window',
'?':'I ask myself if that is really the case',
'1':'the first',
'2':'the second',
'3':'the third',
'4':'the fourth',
'5':'the fifth',
'6':'the sixth',
'7':'the seventh',
'8':'the eighth',
'9':'the nineth'
m = e.arguments[0]
m = m.lower()
m = list(m)
for i in range(len(m)):
if not dictionary.has_key(m[i]):
new = ' '.join(m)
if ' .' in new:
new = new.replace(' .', '.')
def treatment():
count = 0
x = list(new)
for n in x:
if n ==x[0]:
x[0] = n.upper()
if n == '.' and count+2 < len(x):
x[count+2] = x[count+2].upper()
count +=1
printedtext = ''.join(x)[:400]
return printedtext+'.'
talk = 'Meanwhile in 2084: '+treatment()
if talk != None:
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description='BashBot')
parser.add_argument('--host', default="localhost", help='host')
parser.add_argument('--port', type=int, default=6667, help='port')
parser.add_argument('channel', help='channel to join')
parser.add_argument('nickname', help='bot nickname')
args = parser.parse_args()
if not"#"): = "#"
bot = HelloBot(, args.nickname,, args.port)
\ No newline at end of file
#The spanish bot repeats what it reads performing with its strong accent
class HelloBot(
......@@ -15,7 +17,7 @@ class HelloBot(
def on_pubmsg(self, c, e):
# print, e.source, e.arguments, e.type
if __name__ == "__main__":
......@@ -29,7 +29,7 @@ class ReportPlotBot(
#choose a random position
#radius = 5000
radius = 5000
if == self.observechannel:
msg = e.arguments[0]
NbWords = len(msg.split())
......@@ -4,7 +4,7 @@ from threading import Thread
import chiplotle
from plotbot import PlotBot
from reporter import ReporterPlotBot
from reporter import ReportPlotBot
parser = argparse.ArgumentParser(description='BashBot')
parser.add_argument('--host', default="localhost", help='host')
......@@ -17,10 +17,15 @@ parser.add_argument('reportnickname', help='bot nickname', default = 'Circle')
def main():
args = parser.parse_args()
plotter = chiplotle.instantiate_plotters()[0]
reporter = ReportPlotBot(args.observechannel, args.plotchannel, args.nickname,, args.port, plotter = plotter)
plot = PlotBot(False, plotter, args.plotchannel, args.nickname,, args.port)
Thread(None, reporter.start)
Thread(None, plot.start)
reporter = ReportPlotBot(args.observechannel, args.plotchannel, args.reportnickname,, args.port, plotter = plotter)
# plot = PlotBot(False, plotter, args.plotchannel, args.plotnickname,, args.port)
# Thread(None, reporter.start)
# Thread(None, plot.start)
# import time
# while True:
# time.sleep(1)
if __name__ == "__main__":
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment