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
int pin = 13; | |
void setup() | |
{ | |
pinMode(pin, OUTPUT); | |
} | |
void loop() | |
{ | |
// SOS |
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
from SimpleXMLRPCServer import SimpleXMLRPCServer | |
def file_reader(file_name): | |
with open(file_name, 'r') as f: | |
return f.read() | |
server = SimpleXMLRPCServer(('localhost', 5800)) | |
server.register_introspection_functions() |
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 os | |
import xmlrpclib | |
proxy = xmlrpclib.ServerProxy('http://localhost:5800/') | |
print proxy.file_reader(os.path.abspath( __file__ )) |
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
int red = 13; | |
int yellow = 12; | |
int green = 11; | |
int ON=HIGH; | |
int OFF=LOW; | |
void setup(){ | |
pinMode(red,OUTPUT); | |
pinMode(yellow,OUTPUT); |
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
#include <OneWire.h> | |
//2012-01-12: Jie Bao adapt from below | |
// read data stream and write to json | |
// OneWire DS18S20, DS18B20, DS1822 Temperature Example | |
// | |
// http://www.pjrc.com/teensy/td_libs_OneWire.html | |
// | |
// The DallasTemperature library can do all this work for you! |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<body> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> | |
<tspan x="0" y="0em">Comix Sample</tspan> | |
</label> | |
<actor t="translate(131,49)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-18,59|-6,79|-1,59"> |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style> | |
<body> | |
<div style="max-width:900px; -webkit-transform:rotate(0deg);"> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> |
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
CLEARNLP=. | |
CLASSPATH=$CLEARNLP/lib/args4j-2.0.16.jar:$CLEARNLP/lib/commons-compress-1.4.1.jar:$CLEARNLP/lib/hppc-0.4.1.jar:$CLEARNLP/lib/jregex1.2_01.jar:$CLEARNLP/lib/clearnlp-1.3$ | |
java -classpath $CLASSPATH com.googlecode.clearnlp.run.Version | |
FILE=iphone5.txt | |
echo "Test Tokenizer" | |
java -classpath $CLASSPATH com.googlecode.clearnlp.run.Tokenizer \ | |
-d model/dictionary-1.3.1.zip -i $FILE |
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
sudo apt-get install perl pkg-config autoconf automake libtool libncurses5-dev | |
git clone https://github.com/yorhel/ncdu.git | |
cd ncdu | |
autoreconf -i | |
./configure --prefix=/usr | |
make | |
sudo make install | |
# Examples | |
# scan a directory and export the results for later viewing |
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
from fn import _ | |
from fn.op import zipwith | |
from itertools import repeat | |
assert list(map(_ * 2, range(5))) == [0,2,4,6,8] | |
assert list(filter(_ < 10, [9,10,11])) == [9] | |
assert list(zipwith(_ + _)([0,1,2], repeat(10))) == [10,11,12] | |
from fn import _ | |
print (_ + 2) # "(x1) => (x1 + 2)" |