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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  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. # Condorcet voting for phase 2 results
  6. # - raster + E
  7. # - raster + E_min
  8. # - serpentine + E
  9. # - serpentine + E_min
  10. 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
  11. 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
  12. 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
  13. 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
  14. # Get phase 3 and phase 4 stuff
  15. # .. from canard
  16. ssh canard.zoy.org "cd test-20080329; tar cz *raster.txt" | tar xz
  17. ssh canard.zoy.org "cd test-20080329; tar cz *serp.txt" | tar xz
  18. 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
  19. 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
  20. # .. from poulet (cpushare)
  21. scp poulet.zoy.org:cpushare/'test*-*.txt' .
  22. 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
  23. 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
  24. # Condorcet voting for part 3 and 4
  25. 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
  26. 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
  27. 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
  28. 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
  29. # Mean voting for part 3 and 4
  30. 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
  31. 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
  32. 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
  33. 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
  34. # Clever stuff (or not)
  35. 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
  36. 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
  37. 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
  38. 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
  39. # Plot lena displacement
  40. set contour
  41. unset surface
  42. set view 0,0
  43. set cntrparam levels discrete 0.31, 0.35, 0.42, 0.52, 0.7, 1, 1.5
  44. set xrange [-1:1]
  45. set yrange [1:-1]
  46. set mxtics 2
  47. set mytics 2
  48. set size square
  49. set xzeroaxis
  50. set yzeroaxis
  51. set xlabel "dx" font "Italic,32"
  52. splot 'part0/lena-values.txt' with lines
  53. #set border 0
  54. set style line 1 lt 1 lw 1
  55. set style line 2 lt 2 lw 1
  56. set style line 3 lt 3 lw 1
  57. set style line 4 lt 6 lw 1
  58. set style line 5 lt 1 lw 3
  59. set style line 6 lt 2 lw 3
  60. set style line 7 lt 3 lw 3
  61. set style line 8 lt 6 lw 3
  62. ###
  63. ###
  64. ###
  65. ###
  66. ### Stuff below here is deprecated or unsorted
  67. ###
  68. ###
  69. ###
  70. ###
  71. #% 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
  72. #% 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
  73. #% cat /tmp/4chanlist.txt | xargs -n 1 ./main | tee -a fs-4chan.txt
  74. # Lena
  75. set hidden3d
  76. set grid
  77. unset colorbox
  78. splot "lena-min.txt" with lines lc 7 notitle
  79. set terminal epslatex color size 2.5,2 blacktext
  80. set tmargin screen 0.75
  81. set bmargin screen 0.25
  82. set lmargin screen 0.05
  83. set rmargin screen 0.95
  84. set output "lena-min.tex"
  85. splot "lena-min.txt" with lines lc 7 notitle
  86. unset output
  87. set term pop
  88. # Dans gnuplot
  89. set xrange [-.1:.4]
  90. set yrange [.45:-.05]
  91. set grid
  92. plot "fs-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  93. "fs-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  94. "fs-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI", \
  95. "fs-jylam.txt" using 6:7 lc 4 pt 7 ps .08 title "Jylam", \
  96. "merge.txt" using 5:6 lc 7 ps .2 with lines
  97. #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
  98. # Histogramme de la tache Floyd-Steinberg
  99. sed -ne 's/.* for //p' fs-*txt | ./xy2d >| histo-fs.txt
  100. # Et ensuite dans gnuplot:
  101. set xrange [-.1:.4]
  102. set yrange [.4:-.1]
  103. set grid
  104. set lmargin screen 0.05
  105. set bmargin screen 0.15
  106. set tmargin screen 0.95
  107. set rmargin screen 0.95
  108. unset colorbox
  109. set pm3d explicit map interpolate 1.8,1.8
  110. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  111. unset key
  112. #splot "histo-fs.txt" notitle
  113. set terminal epslatex color size 1.8,1.8 blacktext
  114. set output "fs-histo.tex"
  115. splot "histo-fs.txt" notitle
  116. unset output
  117. set term pop
  118. set xrange [-.1:.9]
  119. set yrange [.95:-.05]
  120. set grid
  121. plot "jajuni-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  122. "jajuni-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  123. "jajuni-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  124. # Histogramme de la tache JaJuNi
  125. sed -ne 's/.* for //p' jajuni*txt | ./xy2d-jajuni >| histo-jajuni.txt
  126. # Et ensuite dans gnuplot:
  127. set xrange [-.1:.9]
  128. set yrange [.9:-.1]
  129. set grid
  130. set lmargin screen 0.05
  131. set bmargin screen 0.15
  132. set tmargin screen 0.95
  133. set rmargin screen 0.95
  134. unset colorbox
  135. set pm3d explicit map interpolate 1.8,1.8
  136. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  137. unset key
  138. #splot "histo-jajuni.txt" notitle
  139. set terminal epslatex color size 1.8,1.8 blacktext
  140. set output "jajuni-histo.tex"
  141. splot "histo-jajuni.txt" notitle
  142. unset output
  143. set term pop
  144. # Test de merde
  145. set xrange [0:5]
  146. set yrange [0:5]
  147. set grid
  148. 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
  149. # Ostromoukhov
  150. set xrange [-.2:.2]
  151. set yrange [.3:-.1]
  152. set grid
  153. plot "ostro-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  154. "ostro-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  155. "ostro-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  156. # Histogramme de la tache Ostro
  157. sed -ne 's/.* for //p' ostro*txt | ./xy2d-ostro >| histo-ostro.txt
  158. # Et ensuite dans gnuplot:
  159. set xrange [-.2:.2]
  160. set yrange [.3:-.1]
  161. set grid
  162. set lmargin screen 0.05
  163. set bmargin screen 0.15
  164. set tmargin screen 0.95
  165. set rmargin screen 0.95
  166. unset colorbox
  167. set pm3d explicit map interpolate 1.8,1.8
  168. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  169. unset key
  170. splot "histo-ostro.txt" notitle
  171. set terminal epslatex color size 1.8,1.8 blacktext
  172. set output "ostro-histo.tex"
  173. splot "histo-ostro.txt" notitle
  174. unset output
  175. set term pop
  176. # Optimum
  177. set xrange [-.5:.2]
  178. set yrange [.6:-.1]
  179. set grid
  180. plot "optimum-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  181. "optimum-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  182. "optimum-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  183. # Histogramme de la tache Optimum
  184. sed -ne 's/.* for //p' optimum*txt | ./xy2d-optimum >| histo-optimum.txt
  185. # Et ensuite dans gnuplot:
  186. set xrange [-.5:.2]
  187. set yrange [.6:-.1]
  188. set grid
  189. set lmargin screen 0.05
  190. set bmargin screen 0.15
  191. set tmargin screen 0.95
  192. set rmargin screen 0.95
  193. unset colorbox
  194. set pm3d explicit map interpolate 1.8,1.8
  195. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  196. unset key
  197. splot "histo-optimum.txt" notitle
  198. set terminal epslatex color size 1.8,1.8 blacktext
  199. set output "optimum-histo.tex"
  200. splot "histo-optimum.txt" notitle
  201. unset output
  202. set term pop
  203. # Serpentine Optimum
  204. set xrange [-.3:.3]
  205. set yrange [.5:-.1]
  206. set grid
  207. plot "serpopt-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
  208. "serpopt-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
  209. "serpopt-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"
  210. # Histogramme de la tache Serpentine Optimum
  211. sed -ne 's/.* for //p' serpopt*txt | ./xy2d-serpopt >| histo-serpopt.txt
  212. # Et ensuite dans gnuplot:
  213. set xrange [-.3:.3]
  214. set yrange [.6:-.1]
  215. set grid
  216. set lmargin screen 0.05
  217. set bmargin screen 0.15
  218. set tmargin screen 0.95
  219. set rmargin screen 0.95
  220. unset colorbox
  221. set pm3d explicit map interpolate 1.8,1.8
  222. set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
  223. unset key
  224. splot "histo-serpopt.txt" notitle
  225. set terminal epslatex color size 1.8,1.8 blacktext
  226. set output "serpopt-histo.tex"
  227. splot "histo-serpopt.txt" notitle
  228. unset output
  229. set term pop
  230. # Combinaison jajuni / floyd-steinberg
  231. set xrange [-.1:.4]
  232. set yrange [.9:-.1]
  233. set grid
  234. 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"
  235. ######################## Trucs en cours ########################
  236. # Lancés sur canard:
  237. boat.png elaine.png texture[2345].png
  238. # Lancés sur poulet :
  239. ./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
  240. #### Pour les out-*
  241. scp canard.zoy.org:out-'*'.txt .
  242. for x in out-*.txt; do sort -k7 $x | head -20 ; done | cut -f1 -d: | sort | uniq -c | sort -n
  243. ###
  244. ### Conversion du vieux format de résultats (deprecated)
  245. cat -n $x | sed 's/^ *[0-9]*\([0-9]\)[[:space:]]*/[\1] /; s/....###/###/; s/\[[27]/[1/; s/\[[38]/[2/; s/\[[49]/[3/; s/\[[50]/[4/'
  246. #