This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# if input image is in range 0..1, please first multiply img by 255 | |
# assume image is ndarray of shape [height, width, channels] where channels can be 1, 3 or 4 | |
def imshow(img): | |
import cv2 | |
import IPython | |
_,ret = cv2.imencode('.jpg', img) | |
i = IPython.display.Image(data=ret) | |
IPython.display.display(i) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Map (Map, (!), insert, empty) | |
import Control.Monad.State (StateT, put, get, liftIO, evalStateT) | |
type Val = Int | |
type Var = String | |
data Instruction = | |
Set Val Var | |
| Print Var | |
| Add Var Var Var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# this script read the core(s) temperature using lm sensors then calculate the average | |
# and send it to the ganglia using gmetric | |
# Based on the original from: http://computational.engineering.or.id/LM_Sensors#Integrasi_Dengan_Ganglia | |
# assumes that the lines reported by lm sensors are formated like this | |
# Core 0: +48.0°C (high = +90.0°C, crit = +100.0°C) | |
SENSORS=/usr/bin/sensors | |
GMETRIC=/usr/bin/gmetric |