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