Fix date issues
Browse filesSigned-off-by: Aadhitya A <aadhitya864@gmail.com>
app.py
CHANGED
|
@@ -262,8 +262,8 @@ def modelCNNLSTM_OpenGap(csv_file, prax):
|
|
| 262 |
continue
|
| 263 |
else:
|
| 264 |
df['O-C'][i] = df['Open'][i] - df['Close'][i-1]
|
| 265 |
-
temp_data = df.iloc[0:3000, 1:
|
| 266 |
-
trek = df.iloc[3000:,1:
|
| 267 |
#print(temp_data)
|
| 268 |
data = temp_data
|
| 269 |
sc = MinMaxScaler()
|
|
@@ -373,7 +373,7 @@ def modelCNNLSTM_OpenGap(csv_file, prax):
|
|
| 373 |
#print(f'> Loss: {np.mean(loss_per_fold)}')
|
| 374 |
#print('------------------------------------------------------------------------')
|
| 375 |
|
| 376 |
-
trek = df.iloc[0:len(df), 1:
|
| 377 |
Y = trek[0:len(trek)]
|
| 378 |
YP = trek[1:len(trek)]
|
| 379 |
Y1 = Y['Close']
|
|
@@ -891,7 +891,7 @@ def fileOutput():
|
|
| 891 |
return f"result_{today}.csv"
|
| 892 |
|
| 893 |
def guess_date(string):
|
| 894 |
-
for fmt in ["%Y/%m/%d", "%d-%m-%Y", "%Y%m%d", "%m/%d/%Y", "%d/%m/%Y", "%Y-%m-%d", "%d
|
| 895 |
try:
|
| 896 |
return datetime.datetime.strptime(string, fmt).date()
|
| 897 |
except ValueError:
|
|
|
|
| 262 |
continue
|
| 263 |
else:
|
| 264 |
df['O-C'][i] = df['Open'][i] - df['Close'][i-1]
|
| 265 |
+
temp_data = df.iloc[0:3000, 1:27]
|
| 266 |
+
trek = df.iloc[3000:,1:27]
|
| 267 |
#print(temp_data)
|
| 268 |
data = temp_data
|
| 269 |
sc = MinMaxScaler()
|
|
|
|
| 373 |
#print(f'> Loss: {np.mean(loss_per_fold)}')
|
| 374 |
#print('------------------------------------------------------------------------')
|
| 375 |
|
| 376 |
+
trek = df.iloc[0:len(df), 1:27]
|
| 377 |
Y = trek[0:len(trek)]
|
| 378 |
YP = trek[1:len(trek)]
|
| 379 |
Y1 = Y['Close']
|
|
|
|
| 891 |
return f"result_{today}.csv"
|
| 892 |
|
| 893 |
def guess_date(string):
|
| 894 |
+
for fmt in ["%Y/%m/%d", "%d-%m-%Y", "%Y%m%d", "%m/%d/%Y", "%d/%m/%Y", "%Y-%m-%d", "%d/%m/%y", "%m/%d/%y"]:
|
| 895 |
try:
|
| 896 |
return datetime.datetime.strptime(string, fmt).date()
|
| 897 |
except ValueError:
|