Weather related commands for 'wxbot' (a fork of jenni).
- .weather
#!/usr/bin/env python | |
from colorama import init, Fore | |
init() | |
print(Fore.RED + 'some red text') | |
print('automatically back to default color again') |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/asyncore.py", line 91, in write | |
obj.handle_write_event() | |
File "/usr/lib/python2.7/asyncore.py", line 468, in handle_write_event | |
self.handle_write() | |
File "/usr/lib/python2.7/asynchat.py", line 174, in handle_write | |
self.initiate_send() | |
File "/usr/lib/python2.7/asynchat.py", line 244, in initiate_send | |
del self.producer_fifo[0] | |
IndexError: deque index out of range |
#!/usr/bin/env python3 | |
upper_limit = input("Highest number you'd like to go to: ") | |
for x in range(1, int(upper_limit)): | |
if x % 3 == 0 and x % 5 == 0: | |
print('FizzBuzz') | |
elif x % 3 == 0: | |
print('Fizz') | |
elif x % 5 == 0: |
#!/usr/bin/env python3 | |
import random | |
dice_numbers = dict() | |
dice = range(1, 7) | |
total = 1500000 | |
for x in range(0, total): |
def myfunction(jenni, input): | |
jenni.say("hello world") | |
myfunction.rule = r'.*?\b?yano\b?.*?' |
def message_join(phenny, input): | |
if (input.nick).lower() == 'yano': | |
phenny.say('Welcome :)') | |
message_join.event = 'JOIN' |
#!/usr/bin/env python2 | |
''' | |
Copyright 2015 Michael Yanovich, yanovich.net | |
Licensed under the Eiffel Forum License 2. | |
''' | |
def prepare_list(inc): | |
inc_list = inc.split() | |
out_list = list() |
def greece(jenni, input): | |
if not input.admin: | |
return jenni.say('Please obtain admin-privs to use this function.') | |
url = 'https://www.indiegogo.com/projects/greek-bailout-fund#/story' | |
try: | |
page = web.get(url) | |
except: | |
return jenni.say('Could not connect to indiegogo.com') | |
find_euros = re.compile(r"<div class='i-balance'><span class=\"currency currency-xlarge\"><span>(\S+)</span><em>EUR</em></span></div>") |
error: uncaptured python exception, closing channel <bot.jenny connected at 0x7fcae67f9128> (<type 'exceptions.IndexError'>:deque index out of range [/usr/lib64/python2.7/asyncore.py|write|87] [/usr/lib64/python2.7/asyncore.py|handle_write_event|454] [/usr/lib64/python2.7/asynchat.py|handle_write|174] [/usr/lib64/python2.7/asynchat.py|initiate_send|244]) | |
Closed! | |
Warning: Disconnected. Reconnecting in 20 seconds... |