Skip to content

Instantly share code, notes, and snippets.

View Lay4U's full-sized avatar

HyeongRae Kim Lay4U

  • pluxity
  • Seocho
  • 13:51 (UTC +09:00)
View GitHub Profile
@Lay4U
Lay4U / beep_every_50_minute
Created December 12, 2022 12:30
beep_every_50_minute
import time
from datetime import datetime
import win32api
import winsound
frequency = 1500
duration = 100
# -*-coding: utf-8 -
import sys, os, re, datetime, copy, json
import logging
import xlwings as xw
import resource_rc
import util, kw_util
from PyQt5 import QtCore, QtWidgets
from PyQt5.QtCore import QObject, pyqtSlot, pyqtSignal, QUrl, QEvent
from PyQt5.QtCore import QStateMachine, QState, QTimer, QFinalState
date open high low close volume cap
20190816 6870 7490 6620 6670 9514350 126045000000
20190814 7360 7680 6860 6870 12501642 129822000000
20190813 7690 7880 7190 7190 7976220 135869000000
20190812 6960 7890 6800 7800 23631616 147396000000
20190809 7250 7420 6900 7000 9320951 132279000000
20190808 7610 7680 6970 7250 10353405 137003000000
20190807 8250 8830 7320 7890 17228310 149097000000
20190806 7520 8950 7420 8100 28483710 153065000000
20190805 7050 8070 6610 7810 44249462 147585000000
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import pandas as pd
from keras.models import Sequential
from keras.layers import Dense, LSTM, Dropout, Conv2D, Reshape, TimeDistributed, Flatten, Conv1D,ConvLSTM2D, MaxPooling1D
from keras.layers.core import Dense, Activation, Dropout
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import mean_squared_error
import tensorflow as tf
import matplotlib.pyplot as plt
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def create_dataset(signal_data, look_back=1):
dataX, dataY = [], []
for i in range(len(signal_data) - look_back):
dataX.append(signal_data[i:(i + look_back), :])
dataY.append(signal_data[i + look_back, -1])
return np.array(dataX), np.array(dataY)
look_back = 20