aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xlstm.py6
-rwxr-xr-xtfann.py31
2 files changed, 7 insertions, 30 deletions
diff --git a/lstm.py b/lstm.py
index f27b892..765b0e1 100755
--- a/lstm.py
+++ b/lstm.py
@@ -2,6 +2,8 @@
# _*_ coding=utf-8 _*_
#original source:https://github.com/dashee87/blogScripts/blob/master/Jupyter/2017-11-20-predicting-cryptocurrency-prices-with-deep-learning.ipynb
+#@#!pip install lxml
+#@#!mkdir lstm-models
import argparse
import code
import readline
@@ -134,10 +136,10 @@ def load_models(crypto, crypto_short):
def premain(argparser):
signal.signal(signal.SIGINT, SigHandler_SIGINT)
#here
- #lstm_type_1("ethereum", "ether")
+ lstm_type_1("ethereum", "ether")
#lstm_type_2("ethereum", "ether", 5, 20)
#lstm_type_3("ethereum", "ether", 5, 20)
- load_models("ethereum", "eth")
+ #load_models("ethereum", "eth")
def main():
argparser = Argparser()
diff --git a/tfann.py b/tfann.py
index aef226a..c6f3d08 100755
--- a/tfann.py
+++ b/tfann.py
@@ -2,7 +2,7 @@
# _*_ coding=utf-8 _*_
# original source-https://nicholastsmith.wordpress.com/2017/11/13/cryptocurrency-price-prediction-using-deep-learning-in-tensorflow/
-import argparse
+#@#!pip install TFANN
import code
import readline
import signal
@@ -14,18 +14,6 @@ import pandas as pd
import urllib.request
import matplotlib.pyplot as mpl
-def SigHandler_SIGINT(signum, frame):
- print()
- sys.exit(0)
-
-class Argparser(object):
- def __init__(self):
- parser = argparse.ArgumentParser()
- parser.add_argument("--string", type=str, help="string")
- parser.add_argument("--bool", action="store_true", help="bool", default=False)
- parser.add_argument("--dbg", action="store_true", help="debug", default=False)
- self.args = parser.parse_args()
-
def GetAPIUrl(cur, sts = 1420070400):
return 'https://poloniex.com/public?command=returnChartData&currencyPair=USDT_{:s}&start={:d}&end=9999999999&period=7200'.format(cur, sts)
@@ -134,25 +122,12 @@ def tfann_type_1():
mpl.show()
# write code here
-def premain(argparser):
- signal.signal(signal.SIGINT, SigHandler_SIGINT)
+def premain():
#here
tfann_type_1()
def main():
- argparser = Argparser()
- if argparser.args.dbg:
- try:
- premain(argparser)
- except Exception as e:
- print(e.__doc__)
- if e.message: print(e.message)
- variables = globals().copy()
- variables.update(locals())
- shell = code.InteractiveConsole(variables)
- shell.interact(banner="DEBUG REPL")
- else:
- premain(argparser)
+ premain()
if __name__ == "__main__":
main()