Skip to content

Instantly share code, notes, and snippets.

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

Install Golang 1.9:

wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
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:

@simoncos
simoncos / nodejs_on_rpi.md
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
simoncos / miniconda_on_rpi.md
Last active August 9, 2023 07:18
Install Miniconda 3 on Raspberry Pi
@simoncos
simoncos / neu_feature_classification_sklearn.py
Last active October 9, 2017 06:30
neu_feature_to_sklearn
# -*- coding: utf-8 -*-
import json
import pandas as pd
from pandas.io.json import json_normalize
from sklearn import feature_extraction
from sklearn.ensemble import AdaBoostClassifier
# f = open("data/neu_features.txt")
# for line in f:
@simoncos
simoncos / extract_url_id.py
Created October 9, 2017 06:28
recognize url in html and extract the id part
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
p = re.compile('("http://hk\.centadata\.com/ccichart/estate_info\.aspx\?id=)([0-9]+)')
s = '<a href="http://hk.centadata.com/ccichart/estate_info.aspx?id=008600" target="_top"> sdfasdfasd <a href="http://hk.centadata.com/ccichart/estate_info.aspx?id=05600" target="_top">'
for match in re.findall(p,s):
print(match[1])