As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
As configured in my dotfiles.
start new:
tmux
start new with session name:
# On the remote machine, start the IPython notebooks server | |
xpra start :100 # for enabling display of remote figures | |
DISPLAY:=100 screen # for enabling display of remote figures | |
ipython notebook --no-browser --port=8889 | |
# On the local machine, start an SSH tunnel | |
ssh -N -f -L localhost:8888:localhost:8889 remote_user@remote_host | |
# Open browser and copy this address |
# For more information, visit at | |
# https://www.tensorflow.org/install/install_linux | |
#1. NVIDIA requirements | |
#1.0 Install CUDA Toolkit | |
http://docs.nvidia.com/cuda/cuda-installation-guide-linux/#axzz4VZnqTJ2A | |
# Check which version | |
cat /usr/local/cuda/version.txt |
# The recommended command-line parsing module in the Python standard library | |
# Read the document here | |
# https://docs.python.org/2/howto/argparse.html | |
"""Tutorial of using Argparse""" | |
import argparse | |
parser = argparse.ArgumentParser() | |
## Positional argument |
# For more information, check this website | |
# http://deeplearning.lipingyang.org/2017/08/01/install-keras-with-tensorflow-backend/ | |
# Please make sure that | |
# – PATH includes /usr/local/cuda-8.0/bin | |
# – LD_LIBRARY_PATH includes /usr/local/cuda-8.0/lib64 | |
conda install pillow | |
conda install h5py |
## <0> Set-up environment | |
git config --global user.email "[email protected]" | |
git config --global user.name "Your Name" | |
# Cache the password | |
# https://help.github.com/articles/caching-your-github-password-in-git/#platform-linux | |
git config --global credential.helper 'cache --timeout=3600000' | |
# on Mac | |
git config --global credential.helper osxkeychain |
# Using two packages `tmux` (Ctrl+B) and `screen` (Ctrl+A): | |
#1. Create a new session: | |
#tmux | |
tmux new -s session_name | |
#screen | |
screen -S session_name | |
#2. Attach to the session: |
# Tmux is a "terminal multiplexer", it enables a number of terminals to be accessed and controlled from a single terminal. | |
If you use Debian/Ubuntu, you can just run apt-get install tmux, and voila. | |
Since the title was about centos 7, then do the following step to install tmux. | |
(1). tmux has a library dependency on libevent which, of course, isn’t installed by default. | |
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
$ tar xzvf libevent-2.0.21-stable.tar.gz | |
$ cd libevent-2.0.21-stable |
## Download file from the url | |
https://www.anaconda.com/download/#macos | |
## Run the graphical installer | |
## Install Tensorflow version 1.6 | |
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.6.0-py3-none-any.whl | |
## Install Keras | |
pip install keras |