<commit_before>
/**
 * Module dependencies.
 */

var express = require('express');
var routes = require('./routes');
var user = require('./routes/user');
var http = require('http');
var path = require('path');
var SerialPort = require('serialport').SerialPort;
var ioclient = require('socket.io-client');

var app = express();
var server = http.createServer(app);

// all environments
app.set('port', process.env.PORT || 3001);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));

// development only
if ('development' == app.get('env')) {
  app.use(express.errorHandler());
}

app.get('/', routes.index);
app.get('/users', user.list);

server.listen(app.get('port'), function(){
  console.log('Express server listening on port ' + app.get('port'));
});

socket = ioclient.connect('http://localhost:3000/');  
socket.on('news', function (data) {
      console.log(data);
});

var portName = '/dev/tty.usbserial-A800ewsy'; // My Arduino
//var portName = '/dev/tty.usbmodem3d11'; // SEM Port

console.log("Serial session started.");
serial = new SerialPort(portName, {
    baudrate: 9600
});

socket.on('control', function (data) {
    console.log(data);
    switch(data.move) {
    case 'up':
    serial.write(new Buffer([119]));
    break;
    case 'down':
    serial.write(new Buffer([115]))
    break;
    case 'right':
    serial.write(new Buffer([100]));
    break;
    case 'left':
    serial.write(new Buffer([97]));
    break;  
  }
});<commit_msg>Updated server list<commit_after>
/**
 * Module dependencies.
 */

var express = require('express');
var routes = require('./routes');
var user = require('./routes/user');
var http = require('http');
var path = require('path');
var SerialPort = require('serialport').SerialPort;
var ioclient = require('socket.io-client');

var app = express();
var server = http.createServer(app);

// all environments
app.set('port', process.env.PORT || 3001);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));

// development only
if ('development' == app.get('env')) {
  app.use(express.errorHandler());
}

app.get('/', routes.index);
app.get('/users', user.list);

server.listen(app.get('port'), function(){
  console.log('Express server listening on port ' + app.get('port'));
});

//socket = ioclient.connect('http://semterface.herokuapp.com/');  
socket = ioclient.connect('http://semterface.aws.af.cm/');
socket.on('news', function (data) {
      console.log(data);
});

var portName = '/dev/tty.usbserial-A800ewsy'; // My Arduino
//var portName = '/dev/tty.usbmodem3d11'; // SEM Port

console.log("Serial session started.");
serial = new SerialPort(portName, {
    baudrate: 9600
});

socket.on('control', function (data) {
    console.log(data);
    switch(data.move) {
    case 'up':
    serial.write(new Buffer([119]));
    break;
    case 'down':
    serial.write(new Buffer([115]))
    break;
    case 'right':
    serial.write(new Buffer([100]));
    break;
    case 'left':
    serial.write(new Buffer([97]));
    break;  
  }
});
{'fraction_non_alphanumeric': 0.20640465793304222, 'fraction_numerical': 0.01572052401746725, 'mean_word_length': 4.327131782945736, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4189555', 'n_tokens_mistral': 1166, 'n_tokens_neox': 1123, 'n_words': 234}