start new:
tmux
start new with session name:
tmux new -s myname
| /* | |
| * Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
| */ | |
| var http = require('http'), | |
| fs = require('fs'), | |
| util = require('util'); | |
| http.createServer(function (req, res) { | |
| var path = 'video.mp4'; |
| var app = require('express')(); | |
| var GridStore = require('mongodb').GridStore; | |
| var ObjectID = require('mongodb').ObjectID; | |
| var MongoClient = require('mongodb').MongoClient; | |
| var Server = require('mongodb').Server; | |
| var dbConnection; | |
| MongoClient.connect("mongodb://localhost:27017/ersatz?auto_reconnect", {journal: true}, function(err, db) { | |
| dbConnection = db; | |
| app.listen(3000); |
| var data = sc.parallelize(Seq(("A", 2), ("A", 4), ("B", 2), ("Z", 0), ("B", 10))) | |
| // data: org.apache.spark.rdd.RDD[(java.lang.String, Int)] = ParallelCollectionRDD[31] at parallelize at <console>:12 | |
| val avgValue = data.mapValues((_, 1) | |
| .reduceByKey((x, y) => (x._1 + y._1, x._2 + y._2)) | |
| .mapValues{ case (sum, count) => (1.0 * sum) / count } | |
| .collectAsMap() | |
| // avgValue: scala.collection.Map[java.lang.String,Double] = Map(Z -> 0.0, B -> 6.0, A -> 3.0) |
| cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git |
| pkgname=hdf5-old | |
| pkgver=1.8.13 | |
| pkgrel=1 | |
| arch=('i686' 'x86_64') | |
| pkgdesc="General purpose library and file format for storing scientific data" | |
| url="http://www.hdfgroup.org/HDF5/" | |
| provides=('hdf5') | |
| conflicts=('hdf5') | |
| license=('custom') |
.
├── index.ios.js
├── js
│ ├── actions
│ │ ├── ChatServerActionCreators.js
│ │ └── ChatThreadActionCreators.js
│ ├── components
│ │ ├── ChatScreen
│ │ │ ├── index.js
| cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git |
| # Time Series Testing | |
| import keras.callbacks | |
| from keras.models import Sequential | |
| from keras.layers.core import Dense, Activation, Dense, Dropout | |
| from keras.layers.recurrent import LSTM | |
| # Call back to capture losses | |
| class LossHistory(keras.callbacks.Callback): | |
| def on_train_begin(self, logs={}): | |
| self.losses = [] |
| from keras import backend as K, initializers, regularizers, constraints | |
| from keras.engine.topology import Layer | |
| def dot_product(x, kernel): | |
| """ | |
| Wrapper for dot product operation, in order to be compatible with both | |
| Theano and Tensorflow | |
| Args: |