您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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 size square
  61. set xzeroaxis
  62. set yzeroaxis
  63. set xlabel "dx" font "Italic,32"
  64. splot 'part0/lena-values.txt' with lines
  65. #set border 0
  66. set style line 1 lt 1 lw 1
  67. set style line 2 lt 2 lw 1
  68. set style line 3 lt 3 lw 1
  69. set style line 4 lt 6 lw 1
  70. set style line 5 lt 1 lw 3
  71. set style line 6 lt 2 lw 3
  72. set style line 7 lt 3 lw 3
  73. set style line 8 lt 6 lw 3
  74. ###
  75. ###
  76. ###
  77. ###
  78. ### Stuff below here is deprecated or unsorted
  79. ###
  80. ###
  81. ###
  82. ###
  83. #% 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
  84. #% 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
  85. #% cat /tmp/4chanlist.txt | xargs -n 1 ./main | tee -a fs-4chan.txt
  86. # Lena
  87. set hidden3d
  88. set grid
  89. unset colorbox
  90. splot "lena-min.txt" with lines lc 7 notitle
  91. set terminal epslatex color size 2.5,2 blacktext
  92. set tmargin screen 0.75
  93. set bmargin screen 0.25
  94. set lmargin screen 0.05
  95. set rmargin screen 0.95
  96. set output "lena-min.tex"
  97. splot "lena-min.txt" with lines lc 7 notitle
  98. unset output
  99. set term pop
  100. # Dans gnuplot
  101. set xrange [-.1:.4]
  102. set yrange [.45:-.05]
  103. set grid
  104. plot "fs-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  105. "fs-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  106. "fs-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI", \
  107. "fs-jylam.txt" using 6:7 lc 4 pt 7 ps .08 title "Jylam", \
  108. "merge.txt" using 5:6 lc 7 ps .2 with lines
  109. #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
  110. # Histogramme de la tache Floyd-Steinberg
  111. sed -ne 's/.* for //p' fs-*txt | ./xy2d >| histo-fs.txt
  112. # Et ensuite dans gnuplot:
  113. set xrange [-.1:.4]
  114. set yrange [.4:-.1]
  115. set grid
  116. set lmargin screen 0.05
  117. set bmargin screen 0.15
  118. set tmargin screen 0.95
  119. set rmargin screen 0.95
  120. unset colorbox
  121. set pm3d explicit map interpolate 1.8,1.8
  122. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  123. unset key
  124. #splot "histo-fs.txt" notitle
  125. set terminal epslatex color size 1.8,1.8 blacktext
  126. set output "fs-histo.tex"
  127. splot "histo-fs.txt" notitle
  128. unset output
  129. set term pop
  130. set xrange [-.1:.9]
  131. set yrange [.95:-.05]
  132. set grid
  133. plot "jajuni-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  134. "jajuni-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  135. "jajuni-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  136. # Histogramme de la tache JaJuNi
  137. sed -ne 's/.* for //p' jajuni*txt | ./xy2d-jajuni >| histo-jajuni.txt
  138. # Et ensuite dans gnuplot:
  139. set xrange [-.1:.9]
  140. set yrange [.9:-.1]
  141. set grid
  142. set lmargin screen 0.05
  143. set bmargin screen 0.15
  144. set tmargin screen 0.95
  145. set rmargin screen 0.95
  146. unset colorbox
  147. set pm3d explicit map interpolate 1.8,1.8
  148. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  149. unset key
  150. #splot "histo-jajuni.txt" notitle
  151. set terminal epslatex color size 1.8,1.8 blacktext
  152. set output "jajuni-histo.tex"
  153. splot "histo-jajuni.txt" notitle
  154. unset output
  155. set term pop
  156. # Test de merde
  157. set xrange [0:5]
  158. set yrange [0:5]
  159. set grid
  160. 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
  161. # Ostromoukhov
  162. set xrange [-.2:.2]
  163. set yrange [.3:-.1]
  164. set grid
  165. plot "ostro-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  166. "ostro-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  167. "ostro-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  168. # Histogramme de la tache Ostro
  169. sed -ne 's/.* for //p' ostro*txt | ./xy2d-ostro >| histo-ostro.txt
  170. # Et ensuite dans gnuplot:
  171. set xrange [-.2:.2]
  172. set yrange [.3:-.1]
  173. set grid
  174. set lmargin screen 0.05
  175. set bmargin screen 0.15
  176. set tmargin screen 0.95
  177. set rmargin screen 0.95
  178. unset colorbox
  179. set pm3d explicit map interpolate 1.8,1.8
  180. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  181. unset key
  182. splot "histo-ostro.txt" notitle
  183. set terminal epslatex color size 1.8,1.8 blacktext
  184. set output "ostro-histo.tex"
  185. splot "histo-ostro.txt" notitle
  186. unset output
  187. set term pop
  188. # Optimum
  189. set xrange [-.5:.2]
  190. set yrange [.6:-.1]
  191. set grid
  192. plot "optimum-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  193. "optimum-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  194. "optimum-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  195. # Histogramme de la tache Optimum
  196. sed -ne 's/.* for //p' optimum*txt | ./xy2d-optimum >| histo-optimum.txt
  197. # Et ensuite dans gnuplot:
  198. set xrange [-.5:.2]
  199. set yrange [.6:-.1]
  200. set grid
  201. set lmargin screen 0.05
  202. set bmargin screen 0.15
  203. set tmargin screen 0.95
  204. set rmargin screen 0.95
  205. unset colorbox
  206. set pm3d explicit map interpolate 1.8,1.8
  207. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  208. unset key
  209. splot "histo-optimum.txt" notitle
  210. set terminal epslatex color size 1.8,1.8 blacktext
  211. set output "optimum-histo.tex"
  212. splot "histo-optimum.txt" notitle
  213. unset output
  214. set term pop
  215. # Serpentine Optimum
  216. set xrange [-.3:.3]
  217. set yrange [.5:-.1]
  218. set grid
  219. plot "serpopt-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  220. "serpopt-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  221. "serpopt-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  222. # Histogramme de la tache Serpentine Optimum
  223. sed -ne 's/.* for //p' serpopt*txt | ./xy2d-serpopt >| histo-serpopt.txt
  224. # Et ensuite dans gnuplot:
  225. set xrange [-.3:.3]
  226. set yrange [.6:-.1]
  227. set grid
  228. set lmargin screen 0.05
  229. set bmargin screen 0.15
  230. set tmargin screen 0.95
  231. set rmargin screen 0.95
  232. unset colorbox
  233. set pm3d explicit map interpolate 1.8,1.8
  234. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  235. unset key
  236. splot "histo-serpopt.txt" notitle
  237. set terminal epslatex color size 1.8,1.8 blacktext
  238. set output "serpopt-histo.tex"
  239. splot "histo-serpopt.txt" notitle
  240. unset output
  241. set term pop
  242. # Combinaison jajuni / Floyd-Steinberg
  243. set xrange [-.1:.4]
  244. set yrange [.9:-.1]
  245. set grid
  246. 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"
  247. ######################## Trucs en cours ########################
  248. # Lancés sur canard:
  249. boat.png elaine.png texture[2345].png
  250. # Lancés sur poulet :
  251. ./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
  252. #### Pour les out-*
  253. scp canard.zoy.org:out-'*'.txt .
  254. for x in out-*.txt; do sort -k7 $x | head -20 ; done | cut -f1 -d: | sort | uniq -c | sort -n
  255. ###
  256. ### Conversion du vieux format de résultats (deprecated)
  257. cat -n $x | sed 's/^ *[0-9]*\([0-9]\)[[:space:]]*/[\1] /; s/....###/###/; s/\[[27]/[1/; s/\[[38]/[2/; s/\[[49]/[3/; s/\[[50]/[4/'
  258. #