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
from PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton | |
from PyQt5.QtCore import QThread | |
import time | |
class Worker(QThread): | |
def run(self): | |
while True: | |
if self.isInterruptionRequested(): # 인터럽트 확인 | |
print("terminate") |
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 sys | |
from enum import Enum | |
from PyQt5.QtWidgets import * | |
from PyQt5.QAxContainer import * | |
from PyQt5.QtCore import * | |
class Singleton(type): | |
_instances = {} | |
def __call__(cls, *args, **kwargs): | |
if cls not in cls._instances: |
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 sys | |
from PyQt5.QtWidgets import * | |
from PyQt5.QAxContainer import * | |
from PyQt5.QtCore import * | |
class SingletonInstane: | |
__instance = None | |
@classmethod | |
def __getInstance(cls): |
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
from PyQt5.QtWidgets import * | |
from PyQt5 import uic | |
from PyQt5.QtChart import * | |
from PyQt5.QtGui import * | |
from PyQt5.QtCore import * | |
import pybithumb | |
import time | |
class ChartWorker(QThread): | |
# -------------------------------- |
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 time | |
import datetime | |
while True: | |
now = datetime.datetime.now() | |
print(now) | |
time.sleep(5) |
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 numpy as np | |
import pandas as pd | |
import pyupbit | |
import time | |
import plotly.graph_objects as go | |
pat = [ 100, 90, 80, 70, 90, 120, 140 ] | |
tickers = pyupbit.get_tickers(fiat="KRW") | |
dfs = [] |
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
from plotly.subplots import make_subplots | |
import plotly.graph_objects as go | |
import pyupbit | |
pat = [ 100, 90, 80, 70, 90, 120, 140 ] | |
df = pyupbit.get_ohlcv("KRW-XRP", count=7) | |
xrp = go.Scatter( | |
x = df.index, | |
y = df.close, |
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 pyupbit | |
import time | |
from collections import deque | |
class RealOrder(pyupbit.Upbit): | |
def __init__(self, key0, key1): | |
super().__init__(key0, key1) | |
def get_current_price(self, ticker): | |
while True: |
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 threading | |
import queue | |
import time | |
import pyupbit | |
import datetime | |
from collections import deque | |
import realcoin | |
tickers = ["KRW-ADA", "KRW-LTC"] |
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 threading | |
import queue | |
import time | |
import pyupbit | |
import datetime | |
from collections import deque | |
class Consumer(threading.Thread): | |
def __init__(self, q): | |
super().__init__() |
NewerOlder