Created
January 4, 2018 01:26
-
-
Save kuc-arc-f/4c447f6c4ee9f693d8ad1dccddb9c54d to your computer and use it in GitHub Desktop.
tensorFlow Learning results update process , via python2.7
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
#import tensorflow as tf | |
import json | |
from urllib2 import urlopen | |
import datetime | |
import threading | |
import time | |
import sys | |
import traceback | |
import api_func | |
import ai_func | |
import timeZone | |
#define | |
mTimeMax =1800 | |
def proc_learning(): | |
clsAI =ai_func.ai_funcClass() | |
try: | |
field=1 | |
clsAI.proc_run(field) | |
# field=4 | |
# clsAI.proc_run(field) | |
except: | |
print "--------------------------------------------" | |
print traceback.format_exc(sys.exc_info()[2]) | |
print "--------------------------------------------" | |
if __name__ == "__main__": | |
#cls = api_func.api_funcClass() | |
proc_learning() | |
from datetime import datetime | |
clsJST= timeZone.timeZoneClass() | |
nowJST = datetime.now(tz=clsJST ) | |
print(nowJST ) | |
tmBef = nowJST | |
while True: | |
time.sleep(1.0) | |
tmNow = datetime.now(tz=clsJST ) | |
tmSpan = tmNow - tmBef | |
iSpan = tmSpan.total_seconds() | |
sTime = tmNow.strftime("%Y-%m-%d %H:%M:%S") | |
print("time=" +sTime) | |
if iSpan > mTimeMax: | |
tmBef = datetime.now(tz=clsJST ) | |
proc_learning() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment