Skip to content

Instantly share code, notes, and snippets.

@mikeyee
mikeyee / README.md
Created April 11, 2014 16:23 — forked from mbostock/.block

This variation of a donut chart demonstrates how to update values with an animated transition. Clicking on the radio buttons changes the displayed metric.

Next: Missing Data
Previous: Static Update

@mikeyee
mikeyee / README.md
Created April 20, 2014 09:44 — forked from mbostock/.block
@mikeyee
mikeyee / README.md
Created April 20, 2014 09:50 — forked from mbostock/.block
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 / .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
@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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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')