Skip to content

Instantly share code, notes, and snippets.

simoncos /
Created October 9, 2017 06:28
recognize url in html and extract the id part
# -*- coding: utf-8 -*-
import re
p = re.compile('("http://hk\.centadata\.com/ccichart/estate_info\.aspx\?id=)([0-9]+)')
s = '<a href="" target="_top"> sdfasdfasd <a href="" target="_top">'
for match in re.findall(p,s):
simoncos /
Last active October 9, 2017 06:30
# -*- coding: utf-8 -*-
import json
import pandas as pd
from import json_normalize
from sklearn import feature_extraction
from sklearn.ensemble import AdaBoostClassifier
# f = open("data/neu_features.txt")
# for line in f:
simoncos /
Last active August 9, 2023 07:18
Install Miniconda 3 on Raspberry Pi
simoncos /
Last active July 19, 2018 23:30
Install Nodejs 6.x on Raspberry Pi Raw

Remove old version nodejs and npm:

sudo apt-get remove nodered -y
sudo apt-get remove nodejs nodejs-legacy -y
sudo apt-get remove npm -y
sudo apt-get autoremove

Install nodejs 6.x:

simoncos /
Last active March 30, 2024 17:56 — forked from konradko/
Install Golang 1.9 on Raspberry Pi

Install Golang 1.9:

sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile

If already installed old golang with apt-get: