Skip to content

Instantly share code, notes, and snippets.

This is a instruction on how to install Caffe on OSX Sierra 10.12.2
First we need to install opencv
brew install opencv (version 2.4.13.2)
(optional)
Add to python site-packages
sudo ln -s /usr/local/Cellar/opencv/2.4.13.2/lib/python2.7/site-packages/cv.py cv.py
sudo ln -s /usr/local/Cellar/opencv/2.4.13.2/lib/python2.7/site-packages/cv2.so cv2.so
import sublime, sublime_plugin
class TsqltCommand(sublime_plugin.TextCommand):
def run(self, edit):
cmd = "exec tSQLt.RunAll"
for region in self.view.sel():
if not region.empty():
sel=self.view.substr(region)
cmd = "exec tSQLt.Run " + "'" + sel + "'"
print(cmd)
@Enouk
Enouk / Good web plugins for Sublime
Last active January 4, 2016 15:59
Good web plugins for Sublime
HTML-CSS-JS Prettify
JSHint Gutter
sublimetext_indentxml
@Enouk
Enouk / RebarSingleTestCommand.py
Created January 26, 2014 19:37
Sublime text rebar eunit
import sublime, sublime_plugin, subprocess
class RebarSingleTestCommand(sublime_plugin.TextCommand):
def run(self, edit):
project_path=self.view.window().folders()[0]
file_name=self.view.file_name()
app_name=self.get_app_name(file_name)
module_name=self.get_module_name(file_name)
tests=""
for region in self.view.sel():
@Enouk
Enouk / SBT2 jshint
Last active December 17, 2015 06:49
SBT2 jshint
{
"selector": "source.js",
"cmd": "jshint.cmd ${file}"
}
@Enouk
Enouk / SBT2 ErlangBuild
Last active December 16, 2015 21:49
SBT2 ErlangBuild
{
"cmd": ["rebar"],
"working_dir": "${project_path:${folder}}",
"file_regex":"^([^:]+):([0-9]*):?(.*):?(.*)",
"selector": "source.erlang",
"cmd": "rebar.cmd compile skip_deps=true",
"variants": [
{
"cmd": "rebar.cmd eunit apps=skyraid_webmachine suite=${file_base_name} skip_deps=true",
@Enouk
Enouk / Rebar
Last active December 16, 2015 19:58
Rebar
// Run just a single test module
rebar eunit skip_deps=true apps=<app> suite=<module> -vv
@Enouk
Enouk / Git stuff
Last active December 16, 2015 14:40
Git stuff
// Format a patch with all commits against origin/master
git format-patch origin --stdout > my.patch
git format-patch -4 HEAD --stdout > my.patch
// Show stats about the patch
git apply --stat --ignore-space-change --ignore-whitespace my.patch
// Check if the patch is ok
git apply --check --ignore-space-change --ignore-whitespace my.patch
@Enouk
Enouk / SBT2 Keys
Created April 2, 2013 08:45
Eclipse alike
[
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["alt+shift+down"], "command": "duplicate_line" },
{ "keys": ["alt+shift+r"], "command": "find_under_expand" },
{ "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["shift+ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["ctrl+o"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["alt+left"], "command": "navigation_history_back"},