start new:
tmux
start new with session name:
tmux new -s myname
| #!/usr/bin/env python | |
| # gpu_stat.py [DELAY [COUNT]] | |
| # dump some gpu stats as a line of json | |
| # {"util":{"PCIe":"0", "memory":"11", "video":"0", "graphics":"13"}, "used_mem":"161"} | |
| import json, socket, subprocess, sys, time | |
| try: | |
| delay = int(sys.argv[1]) | |
| except: | |
| delay = 1 |
| #include <opencv2/opencv.hpp> | |
| #include <opencv2/nonfree/nonfree.hpp> | |
| #include <iostream> | |
| #include <vector> | |
| #include <cmath> | |
| using namespace std; | |
| using namespace cv; | |
| const double THRESHOLD = 400; |
| # First install tmux | |
| brew install tmux | |
| # For mouse support (for switching panes and windows) | |
| # Only needed if you are using Terminal.app (iTerm has mouse support) | |
| Install http://www.culater.net/software/SIMBL/SIMBL.php | |
| Then install https://bitheap.org/mouseterm/ | |
| # More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |