Original revision: 1.26
Paul Armstrong
Too many more to mention
Parsed to Markdown by Wesley Rocha. See source.
| # Set vi key bindings mode | |
| set -g mode-keys vi | |
| set -g status-keys vi | |
| # Set new panes to open in current directory | |
| bind c new-window -c "#{pane_current_path}" | |
| bind '"' split-window -c "#{pane_current_path}" | |
| bind % split-window -h -c "#{pane_current_path}" | |
| # List of plugins |
Original revision: 1.26
Paul Armstrong
Too many more to mention
Parsed to Markdown by Wesley Rocha. See source.
| #!/usr/bin/env bash | |
| # https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
| sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" | |
| sudo apt-get update | |
| sudo apt-get install docker-ce | |
| # https://docs.docker.com/compose/install/ |
| #!/bin/bash | |
| # install CUDA Toolkit v9.0 | |
| # instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb) | |
| CUDA_REPO_PKG="cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb" | |
| wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/${CUDA_REPO_PKG} | |
| sudo dpkg -i ${CUDA_REPO_PKG} | |
| sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
| sudo apt-get update | |
| sudo apt-get -y install cuda-9-0 |
| from tqdm import tqdm | |
| import requests | |
| chunk_size = 1024 | |
| url = "http://www.nervenet.org/pdf/python3handson.pdf" | |
| r = requests.get(url, stream = True) | |
| total_size = int(r.headers['content-length']) |
| '''Train a Siamese MLP on pairs of digits from the MNIST dataset. | |
| It follows Hadsell-et-al.'06 [1] by computing the Euclidean distance on the | |
| output of the shared network and by optimizing the contrastive loss (see paper | |
| for mode details). | |
| [1] "Dimensionality Reduction by Learning an Invariant Mapping" | |
| http://yann.lecun.com/exdb/publis/pdf/hadsell-chopra-lecun-06.pdf | |
| Run on GPU: THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python mnist_siamese_graph.py |
| """An example of a cache decorator.""" | |
| import json | |
| from functools import wraps | |
| from redis import StrictRedis | |
| redis = StrictRedis() | |
| def cached(func): |
| #!/bin/bash | |
| # | |
| # This script should do: | |
| # | |
| # 1) test if nfs folder is mounted and exit 0 if yes | |
| # 2) try to mount it and exit 0 if success | |
| # 3) try to wake the server if not possible to mount | |
| # 4) wait while its not woked (pinging) | |
| # 5) try againt 2-4 several times |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.
Here's how it should work: