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
#! /bin/sh | |
find . -name "*.xib" -type f | awk '{sub(/.xib/,"");print}' | xargs -I % ibtool --compile %.nib %.xib |
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/osascript | |
set rec to "1234567890" | |
set appleid to "E:[email protected]" | |
set today to current date | |
set currentDayNumber to day of today as string | |
set currentMonthName to month of today as string | |
set currentYear to year of today as string | |
set theDate to (currentMonthName & " " & currentDayNumber & ", " & currentYear & ".") |
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/python | |
# -*- coding: utf-8 -*- | |
''' | |
Code by @incorvengent (Anders Hoff - https://github.com/inconvergent/orbitals) | |
Inspired by http://www.complexification.net/gallery/machines/happyPlace/index.php | |
''' | |
import cairo | |
from PIL import Image | |
import numpy as np |
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
#! /bin/sh | |
i=1;while [ 1 ];do screencapture -t jpg -x $i.jpg; let i++;sleep 2; done |
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
#! /bin/sh | |
# cf. http://pages.uoregon.edu/noeckel/MakeMovie.html | |
# first convert an image sequence to a movie | |
ffmpeg -sameq -i %03d.jpg output.mp4 | |
# ... and then convert the movie to a GIF animation | |
ffmpeg -i output.mp4 -pix_fmt rgb24 -s qcif -loop_output 0 output.gif |
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
#! /bin/sh | |
# rename all PNGs in . from 0001.png to 0004.png | |
a=1; | |
for i in *.png; do | |
new=$(printf "%03d.png" "$a"); | |
mv -- "$i" "$new"; | |
let a=a+1; | |
done |
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
#!/bin/sh | |
palette="/tmp/palette.png" | |
filters="fps=15,scale=320:-1:flags=lanczos" | |
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette | |
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2 | |
# ./gifenc.sh video.mkv anim.gif |
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
n02119789 kit fox, Vulpes macrotis | |
n02100735 English setter | |
n02110185 Siberian husky | |
n02096294 Australian terrier | |
n02102040 English springer, English springer spaniel | |
n02066245 grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus | |
n02509815 lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens | |
n02124075 Egyptian cat | |
n02417914 ibex, Capra ibex | |
n02123394 Persian cat |
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
# Switch batch to homebrew master branches | |
cd /usr/local | |
git checkout master | |
cd /usr/local/Library/Taps/homebrew/homebrew-science | |
git checkout master | |
# Update homebrew; hopefully this works without errors! | |
brew update | |
# Switch back to the caffe branches with the formulae that you modified earlier |
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
# follow instructions on http://caffe.berkeleyvision.org/install_osx.html except for protobuf, where you should use --devel and not use --with-python because it is the default behaviour | |
brew install --devel protobuf #basically you are installing protobuf 3.0, the same checked by pip for tensorflow | |
# continue with caffe installation, after make all and before make runtest, set the right linking lib location | |
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 .build_release/test/test_all.testbin | |
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 .build_release/tools/caffe | |
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 .build_release/lib/libcaffe.so | |
# run make runtest, if everything is ok, before running make pycaffe set the right linking location for python | |
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 /Users/imac/caffe/python/caffe/_caffe.so | |
# make pycaffe; cd caffe/python; try to run python >>>impor |
OlderNewer