Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

README 11 KiB

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