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