This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from collections import OrderedDict | |
from os import path | |
from PIL import Image | |
import argparse | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ROS_MASTER_URI=http://localhost:11311 | |
yesmaster() { | |
export ROS_MASTER_URI=http://$1:11311 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# crontab -e | |
# Backups at 5:15am every day | |
15 05 * * * /usr/local/bin/restic -r /media/backup/<dir>/<restic-repo> -p <pass> backup <dir to backup>;/usr/local/bin/restic -r /media/backup/<dir>/<restic-repo> -p <pass> prune |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <random> | |
using namespace std; | |
void createRandomHash(vector<uint8_t>& hash) | |
{ | |
random_device r; | |
default_random_engine re(r()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash/zsh git prompt support | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# This script allows you to see repository status in your prompt. | |
# | |
# To enable: | |
# | |
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# store colors | |
MAGENTA="\[\033[0;35m\]" | |
YELLOW="\[\033[01;32m\]" | |
BLUE="\[\033[00;96m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
CYAN="\[\033[0;36m\]" | |
GREEN="\[\033[00m\]" | |
RED="\[\033[0;31m\]" | |
VIOLET='\[\033[01;35m\]' | |
- Put slacktive.py somewhere on your system, then change the path in slacktive.plist
- Put com.sean.python.slacktive.plist in ~/Library/LaunchAgents/
- Add your token to com.sean.python.slacktive.plist (see file comments)
launchctl load ~/Library/LaunchAgents/com.sean.python.slactive.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cv::Mat createLOGKernel1D(int ksize, float sigma) | |
{ | |
using namespace cv; | |
float std2 = sigma * sigma; | |
std::vector<float> seq(ksize); | |
std::iota(begin(seq), end(seq), -(ksize-1)/2); | |
Mat_<float> kSeq(1, ksize, seq.data()); | |
Mat XX; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nvidia-xconfig: X configuration file generated by nvidia-xconfig | |
# nvidia-xconfig: version 375.20 (buildmeister@swio-display-x86-rhel47-06) Tu | |
e Nov 15 17:49:44 PST 2016 | |
Section "ServerLayout" | |
Identifier "Layout0" | |
Screen 0 "Screen0" | |
InputDevice "Keyboard0" "CoreKeyboard" | |
InputDevice "Mouse0" "CorePointer" | |
EndSection |
NewerOlder