[ Launch: test ] 31d9162becdc06a7fb34 by rtanglao
This file contains hidden or 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
counts <- table(topcolour.ig.vancouver.2014$count) | |
barplot(counts, main="Colour Distribution", | |
+ xlab="Colour Counts") |
This file contains hidden or 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 | |
files=(/usr/include/*.h /usr/include/sys/*.h) | |
for ((i=0; i<${#files[*]}; i+=100)); do | |
grep foo "${files[@]:i:100}" /dev/null | |
done |
This file contains hidden or 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
gm convert -crop 1x1+0+0 @top10jpgs.txt +profile "*" +adjoin TOPCOLOUR/%07d-top-colour.png |
This file contains hidden or 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
gm convert -crop 1x1+0+0 0000001-top10.jpg +profile "*" 0000001-top-colour.png |
This file contains hidden or 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
gm montage -verbose -adjoin -tile 192x1080 +f +shadow +label \ | |
+adjoin -geometry '10x1+0+0<' @all_jpgs.txt %06d-hd-all-vancouver-2014.jpg |
This file contains hidden or 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
> db.photos.ensureIndex({"images.thumbnail.url": 1}); | |
{ | |
"createdCollectionAutomatically" : true, | |
"numIndexesBefore" : 1, | |
"numIndexesAfter" : 2, | |
"ok" : 1 | |
} |
This file contains hidden or 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 ruby | |
require 'rubygems' | |
require 'RMagick' | |
TOP_N = 10 # Number of swatches | |
# Create a 1-row image that has a column for every color in the quantized | |
# image. The columns are sorted decreasing frequency of appearance in the | |
# quantized image. | |
def sort_by_decreasing_frequency(img) |
This file contains hidden or 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
Verifying that +rtanglao is my Bitcoin username. You can send me #bitcoin here: https://onename.io/rtanglao |
This file contains hidden or 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
db.photos.findOne({"url_sq" : {$regex : ".*548386304_8c12cfe51c_s.*"}}) |