Skip to content

Instantly share code, notes, and snippets.

View trungnt13's full-sized avatar
:octocat:
Coding, coding, ... and still coding

TrungNT trungnt13

:octocat:
Coding, coding, ... and still coding
View GitHub Profile
@trungnt13
trungnt13 / configureJetsonTK1.sh
Last active August 29, 2015 14:22
Configuration file for starting up Jetson TK1
#!/bin/sh
# Add some niceties for a new NVIDIA Jetson TK1 - LT 19.3
# sudo ./configureJetsonTK1.sh
# Note:
# -- Check DNS in /etc/resolv.conf if cannot connect to ports.ubuntu.com
# -- a
# Don't allow apt-get upgrade of xorg overwrite libglx.so
# May be fixed in future versions of LT4
sudo apt-mark hold xserver-xorg-core
# original post: http://blog.hostonnet.com/uninstall-gui-from-ubuntu-14-04-lts
sudo apt-get purge -y lightdm
sudo shutdown -r now
sudo apt-get clean
sudo apt-get autoclean
apt-get purge -y unity*
sudo apt-get purge -y unity*
sudo apt-get purge -y gnome-*
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
sudo pip install Theano ; sudo pip install pymc ; sudo pip install pycrypto ; sudo pip install Cython ; sudo pip install image;
sudo pip install Scrapy ;sudo pip install virtualenv; sudo pip install virtualenv-clone; sudo pip install virtualenvwrapper;
sudo pip install h5py;sudo pip install xlwt;sudo pip install lxml ;sudo pip install colorama; sudo pip install PyDot;
sudo pip install scikits.audiolab;
sudo pip install paramiko; sudo pip install readchar;
@trungnt13
trungnt13 / Install Caffe [Mac OS X 10.10.x]
Last active February 12, 2020 14:06
Install Caffe [Mac OS X 10.10.x]
# Install cuda 7
1. Download and install cuda 7 from here: https://developer.nvidia.com/cuda-downloads
2. add this to .bashrc or .bash_profile (I prefer the first one):
These 2 option will not work:
* export PATH=/Developer/NVIDIA/CUDA-7.0/bin:$PATH
* export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-7.0/lib:$DYLD_LIBRARY_PATH
Replace by these:
export PATH=/usr/local/cuda/bin:$PATH
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH
@trungnt13
trungnt13 / Setup Git private server
Last active August 29, 2015 14:25
Setup Git private server
##############################################################
# Client
##############################################################
mkdir [repo] && cd [repo]
git init
git add -A
git commit -m "Init git repo"
##############################################################
# Server
@trungnt13
trungnt13 / Setup Spark + Hadoop cluster
Last active August 29, 2015 14:25
Setup Spark + Hadoop cluster
# Download: prebuilt spark+hadoop
From: https://spark.apache.org/downloads.html
Prefer prebuilt version, easier to deploy to all worker
# Configuration
1. Slaves configuration
* Client:
sudo adduser worker
@trungnt13
trungnt13 / modules
Last active April 2, 2016 11:13
List of modules for server
module purge
module load cmake/3.3.2
module load cuda/7.5
module load gcc/4.9.1
module load git
module load openblas
@trungnt13
trungnt13 / Taito-GPU setup
Last active October 20, 2016 16:07
Step-by-step
# Loading the modules (these commands shuold be ran everytime you logged in)
module purge
module load StdEnv
module load gcc/4.8.2
module load git/1.9.2
module load python-env
module load cuda/7.0
module load boost/1.58
module load openblas
@trungnt13
trungnt13 / conv_deconv_variational_autoencoder.py
Created March 21, 2016 22:21 — forked from Newmu/conv_deconv_variational_autoencoder.py
Prototype code of conv/deconv variational autoencoder, probably not runable, lots of inter-dependencies with local codebase =/
import theano
import theano.tensor as T
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
from theano.tensor.signal.downsample import max_pool_2d
from theano.tensor.extra_ops import repeat
from theano.sandbox.cuda.dnn import dnn_conv
from time import time
import numpy as np
from matplotlib import pyplot as plt