start new:
tmux
start new with session name:
tmux new -s myname
[package] | |
name = "testcontainers-sample" | |
version = "0.1.0" | |
edition = "2021" | |
[dev-dependencies] | |
async_once = "0.2.6" | |
aws-sdk-s3 = "0.28.0" | |
ctor = "0.2.4" | |
lazy_static = "1.4.0" |
var INPUT_TYPES = 'color|date|datetime|datetime-local|file|month|number|password|range|search|tel|text|time|url|week'.split('|') | |
var App = React.createClass({ | |
getInitialState: function() { | |
return {} | |
}, | |
onChange: handleFormInputChange, | |
render: function() { |
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. |
from cherrypy.process.plugins import Daemonizer,PIDFile | |
import cherrypy | |
import argparse | |
parser = argparse.ArgumentParser(description="My server daemon") | |
parser.add_argument('-d','--daemon',help='Run the server as a daemon using the traditional double fork',action='store_true') | |
parser.add_argument('-a','--bind-address',help='Network interface to bind to',default='127.0.0.1') | |
parser.add_argument('-p','--port',help='Port to bind to',default=8080,type=int) | |
parser.add_argument('--pidfile',help='process id file',type=str) | |
args = parser.parse_args() |
// For an unkown reason, this works when copy/paste in ammonite but not with `amm pca.sc` | |
import $ivy.`org.scalanlp::breeze-natives:0.13.2` | |
import $ivy.`org.scalanlp::breeze-viz:0.13.2` | |
import $ivy.`org.scalanlp::breeze:0.13.2` | |
import breeze.linalg._ | |
import breeze.linalg.svd._ | |
import breeze.plot._ | |
import scala.util.Random._ |
#!/bin/sh | |
# one way (older scala version will be installed) | |
# sudo apt-get install scala | |
#2nd way | |
sudo apt-get remove scala-library scala | |
wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb | |
sudo dpkg -i scala-2.11.4.deb | |
sudo apt-get update |
sudo apt-get install build-essential libsqlite3-dev zlib1g-dev libncurses5-dev libgdbm-dev libbz2-dev libreadline5-dev libssl-dev libdb-dev | |
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz | |
tar -xzf Python-2.7.3.tgz | |
cd Python-2.7.3 | |
./configure --prefix=/usr --enable-shared | |
make | |
sudo make install | |
cd .. |
from boto.emr.connection import EmrConnection | |
from boto.emr.step import InstallPigStep, PigStep | |
AWS_ACCESS_KEY = '' # REQUIRED | |
AWS_SECRET_KEY = '' # REQUIRED | |
conn = EmrConnection(AWS_ACCESS_KEY, AWS_SECRET_KEY) | |
pig_file = 's3://elasticmapreduce/samples/pig-apache/do-reports2.pig' | |
INPUT = 's3://elasticmapreduce/samples/pig-apache/input/access_log_1' | |
OUTPUT = '' # REQUIRED, S3 bucket for job output |
import akka.actor.Actor | |
import akka.actor.ActorSystem | |
import akka.agent.Agent | |
import com.typesafe.config.ConfigFactory | |
import akka.event.Logging | |
import akka.actor.Props | |
import kafka.utils.Utils | |
import java.nio.ByteBuffer | |