This file contains hidden or 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
var serialport = require("serialport"), | |
SerialPort = serialport.SerialPort, | |
myPort; | |
var Fiber = require('fibers'); | |
// Delay function using fibers | |
function sleep(ms) { | |
var fiber = Fiber.current; | |
setTimeout(function() { |
This file contains hidden or 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
// ça c'est la partie qui dit à node qu'on va utiliser le module (librairie ou API) 'brain' et donc on crée une instance de ce module dans la variable brain (on prend toujours une variable du nom du module, par concention (ce qui est parfois débile et on comprend plus rien, ce qui est un peu le problème de js mais bon, rien ne nous empêche de le faire plus proprement pour nous!)) | |
var brain = require('brain') | |
// là je crée une instance de l'objet NeuralNetwork() que j'appelle net. | |
var net = new brain.NeuralNetwork(); | |
// là je l'entraine, * correspond à une valeur de la variable normalisée entre -1 et 1 | |
net.train( | |
[ | |
{ |
This file contains hidden or 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
# Clean, simple, compatible and meaningful. | |
# Tested on Linux, Unix and Windows under ANSI colors. | |
# It is recommended to use with a dark background and the font Inconsolata. | |
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
# | |
# http://ysmood.org/wp/2013/03/my-ys-terminal-theme/ | |
# Mar 2013 ys | |
# Machine name. | |
function box_name { |
This file contains hidden or 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
# Everything gets built in here (include BOARD_TAG now) | |
ifndef OBJDIR | |
OBJDIR = $(PROJECT_DIR)/bin/$(BOARD_TAG)/$(CURRENT_DIR) | |
$(call show_config_variable,OBJDIR,[COMPUTED],(from BOARD_TAG)) | |
else | |
$(call show_config_variable,OBJDIR,[USER]) | |
endif |
This file contains hidden or 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
var serialport = require("serialport"), | |
SerialPort = serialport.SerialPort, | |
myPort; | |
var Fiber = require('fibers'); | |
// Delay function using fibers | |
function sleep(ms) { | |
var fiber = Fiber.current; | |
setTimeout(function() { |
This file contains hidden or 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
Show hidden characters
{ | |
"folders": | |
[ | |
{ | |
"path": "/Users/Ladislas/dev/leka/moti" | |
} | |
], | |
"settings": | |
{ |
This file contains hidden or 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
$(shell basename $(CURDIR)) |
This file contains hidden or 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
ln -s ~/Dropbox/dev/app-data/sublime-imac/Installed\ Packages ./Installed\ Packages | |
ln -s ~/Dropbox/dev/app-data/sublime-imac/Packages ./Packages | |
ln -s ~/Dropbox/dev/app-data/sublime-imac/Pristine\ Packages ./Pristine\ Packages |
This file contains hidden or 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
$(subst $(notdir ${CURDIR}),,${CURDIR}) |
This file contains hidden or 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
// Buffer to store incoming commands from serial port | |
String inData; | |
void setup() { | |
Serial.begin(9600); | |
Serial.println("Serial conection started, waiting for instructions..."); | |
} | |
void loop() { | |
while (Serial.available() > 0) |