This file contains 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 requests | |
from bs4 import BeautifulSoup | |
def get_latest_press(code) : | |
# Get HTML codes | |
url = "https://www.bloomberg.com/quote/" + code | |
response = requests.get(url).text | |
# Get the first element of press releases |
This file contains 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 import uic | |
import telepot | |
from telepot.loop import MessageLoop | |
form_class = uic.loadUiType("main_window.ui")[0] | |
class MyWindow(QMainWindow, form_class): | |
def __init__(self): | |
super().__init__() |
This file contains 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 requests | |
import xml.etree.ElementTree as ET | |
# ---------------------------------------------------------------------------- | |
# Step 1. 페이지 스크랩핑 | |
xml = """<?xml version="1.0" encoding="utf-8"?> | |
<message> | |
<proframeHeader> | |
<pfmAppName>FS-DIS2</pfmAppName> | |
<pfmSvcName>DISDlsOfferSO</pfmSvcName> |
This file contains 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 requests | |
import xml.etree.ElementTree as ET | |
from openpyxl import Workbook | |
# ---------------------------------------------------------------------------- | |
# Step 1. 페이지 스크랩핑 | |
xml = """<?xml version="1.0" encoding="utf-8"?> | |
<message> | |
<proframeHeader> | |
<pfmAppName>FS-DIS2</pfmAppName> |
This file contains 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 websockets | |
import asyncio | |
import threading | |
import queue | |
import json | |
class WebSocketManager(threading.Thread): | |
def __init__(self, type, symbols, ticktype=None, qsize=1000): | |
self.__aloop = asyncio.get_event_loop() |
This file contains 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 pybithumb import WebSocketManager | |
import sys | |
from PyQt5.QtWidgets import * | |
from PyQt5.QtCore import * | |
from PyQt5.QtGui import QIcon | |
import time | |
class Worker(QThread): | |
recv = pyqtSignal(str) |
This file contains 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 asyncio | |
async def A(): | |
num1 = 3 | |
num2 = await B() | |
if num1 < num2: | |
print("OK") | |
async def B(): | |
num2 = 5 |
This file contains 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 asyncio | |
async def A(q): | |
num1 = 3 | |
num2 = await q.get() | |
if num1 < num2: | |
print("OK") | |
async def B(q): | |
num2 = 5 |
OlderNewer