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
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 / 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 / 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
@trungnt13
trungnt13 / simple_gan.py
Created March 21, 2016 22:21 — forked from Newmu/simple_gan.py
Simple Generative Adversarial Network Demo
import os
import numpy as np
from matplotlib import pyplot as plt
from time import time
from foxhound import activations
from foxhound import updates
from foxhound import inits
from foxhound.theano_utils import floatX, sharedX
@trungnt13
trungnt13 / pycuda_req_rep_demo.py
Created March 31, 2016 22:27 — forked from lebedov/pycuda_req_rep_demo.py
Interprocess communication with pyzmq and multiprocessing
#!/usr/bin/env python
"""
Pass data between processes started through the multiprocessing module
using pyzmq and process them with PyCUDA
"""
import numpy as np
import zmq
import multiprocessing as mp
@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 / tensorflow_cuda_osx.md
Created June 3, 2016 10:19 — forked from Mistobaan/tensorflow_cuda_osx.md
How to enable cuda support for tensor flow on Mac OS X (Updated on April:2016 Tensorflow 0.8)

These instructions will explain how to install tensorflow on mac with cuda enabled GPU suport. I assume you know what tensorflow is and why you would want to have a deep learning framework running on your computer.

Prerequisites

Make sure to update your homebrew formulas

brew update