Commit fbaf1c8c authored by Cody Zacharias's avatar Cody Zacharias Committed by GitHub

1.1.3 Update

parent 93c8d273
from elasticsearch import Elasticsearch, helpers
from sys import stdout
from time import strftime, localtime
import contextlib
import time
import sys
class RecycleObject(object):
def write(self, junk): pass
......@@ -9,10 +9,10 @@ class RecycleObject(object):
@contextlib.contextmanager
def nostdout():
savestdout = sys.stdout
sys.stdout = RecycleObject()
savestdout = stdout
stdout = RecycleObject()
yield
sys.stdout = savestdout
stdout = savestdout
def weekdate(day):
weekdays = {
......@@ -28,10 +28,10 @@ def weekdate(day):
return weekdays[day]
def hour(datetime):
return time.strftime("%H", time.localtime(datetime))
return strftime("%H", localtime(datetime))
def Tweet(Tweet, es, session):
day = weekday(time.strftime("%A", time.localtime(Tweet.datetime)))
day = weekday(strftime("%A", localtime(Tweet.datetime)))
actions = []
nLikes = 0
......
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