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.
 
 
 
 
sam 4eea65cdeb * spelling 16 lat temu
..
paper * spelling 16 lat temu
part0 * Add mode 8, for the very first graphic in the paper. 16 lat temu
part1 * Put result files in separate directories. 16 lat temu
part2 * Put result files in separate directories. 16 lat temu
slides * Add my slides of the paper presentation at ICISP'08. 16 lat temu
.gitignore * More scripts for part 3. 16 lat temu
Makefile * More scripts for part 3. 16 lat temu
README * Final version of the paper. Uploaded at the last minute, of course. 16 lat temu
bytecode.c * More scripts for part 3. 16 lat temu
bytecode.lds.S * More scripts for part 3. 16 lat temu
main-cpushare * Add mode 8, for the very first graphic in the paper. 16 lat temu
main.c * Add mode 8, for the very first graphic in the paper. 16 lat temu
study-4.sh * More scripts for part 3. 16 lat temu
study-5.sh * More scripts for part 3. 16 lat temu
study-6.sh * More scripts for part 3. 16 lat temu
study-7.sh * More scripts for part 3. 16 lat temu
vote.c * More scripts for part 3. 16 lat temu
xy2d.c * Put the initial (Feb 08) version of the ED displacement paper into SVN, as 16 lat temu

README

# List all my 4chan images
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

# Put all my 4chan images in 100 separate /tmp directories
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

# Results for part 1
for x in 1 2 3 4; do
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
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
echo $(((3 * $a1 + $a2) / 4)) $(((3 * $b1 + $b2) / 4)) $(((3 * $c1 + $c2) / 4))
done

# Condorcet voting for phase 2 results
# - raster + E
# - raster + E_min
# - serpentine + E
# - serpentine + E_min
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
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
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
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

# Get phase 3 and phase 4 stuff
# .. from canard
ssh canard.zoy.org "cd test-20080329; tar cz *raster.txt" | tar xz
ssh canard.zoy.org "cd test-20080329; tar cz *serp.txt" | tar xz
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
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
# .. from poulet (cpushare)
scp poulet.zoy.org:cpushare/'test*-*.txt' .
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
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

# Condorcet voting for part 3 and 4
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
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
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
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

# Mean voting for part 3 and 4
# Square mean voting is not interesting
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
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
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
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

# root square mean voting... why not, after all?
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
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
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
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

# Clever stuff (or not)
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
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
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
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

# Plot lena displacement
set contour
unset surface
set view 0,0
set cntrparam levels discrete 0.31, 0.35, 0.42, 0.52, 0.7, 1, 1.5
set xrange [-1:1]
set yrange [1:-1]
set mxtics 2
set mytics 2
set xlabel "$dx$"
set ylabel "$dy$"
unset mztics
unset ztics
set size square
set xzeroaxis
set yzeroaxis
set lmargin screen 0.0 #.05
set bmargin screen 0.2 # .15
set tmargin screen 0.9 #.95
set rmargin screen 0.9 #.95
set terminal epslatex color size 5,2 blacktext
unset colorbox
#set lmargin 0.05
#set rmargin 0.95
#splot 'part0/lena-values.txt' with lines
set output "lena-values.tex"
splot '../part0/lena-values.txt' with lines lw 3 notitle
unset output
set term pop


#set border 0
set style line 1 lt 1 lw 1
set style line 2 lt 2 lw 1
set style line 3 lt 3 lw 1
set style line 4 lt 6 lw 1
set style line 5 lt 1 lw 3
set style line 6 lt 2 lw 3
set style line 7 lt 3 lw 3
set style line 8 lt 6 lw 3
###
###
###
###
### Stuff below here is deprecated or unsorted
###
###
###
###

#% 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
#% 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
#% cat /tmp/4chanlist.txt | xargs -n 1 ./main | tee -a fs-4chan.txt

# Lena
set hidden3d
set grid
unset colorbox
splot "lena-min.txt" with lines lc 7 notitle
set terminal epslatex color size 2.5,2 blacktext
set tmargin screen 0.75
set bmargin screen 0.25
set lmargin screen 0.05
set rmargin screen 0.95
set output "lena-min.tex"
splot "lena-min.txt" with lines lc 7 notitle
unset output
set term pop

# Dans gnuplot
set xrange [-.1:.4]
set yrange [.45:-.05]
set grid
plot "fs-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
"fs-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
"fs-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI", \
"fs-jylam.txt" using 6:7 lc 4 pt 7 ps .08 title "Jylam", \
"merge.txt" using 5:6 lc 7 ps .2 with lines
#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

# Histogramme de la tache Floyd-Steinberg
sed -ne 's/.* for //p' fs-*txt | ./xy2d >| histo-fs.txt
# Et ensuite dans gnuplot:
set xrange [-.1:.4]
set yrange [.4:-.1]
set xlabel "$dx$"
set ylabel "$dy$"
set grid
set lmargin screen 0.05
set bmargin screen 0.25
set tmargin screen 0.95
set rmargin screen 0.95
unset colorbox
set pm3d explicit map interpolate 1.8,1.8
set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
unset key
#splot "../../subblock/histo-fs.txt" notitle
set terminal epslatex color size 1.8,2.0 blacktext
set output "fs-histo.tex"
splot "../../subblock/histo-fs.txt" notitle
unset output
set term pop

set xrange [-.1:.9]
set yrange [.95:-.05]
set grid
plot "jajuni-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
"jajuni-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
"jajuni-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"

# Histogramme de la tache JaJuNi
sed -ne 's/.* for //p' jajuni*txt | ./xy2d-jajuni >| histo-jajuni.txt
# Et ensuite dans gnuplot:
set xrange [-.1:.9]
set yrange [.9:-.1]
set xlabel "$dx$"
set ylabel "$dy$"
set grid
set lmargin screen 0.05
set bmargin screen 0.25
set tmargin screen 0.95
set rmargin screen 0.95
unset colorbox
set pm3d explicit map interpolate 1.8,1.8
set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
unset key
#splot "../../subblock/histo-jajuni.txt" notitle
set terminal epslatex color size 1.8,2.0 blacktext
set output "jajuni-histo.tex"
splot "../../subblock/histo-jajuni.txt" notitle
unset output
set term pop

# Test de merde
set xrange [0:5]
set yrange [0:5]
set grid
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

# Ostromoukhov
set xrange [-.2:.2]
set yrange [.3:-.1]
set grid
plot "ostro-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
"ostro-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
"ostro-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"

# Histogramme de la tache Ostro
sed -ne 's/.* for //p' ostro*txt | ./xy2d-ostro >| histo-ostro.txt
# Et ensuite dans gnuplot:
set xrange [-.2:.2]
set yrange [.3:-.1]
set xlabel "$dx$"
set ylabel "$dy$"
set xtics -.2,0.1
set grid
set lmargin screen 0.05
set bmargin screen 0.25
set tmargin screen 0.95
set rmargin screen 0.95
unset colorbox
set pm3d explicit map interpolate 1.8,1.8
set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
unset key
splot "../../subblock/histo-ostro.txt" notitle
set terminal epslatex color size 1.8,2.0 blacktext
set output "ostro-histo.tex"
splot "../../subblock/histo-ostro.txt" notitle
unset output
set term pop

# Optimum
set xrange [-.5:.2]
set yrange [.6:-.1]
set grid
plot "optimum-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
"optimum-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
"optimum-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"

# Histogramme de la tache Optimum
sed -ne 's/.* for //p' optimum*txt | ./xy2d-optimum >| histo-optimum.txt
# Et ensuite dans gnuplot:
set xrange [-.5:.2]
set yrange [.6:-.1]
set xlabel "$dx$"
set ylabel "$dy$"
set grid
set lmargin screen 0.05
set bmargin screen 0.25
set tmargin screen 0.95
set rmargin screen 0.95
unset colorbox
set pm3d explicit map interpolate 1.8,1.8
set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
unset key
splot "../../subblock/histo-optimum.txt" notitle
set terminal epslatex color size 1.8,2.0 blacktext
set output "optimum-histo.tex"
splot "../../subblock/histo-optimum.txt" notitle
unset output
set term pop

# Serpentine Optimum
set xrange [-.3:.3]
set yrange [.5:-.1]
set grid
plot "serpopt-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \
"serpopt-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \
"serpopt-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI"

# Histogramme de la tache Serpentine Optimum
sed -ne 's/.* for //p' serpopt*txt | ./xy2d-serpopt >| histo-serpopt.txt
# Et ensuite dans gnuplot:
set xrange [-.3:.3]
set yrange [.6:-.1]
set xlabel "$dx$"
set ylabel "$dy$"
set grid
set lmargin screen 0.05
set bmargin screen 0.25
set tmargin screen 0.95
set rmargin screen 0.95
unset colorbox
set pm3d explicit map interpolate 1.8,1.8
set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow")
unset key
splot "../../subblock/histo-serpopt.txt" notitle
set terminal epslatex color size 1.8,2.0 blacktext
set output "serpopt-histo.tex"
splot "../../subblock/histo-serpopt.txt" notitle
unset output
set term pop

# Combinaison jajuni / Floyd-Steinberg
set xrange [-.1:.4]
set yrange [.9:-.1]
set grid
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"

######################## Trucs en cours ########################

# Lancés sur canard:
boat.png elaine.png texture[2345].png

# Lancés sur poulet :
./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

#### Pour les out-*
scp canard.zoy.org:out-'*'.txt .
for x in out-*.txt; do sort -k7 $x | head -20 ; done | cut -f1 -d: | sort | uniq -c | sort -n

###
### Conversion du vieux format de résultats (deprecated)
cat -n $x | sed 's/^ *[0-9]*\([0-9]\)[[:space:]]*/[\1] /; s/....###/###/; s/\[[27]/[1/; s/\[[38]/[2/; s/\[[49]/[3/; s/\[[50]/[4/'

# Convert lena results to cropped detail
convert output-7-3-5-1-serp.png -crop 160x160+32+160 crop-7-3-5-1-serp.png
convert output-7-4-5-0-serp.png -crop 160x160+32+160 crop-7-4-5-0-serp.png