Skip to content

Instantly share code, notes, and snippets.

View minyk's full-sized avatar
😀
Containerize! all the things!

Drake Youngkun Min minyk

😀
Containerize! all the things!
View GitHub Profile
@minyk
minyk / Dockerfile
Created December 14, 2016 02:28
Dockerfile for Apache Zeppelin + Numpy + Scipy
FROM dit4c/dit4c-container-zeppelin:latest
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk add --update python-dev gfortran build-base py-numpy@community py-scipy@testing
@minyk
minyk / si7021.py
Created November 8, 2016 04:49
Si7021 Sensor Module for Micropython-ESP8266
from time import sleep_ms
from machine import Pin, I2C
# Default Address
SI7021_I2C_DEFAULT_ADDR = 0x40
# Commands
CMD_MEASURE_RELATIVE_HUMIDITY_HOLD_MASTER_MODE = 0xE5
CMD_MEASURE_RELATIVE_HUMIDITY = 0xF5
CMD_MEASURE_TEMPERATURE_HOLD_MASTER_MODE = 0xE3
@minyk
minyk / Vagrantfile
Created October 17, 2016 02:29
Vagrant within another machinefolder
machine.vm.provider 'virtualbox' do |v, override|
v.name = machine.vm.hostname
v.cpus = machine_type['cpus'] || 2
v.memory = machine_type['memory'] || 2048
v.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
v.customize ['setproperty', 'machinefolder','/data/vagrant/vmz']
override.vm.network :private_network, ip: machine_type['ip']
end
@minyk
minyk / install.sh
Created September 20, 2016 13:43
HAP-NodeJS in C.H.I.P
sudo apt-get install xz-utils
sudo apt-get install git
sudo apt-get install build-essential
sudo apt-get install libavahi-compat-libdnssd-dev
@minyk
minyk / sample.scala
Created August 23, 2016 06:09
Spark query plan
var inputDF = sqlContext.read.json("/tmp/test1.json")
val query = sqlContext.sql("SELECT age FROM test WHERE age > 30")
val plan = query.queryExecution
@minyk
minyk / dcos-kibana.json
Created June 16, 2016 08:48
dcos-kibana.json
{
"id": "/dashboard/kibana",
"cmd": null,
"cpus": 1,
"mem": 512,
"disk": 0,
"instances": 1,
"container": {
"docker": {
"image": "kibana",
@minyk
minyk / dcos-elasticsearch-singlenode.json
Created June 16, 2016 08:48
dcos-elasticsearch-singlenode
{
"id": "/dashboard/elasticsearch",
"cmd": null,
"cpus": 1,
"mem": 1024,
"disk": 0,
"instances": 1,
"container": {
"docker": {
"image": "elasticsearch",
{
"id": "nifi",
"cmd": null,
"cpus": 1,
"mem": 1024,
"disk": 1000,
"instances": 1,
"container": {
"docker": {
{
"id": "/hue",
"cmd": null,
"cpus": 1,
"mem": 512,
"disk": 0,
"instances": 1,
"container": {
"type": "DOCKER",
"volumes": [],
FlowFile flowFile = session.get();
# Do something with flowFile.
flowFile = session.write(flowFile, new OutputStreamCallback() {
@Override
public void process(OutputStream out) throws IOException {
}
});