Note: I configured this thinkfan setup for my old Thinkpad w520 on Ubuntu 17.10.
Install lm-sensors
and thinkfan
.
sudo apt-get install lm-sensors thinkfan
#! /usr/bin/python | |
# Copyright (c) 2015, Rethink Robotics, Inc. | |
# Using this CvBridge Tutorial for converting | |
# ROS images to OpenCV2 images | |
# http://wiki.ros.org/cv_bridge/Tutorials/ConvertingBetweenROSImagesAndOpenCVImagesPython | |
# Using this OpenCV2 tutorial for saving Images: | |
# http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_gui/py_image_display/py_image_display.html |
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |
# Copyright Mathieu Blondel December 2011 | |
# License: BSD 3 clause | |
import numpy as np | |
import pylab as pl | |
from sklearn.base import BaseEstimator | |
from sklearn.utils import check_random_state | |
from sklearn.cluster import MiniBatchKMeans | |
from sklearn.cluster import KMeans as KMeansGood |