Skip to content

Instantly share code, notes, and snippets.

View Cam1337's full-sized avatar

Cameron Wrigley Cam1337

  • Amazon Web Services
  • Seattle, WA
View GitHub Profile
Traceback (most recent call last):
File "/Users/cam/git/python/irc/irc.py", line 76, in <module>
Parse.Parse()
File "/Users/cam/Git/Python/IRC/parse.py", line 60, in Parse
elif self.CMD==".np":self.mod_cmds.NowPlaying()
File "/Users/cam/Git/Python/IRC/cmds.py", line 128, in NowPlaying
bList=pickle.load(BadSongs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/pickle.py", line 1370, in load
return Unpickler(file).load()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/pickle.py", line 858, in load
Reloaded all parse/cmds/opcmds/ccmds/spanish/web
[#bots - PRIVMSG] <Cam> .reload
[#bots - PRIVMSG] <Cam> Ok.
*Cam lols*
Cam has parted #bots
Cam has joined #bots
[Cam[Bot] - 366] <jade.ninthbit.net> bots :End of /NAMES list.
jade.ninthbit.net has parted Cam[Bot]
jade.ninthbit.net has joined #bots
cam@flex In(~) Time(18:40:28)$ ircb
Server
-> irc.ninthbit.net
Default Channel
-> #bots
[Auth - NOTICE] <jade.ninthbit.net> *** Looking up your hostname...
[Auth - NOTICE] <jade.ninthbit.net> *** Could not resolve your hostname: Domain name not found; using your IP address (209.104.229.66) instead.
[JOIN - 451] <jade.ninthbit.net> You have not registered
[Self - 005] <jade.ninthbit.net> EMOVE UHNAMES :are supported by this server
[Self - 252] <jade.ninthbit.net> 6 :operator(s) online
>>> for i in range(10):
... print 4**(2*i)-63*(4)**i-64
... print i
...
-126
0
-300
1
-816
2
#This was written directly into git. No testing;
equation=raw_input("What is your equation (please use x as a variable): ")
lookfor=raw_input("Factor Number (leave blank for 0): ")
for x in range(1000):
equation=equation.replace("^","**")
answer=eval(equation)
if answer==lookfor:
print "The answer was %s" % x
def PrintTerminal(self):
Log = open("/Users/Cam/Git/Python/IRC/logs.txt", "a")
if self.args[1].lower() == "part":
pString="%s has parted %s" % (self.Nick, self.args[2])
elif self.args[1].lower() == "join":
pString="%s has joined %s" % (self.Nick, self.args[2][1:])
elif self.args[1]=="QUIT":
pString="%s has quit - ['%s']" %(self.Nick, " ".join(self.args[2:])[1:])
elif self.args[0]=="PING":
pString="You have been pinged by %s" % self.args[1]
def Weather(self):
if len(self.args)==5:
try:
Zipcode=self.args[4].lower()
Page = (BeautifulSoup(urllib2.urlopen("http://www.weather.com/weather/today/%s" % Zipcode)))
CurrentTemperature=str(Page.find("div", { "class" : "ccTemp" })).split(">")[1].split("<")[0].replace("&deg; ","")
CurrentState=str(Page.find("div", { "class" : "ccdata" })).split("<p>")[1].split("</p>")[0].lower()
City=str(Page.find("h1")).split(">")[1].split("(%s)"%Zipcode)[0].strip()
Wind=" ".join(str(Page.find("div", { "class" : "ccWind" })).split("<b>")[1].split("</b>")).replace("\n","").replace("\t","").replace("gusting"," gusting").split("</div>")[0].strip().lower()
TotalDescription="weather for %s: %s and %s with wind %s" % (City, CurrentTemperature, CurrentState, Wind)
error: src refspec master does not match any.
error: failed to push some refs to 'ssh://[email protected]:443/Cam1337/PyIRC.git'
cam@g-mac In(~/git/python/pyirc) Time(17:09:01)$
* remote origin
Fetch URL: ssh://[email protected]:443/Cam1337/PyIRC.git
Push URL: ssh://[email protected]:443/Cam1337/PyIRC.git
HEAD branch: master
Remote branch:
master new (next fetch will store in remotes/origin)
Local ref configured for 'git push':