Skip to content

Instantly share code, notes, and snippets.

View tengpeng's full-sized avatar

Teng Peng tengpeng

View GitHub Profile
@tengpeng
tengpeng / a.rb
Created February 18, 2016 21:35
list file by time
ls -lt
@tengpeng
tengpeng / a.rb
Created February 18, 2016 07:07
install mxnet
git clone --recursive https://github.com/dmlc/mxnet
cd mxnet; cp make/config.mk .
echo "USE_CUDA=1" >>config.mk
echo "USE_CUDA_PATH=/usr/local/cuda" >>config.mk
echo "USE_CUDNN=1" >>config.mk
echo "USE_BLAS=atlas" >> config.mk
echo "USE_DIST_KVSTORE = 1" >>config.mk
echo "USE_S3=1" >>config.mk
@tengpeng
tengpeng / a.rb
Created February 18, 2016 06:16
ec2 terminate spot instance
aws ec2 cancel-spot-instance-requests --spot-instance-request-ids sir-02g004p9
@tengpeng
tengpeng / a.rb
Created February 18, 2016 05:46
terminate instance at
aws ec2 cancel-spot-fleet-requests --spot-fleet-request-ids sir-02g004p9 --terminate-instances | at now + 2hours
@tengpeng
tengpeng / install-tensorflow.sh
Created February 18, 2016 04:52 — forked from erikbern/install-tensorflow.sh
Installing TensorFlow on EC2
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update
@tengpeng
tengpeng / a.rb
Created February 18, 2016 04:33
cuda error
export CUDA_HOME=/usr/local/cuda-7.0
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64
PATH=${CUDA_HOME}/bin:${PATH}
export PATH
@tengpeng
tengpeng / a.rb
Created February 18, 2016 02:52
mount ssd
sudo mkfs.ext4 /dev/xvdb
sudo mkdir -m 000 /mnt # isnt required if /mnt exists.
echo "/dev/xvdb /mnt auto noatime 0 0" | sudo tee -a /etc/fstab
sudo mount /mnt
@tengpeng
tengpeng / a.rb
Created February 17, 2016 04:21
lambda x
f = lambda x: x.max() - x.min()
frame.apply(f)
@tengpeng
tengpeng / a.rb
Created February 16, 2016 07:04
s3 size
aws s3 ls --summarize --human-readable --recursive s3://kagglept
@tengpeng
tengpeng / a.rb
Created February 15, 2016 22:39
cuda error
sudo ldconfig /usr/local/cuda/lib64