Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mikeyee
mikeyee / index.html
Last active October 1, 2018 12:53
用flask框架製作港股通北水追蹤器
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF=8">
<title>北水追蹤器</title>
</head>
<body>
<h1>北水追蹤器</h1>
<p>
@mikeyee
mikeyee / main.py
Created October 1, 2018 08:00
以flask框架製作港股通北水追蹤器
#!/usr/bin/env python
from flask import Flask, render_template, flash, request, jsonify, Markup
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.font_manager as mfm
import matplotlib.ticker as ticker
import pandas as pd
import io, base64, os
@mikeyee
mikeyee / northwater.py
Last active December 31, 2021 15:40
到港交所港股通網頁,下載港股通每日持股量數據
from bs4 import BeautifulSoup
import pandas as pd
import requests
import re
import time
import datetime
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
@mikeyee
mikeyee / checksiteupdate.py
Last active February 7, 2023 08:29
追蹤一系列網址,並檢查是否有更新
import os
import hashlib
import urllib.request
import json
import codecs
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
@mikeyee
mikeyee / hkse2.py
Last active November 12, 2019 13:17
#載入程式庫
import time
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from bs4 import BeautifulSoup
import pandas as pd
import requests
import re
@mikeyee
mikeyee / hkse.py
Last active November 12, 2019 13:18
#載入所需的程式庫
from bs4 import BeautifulSoup
import pandas as pd
import requests
import re
#載入港交所最新通告網頁,再以BeautifulSoup拆解其html結構
page = requests.get("http://www.hkexnews.hk/listedco/listconews/mainindex/SEHK_LISTEDCO_DATETIME_TODAY_C.HTM")
soup = BeautifulSoup(page.content, 'html.parser')
@mikeyee
mikeyee / .block
Created July 14, 2018 12:48 — forked from fancellu/.block
Force directed graph for D3.js v4 with labelled edges and arrows
license: gpl-3.0
height: 600
require(quantmod)
require(ggplot2)
require(reshape2)
require(plyr)
require(scales)
# Download some Data, e.g. the CBOE VIX
getSymbols("^VIX",src="yahoo")
# Make a dataframe
@mikeyee
mikeyee / README.md
Created April 20, 2014 09:50 — forked from mbostock/.block