This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import time | |
t0 = time.clock() | |
import pandas as pd | |
from pandas.tseries.offsets import BDay | |
import numpy as np | |
import datetime as dt | |
from copy import copy |
This file contains hidden or 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
#IF YOU FOUND THIS USEFUL, Please Donate some Bitcoin .... 1FWt366i5PdrxCC6ydyhD8iywUHQ2C7BWC | |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import pandas as pd | |
from subprocess import check_output | |
from keras.layers.core import Dense, Activation, Dropout | |
from keras.layers.recurrent import LSTM | |
from keras.layers.advanced_activations import LeakyReLU, PReLU |
This file contains hidden or 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 pandas as pd | |
import os | |
file = os.path.abspath('C:\\Zerodha\\Pi\\Exported\\Nifty 50.csv') | |
df = pd.read_csv(file) | |
df['Date'] = pd.to_datetime(df['Date'], format = '%d/%m/%y %I:%M:%S %p') | |
df['Time'] = df['Date'].apply(lambda x: x.strftime('%H:%M')) | |
df['Date'] = df['Date'].apply(lambda x: x.strftime('%y-%m-%d')) | |
df.set_index('Date', drop=True, inplace=True) | |
df.columns = ['O', 'H', 'L', 'C', 'V', 'Time'] |