I hereby claim:
- I am jrx on github.
- I am jrx (https://keybase.io/jrx) on keybase.
- I have a public key whose fingerprint is 5A14 AD0E DEE2 A5D6 CB9E DFDC 96A7 8CC8 4BD8 688E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
-----BEGIN RSA PRIVATE KEY----- | |
MIIJJwIBAAKCAgEA5NMStV5G6bJHfx6XCvARPQU0oPjIo/04RoI1FUg37PakDyYY | |
1juILvRITSDrE0zPKA8fjAEJaQUuR519aEM+W1FgUKpZGWnSm8LVT2n8g0JZtZ9z | |
p8lKa2wFHpIH4W5I87N/s+e2LOVwCiKQebfigSCRlkNJzB2gglTglgottzIpnzXk | |
kgqoQ1AZUm8qLcNqOvFF8Es9PQzWX5qOuJwHy/ENs6uyUmpAkNrd2wF4LL2J3jsS | |
D1zsTEpDyhY7/jBZEkyQxL4Ney2Nh4L2BdR3lmjZ88DvoXR0Cbdo54rsB0pJf59i | |
knim6PBwzgp1bOtQpQ+Se4cq7Hs/zLdiN6vj6lMClvpUMgqfrD6vYMCakfEnm4eC | |
EDSkWSqx/Hti2s/xfQJJzjf/UjOwAFEDLNuevS8Jed3KwPHoQz5VuhsLICetpSTW | |
PxK5193MuxGM3EawhPw5/HZLeUuAovDbQZxmBzI9nFwBAm1Y74VXZ4nXHexk3bDe | |
ZqXlT+UE7QG4ZmQYVRx1IiJjZQFJL1IWVq1+gREJgmxMZ2CWGz8bz3tYIXE2NBc5 |
-----BEGIN RSA PRIVATE KEY----- | |
MIIJJwIBAAKCAgEA5NMStV5G6bJHfx6XCvARPQU0oPjIo/04RoI1FUg37PakDyYY | |
1juILvRITSDrE0zPKA8fjAEJaQUuR519aEM+W1FgUKpZGWnSm8LVT2n8g0JZtZ9z | |
p8lKa2wFHpIH4W5I87N/s+e2LOVwCiKQebfigSCRlkNJzB2gglTglgottzIpnzXk | |
kgqoQ1AZUm8qLcNqOvFF8Es9PQzWX5qOuJwHy/ENs6uyUmpAkNrd2wF4LL2J3jsS | |
D1zsTEpDyhY7/jBZEkyQxL4Ney2Nh4L2BdR3lmjZ88DvoXR0Cbdo54rsB0pJf59i | |
knim6PBwzgp1bOtQpQ+Se4cq7Hs/zLdiN6vj6lMClvpUMgqfrD6vYMCakfEnm4eC | |
EDSkWSqx/Hti2s/xfQJJzjf/UjOwAFEDLNuevS8Jed3KwPHoQz5VuhsLICetpSTW | |
PxK5193MuxGM3EawhPw5/HZLeUuAovDbQZxmBzI9nFwBAm1Y74VXZ4nXHexk3bDe | |
ZqXlT+UE7QG4ZmQYVRx1IiJjZQFJL1IWVq1+gREJgmxMZ2CWGz8bz3tYIXE2NBc5 |
#!/usr/bin/env python | |
from operator import add | |
from pyspark import SparkContext | |
if __name__ == "__main__": | |
sc = SparkContext(appName="WordCount") | |
lines = sc.textFile("hdfs:///spark-test/constitution.txt") | |
counts = lines.flatMap(lambda x: x.split(' ')) \ | |
.map(lambda x: (x, 1)) \ |
We the People of the United States, in Order to form a more perfect Union, | |
establish Justice, insure domestic Tranquility, provide for the common | |
defence, promote the general Welfare, and secure the Blessings of Liberty to | |
ourselves and our Posterity, do ordain and establish this Constitution for the | |
United States of America. | |
Article 1. | |
Section 1 | |
All legislative Powers herein granted shall be vested in a Congress of the |
{ | |
"id": "/kong", | |
"acceptedResourceRoles": [ | |
"slave_public" | |
], | |
"backoffFactor": 1.15, | |
"backoffSeconds": 1, | |
"cmd": "export KONG_NGINX_DAEMON=\"off\" && kong migrations up && kong prepare -p /usr/local/kong/ && /usr/local/openresty/nginx/sbin/nginx -c /usr/local/kong/nginx.conf -p /usr/local/kong/ ", | |
"container": { | |
"portMappings": [ |
{ | |
"id": "/postgresql", | |
"backoffFactor": 1.15, | |
"backoffSeconds": 1, | |
"container": { | |
"portMappings": [ | |
{ | |
"containerPort": 5432, | |
"hostPort": 0, | |
"labels": { |
{ | |
"id": "/postgresql", | |
"backoffFactor": 1.15, | |
"backoffSeconds": 1, | |
"container": { | |
"portMappings": [ | |
{ | |
"containerPort": 5432, | |
"hostPort": 0, | |
"labels": { |
{ | |
"id": "pgdump", | |
"run": { | |
"cpus": 0.5, | |
"mem": 512, | |
"disk": 0, | |
"cmd": "pg_dump --dbname=$PGDB --host=$PGHOST --port=$PGPORT --username=$PGUSER > $BACKUP_FOLDER/$PGHOST-$PGDB-`date +\\%Y-\\%m-\\%d-\\%H-\\%M-\\%S`.sql && gzip $BACKUP_FOLDER/*", | |
"docker": { | |
"image": "postgres:9.6" | |
}, |
from pyspark import SparkContext | |
from pyspark.streaming import StreamingContext | |
from pyspark.streaming.kafka import KafkaUtils | |
sc = SparkContext(appName="StreamingExampleWithKafka") | |
ssc = StreamingContext(sc, 10) | |
opts = {"metadata.broker.list": "kafka-0-broker.kafka.autoip.dcos.thisdcos.directory:1025"} | |
kvs = KafkaUtils.createDirectStream(ssc, ["mytopic"], opts) | |
lines = kvs.map(lambda x: x[1]) | |
counts = lines.flatMap(lambda line: line.split(" ")) \ | |
.map(lambda word: (word, 1)) \ |