Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. # List all my 4chan images
  2. find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].???' | rev | sort -k2 -t. | rev > 4chan-list.txt
  3. # Put all my 4chan images in 100 separate /tmp directories
  4. for x in $(seq -w 00 09); do echo $x; mkdir -p /tmp/4chan/$x; cp $(find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'$x'.???') /tmp/4chan/$x; done
  5. # Results for part 1
  6. for x in 1 2 3 4; do
  7. grep '^\['$x part1/dionoea.txt | awk '{ e+=$4; ef+=$7; em+=$10; n++ } END { print e/n, ef/n, em/n }' | read a1 b1 c1
  8. grep '^\['$x part1/4chan.txt | awk '{ e+=$4; ef+=$7; em+=$10; n++ } END { print e/n, ef/n, em/n }' | read a2 b2 c2
  9. echo $(((3 * $a1 + $a2) / 4)) $(((3 * $b1 + $b2) / 4)) $(((3 * $c1 + $c2) / 4))
  10. done
  11. # Condorcet voting for phase 2 results
  12. # - raster + E
  13. # - raster + E_min
  14. # - serpentine + E
  15. # - serpentine + E_min
  16. for x in part2/*txt ; do grep '^.1' $x | awk '{ print $3,$5 }' >| $x.clean; done ; ./vote part2/*clean | sort -rnk3 | head -30 ; rm -f part2/*clean
  17. for x in part2/*txt ; do grep '^.1' $x | awk '{ print $3,$9 }' >| $x.clean; done ; ./vote part2/*clean | sort -rnk3 | head -30 ; rm -f part2/*clean
  18. for x in part2/*txt ; do grep '^.2' $x | awk '{ print $3,$5 }' >| $x.clean; done ; ./vote part2/*clean | sort -rnk3 | head -30 ; rm -f part2/*clean
  19. for x in part2/*txt ; do grep '^.2' $x | awk '{ print $3,$9 }' >| $x.clean; done ; ./vote part2/*clean | sort -rnk3 | head -30 ; rm -f part2/*clean
  20. # Get phase 3 and phase 4 stuff
  21. # .. from canard
  22. ssh canard.zoy.org "cd test-20080329; tar cz *raster.txt" | tar xz
  23. ssh canard.zoy.org "cd test-20080329; tar cz *serp.txt" | tar xz
  24. for x in *-raster.txt; do y="$x"; y="${y%%-raster.txt}"; y="${y%%.tiff}"; y="${y##usc-sipi}"; \mv "$x" part3/"$y".txt; done
  25. for x in *-serp.txt; do y="$x"; y="${y%%-serp.txt}"; y="${y%%.tiff}"; y="${y##usc-sipi}"; \mv "$x" part4/"$y".txt; done
  26. # .. from poulet (cpushare)
  27. scp poulet.zoy.org:cpushare/'test*-*.txt' .
  28. for f in test6-*.txt; do grep '###' $f|cut -f2 -d'`'|cut -f1 -d"'"|tr / .|while read i ; do sed -ne '/`'$i'/,/limit/p' $f | cut -b61- >| part3/$(echo $i | cut -f5 -d.).txt ; done; done; rm -f test6-*.txt
  29. for f in test7-*.txt; do grep '###' $f|cut -f2 -d'`'|cut -f1 -d"'"|tr / .|while read i ; do sed -ne '/`'$i'/,/limit/p' $f | cut -b61- >| part4/$(echo $i | cut -f5 -d.).txt ; done; done; rm -f test7-*.txt
  30. # Condorcet voting for part 3 and 4
  31. for x in part3/*txt ; do cat $x | awk '{ print $2,$4 }' >| $x.clean; done ; ./vote part3/*clean | sort -rnk3 | head -20 ; rm -f part3/*clean
  32. for x in part3/*txt ; do cat $x | awk '{ print $2,$8 }' >| $x.clean; done ; ./vote part3/*clean | sort -rnk3 | head -20 ; rm -f part3/*clean
  33. for x in part4/*txt ; do cat $x | awk '{ print $2,$4 }' >| $x.clean; done ; ./vote part4/*clean | sort -rnk3 | head -20 ; rm -f part4/*clean
  34. for x in part4/*txt ; do cat $x | awk '{ print $2,$8 }' >| $x.clean; done ; ./vote part4/*clean | sort -rnk3 | head -20 ; rm -f part4/*clean
  35. # Mean voting for part 3 and 4
  36. # Square mean voting is not interesting
  37. cat part3/aerials2.1.01.txt | while read x k y ; do echo "$k $(grep $k part3/* | awk '{ a+=$4; dx+=$10; dy+=$12; n+=1 } END { print a/n, dx/n, dy/n }')"; done | sort -nk2 | head -20
  38. cat part3/aerials2.1.01.txt | while read x k y ; do echo "$k $(grep $k part3/* | awk '{ a+=$8; dx+=$10; dy+=$12; n+=1 } END { print a/n, dx/n, dy/n }')"; done | sort -nk2 | head -20
  39. cat part4/aerials2.1.01.txt | while read x k y ; do echo "$k $(grep $k part4/* | awk '{ a+=$4; dx+=$10; dy+=$12; n+=1 } END { print a/n, dx/n, dy/n }')"; done | sort -nk2 | head -20
  40. cat part4/aerials2.1.01.txt | while read x k y ; do echo "$k $(grep $k part4/* | awk '{ a+=$8; dx+=$10; dy+=$12; n+=1 } END { print a/n, dx/n, dy/n }')"; done | sort -nk2 | head -20
  41. # root square mean voting... why not, after all?
  42. cat part3/aerials2.1.01.txt | while read x k y ; do echo "$k $(grep $k part3/* | awk '{ a+=sqrt($4); dx+=$10; dy+=$12; n+=1 } END { print (a/n)*(a/n), dx/n, dy/n }')"; done | sort -nk2 | head -20
  43. cat part3/aerials2.1.01.txt | while read x k y ; do echo "$k $(grep $k part3/* | awk '{ a+=sqrt($8); dx+=$10; dy+=$12; n+=1 } END { print (a/n)*(a/n), dx/n, dy/n }')"; done | sort -nk2 | head -20
  44. cat part4/aerials2.1.01.txt | while read x k y ; do echo "$k $(grep $k part4/* | awk '{ a+=sqrt($4); dx+=$10; dy+=$12; n+=1 } END { print (a/n)*(a/n), dx/n, dy/n }')"; done | sort -nk2 | head -20
  45. cat part4/aerials2.1.01.txt | while read x k y ; do echo "$k $(grep $k part4/* | awk '{ a+=sqrt($8); dx+=$10; dy+=$12; n+=1 } END { print (a/n)*(a/n), dx/n, dy/n }')"; done | sort -nk2 | head -20
  46. # Clever stuff (or not)
  47. cat part3/aerials2.1.01.txt | grep K | while read x k y ; do grep $k part3/* | awk '{ dx+=$10; dy+=$12; n+=1 } END { print dx/n, dy/n }' | read dx dy; echo "$k $(grep $k part3/* | awk 'BEGIN { dx='$dx'; dy='$dy' } { x=dx-$10; y=dy-$12; t+=2.^-5*(x*x+y*y); a+=t*$4; n+=t } END { print a/n, n }')"; done | sort -nk2 | head -20
  48. cat part3/aerials2.1.01.txt | grep K | while read x k y ; do grep $k part3/* | awk '{ dx+=$10; dy+=$12; n+=1 } END { print dx/n, dy/n }' | read dx dy; echo "$k $(grep $k part3/* | awk 'BEGIN { dx='$dx'; dy='$dy' } { x=dx-$10; y=dy-$12; t+=2.^-5*(x*x+y*y); a+=t*$8; n+=t } END { print a/n, n }')"; done | sort -nk2 | head -20
  49. cat part4/aerials2.1.01.txt | grep K | while read x k y ; do grep $k part4/* | awk '{ dx+=$10; dy+=$12; n+=1 } END { print dx/n, dy/n }' | read dx dy; echo "$k $(grep $k part4/* | awk 'BEGIN { dx='$dx'; dy='$dy' } { x=dx-$10; y=dy-$12; t+=2.^-5*(x*x+y*y); a+=t*$4; n+=t } END { print a/n, n }')"; done | sort -nk2 | head -20
  50. cat part4/aerials2.1.01.txt | grep K | while read x k y ; do grep $k part4/* | awk '{ dx+=$10; dy+=$12; n+=1 } END { print dx/n, dy/n }' | read dx dy; echo "$k $(grep $k part4/* | awk 'BEGIN { dx='$dx'; dy='$dy' } { x=dx-$10; y=dy-$12; t+=2.^-5*(x*x+y*y); a+=t*$8; n+=t } END { print a/n, n }')"; done | sort -nk2 | head -20
  51. # Plot lena displacement
  52. set contour
  53. unset surface
  54. set view 0,0
  55. set cntrparam levels discrete 0.31, 0.35, 0.42, 0.52, 0.7, 1, 1.5
  56. set xrange [-1:1]
  57. set yrange [1:-1]
  58. set mxtics 2
  59. set mytics 2
  60. set xlabel "$dx$"
  61. set ylabel "$dy$"
  62. unset mztics
  63. unset ztics
  64. set size square
  65. set xzeroaxis
  66. set yzeroaxis
  67. set lmargin screen 0.0 #.05
  68. set bmargin screen 0.2 # .15
  69. set tmargin screen 0.9 #.95
  70. set rmargin screen 0.9 #.95
  71. set terminal epslatex color size 5,2 blacktext
  72. unset colorbox
  73. #set lmargin 0.05
  74. #set rmargin 0.95
  75. #splot 'part0/lena-values.txt' with lines
  76. set output "lena-values.tex"
  77. splot '../part0/lena-values.txt' with lines lw 3 notitle
  78. unset output
  79. set term pop
  80. #set border 0
  81. set style line 1 lt 1 lw 1
  82. set style line 2 lt 2 lw 1
  83. set style line 3 lt 3 lw 1
  84. set style line 4 lt 6 lw 1
  85. set style line 5 lt 1 lw 3
  86. set style line 6 lt 2 lw 3
  87. set style line 7 lt 3 lw 3
  88. set style line 8 lt 6 lw 3
  89. ###
  90. ###
  91. ###
  92. ###
  93. ### Stuff below here is deprecated or unsorted
  94. ###
  95. ###
  96. ###
  97. ###
  98. #% find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].???' | rev | sort -k2 -t. | rev | xargs -n 1 ./main | tee fs-4chan.txt
  99. #% find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].???' | rev | sort -k2 -t. | rev | xargs -n 1 ./main-jajuni | tee jajuni-4chan.txt
  100. #% cat /tmp/4chanlist.txt | xargs -n 1 ./main | tee -a fs-4chan.txt
  101. # Lena
  102. set hidden3d
  103. set grid
  104. unset colorbox
  105. splot "lena-min.txt" with lines lc 7 notitle
  106. set terminal epslatex color size 2.5,2 blacktext
  107. set tmargin screen 0.75
  108. set bmargin screen 0.25
  109. set lmargin screen 0.05
  110. set rmargin screen 0.95
  111. set output "lena-min.tex"
  112. splot "lena-min.txt" with lines lc 7 notitle
  113. unset output
  114. set term pop
  115. # Dans gnuplot
  116. set xrange [-.1:.4]
  117. set yrange [.45:-.05]
  118. set grid
  119. plot "fs-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  120. "fs-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  121. "fs-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI", \
  122. "fs-jylam.txt" using 6:7 lc 4 pt 7 ps .08 title "Jylam", \
  123. "merge.txt" using 5:6 lc 7 ps .2 with lines
  124. #plot "fs-textures.txt" using 6:7 lc 3 pt 7 ps .2, "fs-aerials.txt" using 6:7 lc 3 pt 7 ps .2, "fs-misc.txt" using 6:7 lc 7 pt 7 ps .2, "fs-4chan.txt" using 6:7 lc 1 pt 7 ps .2
  125. # Histogramme de la tache Floyd-Steinberg
  126. sed -ne 's/.* for //p' fs-*txt | ./xy2d >| histo-fs.txt
  127. # Et ensuite dans gnuplot:
  128. set xrange [-.1:.4]
  129. set yrange [.4:-.1]
  130. set xlabel "$dx$"
  131. set ylabel "$dy$"
  132. set grid
  133. set lmargin screen 0.05
  134. set bmargin screen 0.25
  135. set tmargin screen 0.95
  136. set rmargin screen 0.95
  137. unset colorbox
  138. set pm3d explicit map interpolate 1.8,1.8
  139. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  140. unset key
  141. #splot "../../subblock/histo-fs.txt" notitle
  142. set terminal epslatex color size 1.8,2.0 blacktext
  143. set output "fs-histo.tex"
  144. splot "../../subblock/histo-fs.txt" notitle
  145. unset output
  146. set term pop
  147. set xrange [-.1:.9]
  148. set yrange [.95:-.05]
  149. set grid
  150. plot "jajuni-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  151. "jajuni-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  152. "jajuni-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  153. # Histogramme de la tache JaJuNi
  154. sed -ne 's/.* for //p' jajuni*txt | ./xy2d-jajuni >| histo-jajuni.txt
  155. # Et ensuite dans gnuplot:
  156. set xrange [-.1:.9]
  157. set yrange [.9:-.1]
  158. set xlabel "$dx$"
  159. set ylabel "$dy$"
  160. set grid
  161. set lmargin screen 0.05
  162. set bmargin screen 0.25
  163. set tmargin screen 0.95
  164. set rmargin screen 0.95
  165. unset colorbox
  166. set pm3d explicit map interpolate 1.8,1.8
  167. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  168. unset key
  169. #splot "../../subblock/histo-jajuni.txt" notitle
  170. set terminal epslatex color size 1.8,2.0 blacktext
  171. set output "jajuni-histo.tex"
  172. splot "../../subblock/histo-jajuni.txt" notitle
  173. unset output
  174. set term pop
  175. # Test de merde
  176. set xrange [0:5]
  177. set yrange [0:5]
  178. set grid
  179. plot "fs-uscsipi.txt" using 2:4 lc 1 pt 7 ps .5, "fs-4chan.txt" using 2:4 lc 7 pt 7 ps .5, "fs-tobefred.txt" using 2:4 lc 3 pt 7 ps .5
  180. # Ostromoukhov
  181. set xrange [-.2:.2]
  182. set yrange [.3:-.1]
  183. set grid
  184. plot "ostro-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  185. "ostro-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  186. "ostro-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  187. # Histogramme de la tache Ostro
  188. sed -ne 's/.* for //p' ostro*txt | ./xy2d-ostro >| histo-ostro.txt
  189. # Et ensuite dans gnuplot:
  190. set xrange [-.2:.2]
  191. set yrange [.3:-.1]
  192. set xlabel "$dx$"
  193. set ylabel "$dy$"
  194. set xtics -.2,0.1
  195. set grid
  196. set lmargin screen 0.05
  197. set bmargin screen 0.25
  198. set tmargin screen 0.95
  199. set rmargin screen 0.95
  200. unset colorbox
  201. set pm3d explicit map interpolate 1.8,1.8
  202. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  203. unset key
  204. splot "../../subblock/histo-ostro.txt" notitle
  205. set terminal epslatex color size 1.8,2.0 blacktext
  206. set output "ostro-histo.tex"
  207. splot "../../subblock/histo-ostro.txt" notitle
  208. unset output
  209. set term pop
  210. # Optimum
  211. set xrange [-.5:.2]
  212. set yrange [.6:-.1]
  213. set grid
  214. plot "optimum-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  215. "optimum-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  216. "optimum-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  217. # Histogramme de la tache Optimum
  218. sed -ne 's/.* for //p' optimum*txt | ./xy2d-optimum >| histo-optimum.txt
  219. # Et ensuite dans gnuplot:
  220. set xrange [-.5:.2]
  221. set yrange [.6:-.1]
  222. set xlabel "$dx$"
  223. set ylabel "$dy$"
  224. set grid
  225. set lmargin screen 0.05
  226. set bmargin screen 0.25
  227. set tmargin screen 0.95
  228. set rmargin screen 0.95
  229. unset colorbox
  230. set pm3d explicit map interpolate 1.8,1.8
  231. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  232. unset key
  233. splot "../../subblock/histo-optimum.txt" notitle
  234. set terminal epslatex color size 1.8,2.0 blacktext
  235. set output "optimum-histo.tex"
  236. splot "../../subblock/histo-optimum.txt" notitle
  237. unset output
  238. set term pop
  239. # Serpentine Optimum
  240. set xrange [-.3:.3]
  241. set yrange [.5:-.1]
  242. set grid
  243. plot "serpopt-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  244. "serpopt-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  245. "serpopt-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  246. # Histogramme de la tache Serpentine Optimum
  247. sed -ne 's/.* for //p' serpopt*txt | ./xy2d-serpopt >| histo-serpopt.txt
  248. # Et ensuite dans gnuplot:
  249. set xrange [-.3:.3]
  250. set yrange [.6:-.1]
  251. set xlabel "$dx$"
  252. set ylabel "$dy$"
  253. set grid
  254. set lmargin screen 0.05
  255. set bmargin screen 0.25
  256. set tmargin screen 0.95
  257. set rmargin screen 0.95
  258. unset colorbox
  259. set pm3d explicit map interpolate 1.8,1.8
  260. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  261. unset key
  262. splot "../../subblock/histo-serpopt.txt" notitle
  263. set terminal epslatex color size 1.8,2.0 blacktext
  264. set output "serpopt-histo.tex"
  265. splot "../../subblock/histo-serpopt.txt" notitle
  266. unset output
  267. set term pop
  268. # Combinaison jajuni / Floyd-Steinberg
  269. set xrange [-.1:.4]
  270. set yrange [.9:-.1]
  271. set grid
  272. plot "fs-4chan.txt" using 6:7 lc 2 pt 7 ps .1 title "Floyd-Steinberg", "jajuni-tobefred.txt" using 6:7 lc 1 pt 7 ps .1 title "Jarvis-Judice-Ninke"
  273. ######################## Trucs en cours ########################
  274. # Lancés sur canard:
  275. boat.png elaine.png texture[2345].png
  276. # Lancés sur poulet :
  277. ./main /var/www/net/tobefred/www/htdocs/media/romane_bohringer.jpg | tee out-bohringer.txt ; ./main /var/www/net/tobefred/www/htdocs/media/juliette_binoche_05.jpg | tee out-binoche.txt ; ./main /var/www/net/tobefred/www/htdocs/media/kate_beckinsale02.jpg | tee out-beckinsale.txt
  278. #### Pour les out-*
  279. scp canard.zoy.org:out-'*'.txt .
  280. for x in out-*.txt; do sort -k7 $x | head -20 ; done | cut -f1 -d: | sort | uniq -c | sort -n
  281. ###
  282. ### Conversion du vieux format de résultats (deprecated)
  283. cat -n $x | sed 's/^ *[0-9]*\([0-9]\)[[:space:]]*/[\1] /; s/....###/###/; s/\[[27]/[1/; s/\[[38]/[2/; s/\[[49]/[3/; s/\[[50]/[4/'
  284. # Convert lena results to cropped detail
  285. convert output-7-3-5-1-serp.png -crop 160x160+32+160 crop-7-3-5-1-serp.png
  286. convert output-7-4-5-0-serp.png -crop 160x160+32+160 crop-7-4-5-0-serp.png