This file contains 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
def do_float(x): | |
"""convert a string into a float - float is in the front of the string | |
""" | |
if isinstance(x, int): | |
return float(x) | |
elif isinstance(x, float): | |
return x | |
else: | |
x = str(x) | |
try: |
This file contains 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
WEBHOOK_URL = <URL of Hangout Chat Group to push a message to> | |
from google.appengine.api import urlfetch | |
import urllib | |
def hangoutAlert(message): | |
"""hangoutAlert | |
send a message to hangoutAlert via Hangout Chat Alerts Group | |
""" | |
bot_message = urllib.urlencode({'text' : message }) |
This file contains 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 InitCSVHandler(webapp2.RequestHandler): | |
def get(self): | |
fetched = self.request.get('fetched') | |
if not fetched: | |
self.response.write("no fetched date") | |
return | |
taskqueue.add(url='/create_csv', queue_name='csv', params={'fetched': fetched}) | |
self.response.write("creating " + str(fetched)) |