start new:
tmux
start new with session name:
tmux new -s myname
| <html> | |
| <head> | |
| <title>D3 Axis Example</title> | |
| <script src="http://d3js.org/d3.v2.js"></script> | |
| </head> | |
| <body> | |
| <button id="rescale" onclick="rescale();">Rescale</button> | |
| <script> | |
| var width = 700, |
| Installing CYGWIN with SSH | |
| 1) Download cygwin setup.exe from http://www.cygwin.com | |
| - Execute setup.exe | |
| - Install from internet | |
| - Root directory: `c:\cygwin` + all users | |
| - Local package directory: use default value | |
| - Select a mirror to download files from | |
| - Select these packages: | |
| - editors > xemacs 21.4.22-1 | |
| - net > openssh 6.1-p |
| import scala.concurrent.duration._ | |
| import scala.concurrent.ExecutionContext | |
| import scala.concurrent.Future | |
| import akka.pattern.after | |
| import akka.actor.Scheduler | |
| /** | |
| * Given an operation that produces a T, returns a Future containing the result of T, unless an exception is thrown, | |
| * in which case the operation will be retried after _delay_ time, if there are more possible retries, which is configured through | |
| * the _retries_ parameter. If the operation does not succeed and there is no retries left, the resulting Future will contain the last failure. |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| import PIL.Image | |
| from cStringIO import StringIO | |
| import IPython.display | |
| import numpy as np | |
| def showarray(a, fmt='png'): | |
| a = np.uint8(a) | |
| f = StringIO() | |
| PIL.Image.fromarray(a).save(f, fmt) | |
| IPython.display.display(IPython.display.Image(data=f.getvalue())) |
| package com.softwaremill.akka | |
| import java.time._ | |
| import akka.actor.ActorSystem | |
| import akka.stream.ActorMaterializer | |
| import akka.stream.scaladsl.Source | |
| import scala.collection.mutable | |
| import scala.concurrent.Await |
| case class SomeEvent(value: Long) | |
| val events = Source | |
| .tick(0 seconds, 250 millis, "") | |
| .zipWithIndex | |
| .map { case (_, l) => | |
| SomeEvent(l) | |
| } | |
| val group = Flow[SomeEvent].groupedWithin(100, 500 millis) // +/- 2 events per group |
Author: Chris Lattner