###Tested with:
- Spark 2.0.0 pre-built for Hadoop 2.7
- Mac OS X 10.11
- Python 3.5.2
Use s3 within pyspark with minimal hassle.
| # Configuration | |
| HOME_DIR=/home/[user]/ | |
| VERSION=3.2.0 | |
| # Installation | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo apt-get install -y build-essential cmake pkg-config | |
| sudo apt-get install -y libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev | |
| sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
| import numpy as np | |
| from tensorflow.python.summary.event_accumulator import EventAccumulator | |
| import matplotlib as mpl | |
| import matplotlib.pyplot as plt | |
| def plot_tensorflow_log(path): | |
| # Loading too much data is slow... | |
| tf_size_guidance = { |
| /* | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2016 Esa-Matti Suuronen <esa-matti@suuronen.org> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. |
| // Restify Server CheatSheet. | |
| // More about the API: http://mcavage.me/node-restify/#server-api | |
| // Install restify with npm install restify | |
| // 1.1. Creating a Server. | |
| // http://mcavage.me/node-restify/#Creating-a-Server | |
| var restify = require('restify'); |
| description "Kafka Broker" | |
| start on runlevel [2345] | |
| stop on starting rc RUNLEVEL=[016] | |
| respawn | |
| respawn limit 2 5 | |
| env CONFIG_HOME="/etc/kafka" | |
| env KAFKA_HOME="/usr/lib/kafka" |
| # | |
| # Commands executed in Cassandra | |
| # | |
| /* | |
| connect 127.0.0.1/9160; | |
| create keyspace twitter; | |
| use twitter; | |
| # Create a column family to contain the rowcount of how many tweets I have. | |
| CREATE COLUMN FAMILY rowcounts |