[11.10.20] Removal of Testing
This commit is contained in:
parent
700eaaa73e
commit
0b52e13a67
@ -103,13 +103,10 @@ class Listener(StreamListener):
|
|||||||
|
|
||||||
def processTweet():
|
def processTweet():
|
||||||
|
|
||||||
log("Dump Stack {}".format(len(dumpStack)), 'INFO')
|
|
||||||
|
|
||||||
processStack = dumpStack.copy()
|
processStack = dumpStack.copy()
|
||||||
dumpStack.clear()
|
dumpStack.clear()
|
||||||
|
|
||||||
log("Processing Tweets Stack...", 'INFO')
|
log("Processing Tweets Stack...", 'INFO')
|
||||||
log(len(processStack), 'INFO')
|
|
||||||
|
|
||||||
if len(processStack) != 0:
|
if len(processStack) != 0:
|
||||||
for tweet in processStack:
|
for tweet in processStack:
|
||||||
@ -172,10 +169,7 @@ def createHourJob():
|
|||||||
|
|
||||||
log("Extracting sentiment scores...", 'INFO')
|
log("Extracting sentiment scores...", 'INFO')
|
||||||
|
|
||||||
log(len(hourStack), 'INFO')
|
|
||||||
|
|
||||||
if len(hourStack) != 0:
|
if len(hourStack) != 0:
|
||||||
log("Boop", 'INFO')
|
|
||||||
for item in hourStack:
|
for item in hourStack:
|
||||||
ovPos = ovPos + item['pos']
|
ovPos = ovPos + item['pos']
|
||||||
ovNeu = ovNeu + item['neu']
|
ovNeu = ovNeu + item['neu']
|
||||||
@ -188,7 +182,8 @@ def createHourJob():
|
|||||||
neg = round(ovNeg/len(hourStack), 3)
|
neg = round(ovNeg/len(hourStack), 3)
|
||||||
compound = round(ovCompound/len(hourStack), 3)
|
compound = round(ovCompound/len(hourStack), 3)
|
||||||
|
|
||||||
print(pos, neu, neg, compound)
|
if type == "bitcoin":
|
||||||
|
type = 'btc_usd'
|
||||||
|
|
||||||
hourStack.clear()
|
hourStack.clear()
|
||||||
|
|
||||||
@ -206,7 +201,6 @@ def collectorMain(hashtag):
|
|||||||
for i in range(len(hashtag)):
|
for i in range(len(hashtag)):
|
||||||
Thread(target=collector, args=[hashtag[i]]).start()
|
Thread(target=collector, args=[hashtag[i]]).start()
|
||||||
|
|
||||||
sleep(5)
|
|
||||||
createHourJob()
|
createHourJob()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user