- Open Automator
- Create a new Service
- Add a
Run Shell Script
action - Set input to Service receives selected
files or folders
inany application
- Set the script action to
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n $@
- Set Pass input to
as arguments
- Save as
Open in Sublime Text
from numpy import dot,array,empty_like
from matplotlib.path import Path
def make_path(x1,y1,x2,y2):
return Path([[x1,y1],[x1,y2],[x2,y2],[x2,y1]])
def perp( a ) :
b = empty_like(a)
b[0] = -a[1]
d3.unconf example gist. Fork it here.