Skip to content

Instantly share code, notes, and snippets.

View ilovejs's full-sized avatar
🐡

Michael Zhuang (Hao) ilovejs

🐡
  • 11:05 (UTC +10:00)
View GitHub Profile
@ilovejs
ilovejs / server.r
Created May 3, 2013 02:37 — forked from wch/server.r
if (!require(quantmod)) {
stop("This app requires the quantmod package. To install it, run 'install.packages(\"quantmod\")'.\n")
}
# Download data for a stock if needed, and return the data
require_symbol <- function(symbol, envir = parent.frame()) {
if (is.null(envir[[symbol]])) {
envir[[symbol]] <- getSymbols(symbol, auto.assign = FALSE)
}
@ilovejs
ilovejs / svmflag.py
Created December 27, 2012 08:59 — forked from glamp/svmflag.py
import numpy as np
import pylab as pl
import pandas as pd
from sklearn import svm
from sklearn import linear_model
from sklearn import tree
from sklearn.metrics import confusion_matrix
@ilovejs
ilovejs / gist:4214270
Created December 5, 2012 09:32 — forked from fxsjy/gist:3550053
Bakup Weibo to Disk
package main
import (
"net/http"
"net/url"
"log"
"io/ioutil"
"regexp"
"fmt"
//"net/http/httputil"
@ilovejs
ilovejs / gist:2935166
Created June 15, 2012 07:14 — forked from fxsjy/gist:2928683
bpnn solve kindergarten problem
# Back-Propagation Neural Networks
# another way: solve it as a Regression Problem
# Written in Python. See http://www.python.org/
# Modified by JSun to solve the problem here: http://www.weibo.com/1497035431/ynPEvC78V
# Neil Schemenauer <nas@arctrix.com>
import math
import random
import string