Skip to content

Instantly share code, notes, and snippets.

View crestonbunch's full-sized avatar

Creston Bunch crestonbunch

View GitHub Profile
@crestonbunch
crestonbunch / mount-volume.sh
Last active June 16, 2022 03:47
EC2 Mount EBS Volume
#!/bin/bash
set -e
REGION=$(curl -s http://169.254.169.254/latest/meta-data/placement/region)
INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
VOLUME_NAME=$1
VOLUME_DEVICE=$2
VOLUME_ID=$(aws ec2 describe-volumes --filters "Name=tag:Name,Values=${VOLUME_NAME}" --region "${REGION}" | jq -r .Volumes[0].VolumeId)

Keybase proof

I hereby claim:

  • I am crestonbunch on github.
  • I am crestonbunch (https://keybase.io/crestonbunch) on keybase.
  • I have a public key ASA-uu8JhILkeaWq1OtZ5i_1wGlXXyFqjl2T7ey8mgdNcAo

To claim this, I am signing this object:

@crestonbunch
crestonbunch / mlstm.py
Last active May 12, 2018 00:11
Multiplicative LSTM (mLSTM) Wrapper for Tensorflow
"""A multiplicative cell wrapper as described in
'Multiplicative LSTM for Sequence Modeling' by Krause et al."""
import tensorflow as tf
import math
from collections import namedtuple
from tensorflow.contrib.rnn import RNNCell
from tensorflow.python.ops.rnn_cell_impl import LSTMStateTuple
class MultiplicativeLSTMWrapper(RNNCell):