05.02.24: rename multiple files in bash
example: for f in $(ls *.xml.ipe); do mv $f ${f%.xml.ipe}.ipe; done
link
21.11.23: cropping images with IPE
website
9.9.23: sympy for geometric operations, like polygon-polygon intersection
website
13.07.2023: filelight for cleaning up hard disks
22.04.2023: IPE drawing editor
youtube tutorials
IPE collection
11.05.2023: supplemental data for double-blind
see here
07.02.2023: profiling python and sagemath
For inline profiling:
import cProfile
cProfile.run('yourcommand(123)')
To have a graphic visualization with kcachegrind/qcachegrind,
use the following python snippet:
import cProfile
with cProfile.Profile() as pr:
compute_flipgraph(line)
pr.dump_stats('profile_data.prof')
and then run the following bash command:
pyprof2calltree -i profile_data.pyprof && kcachegrind profile_data.pyprof.log
Note that pyprof2calltree can be installed via pip.
18.01.2023: merge images (here: 7x* grid)
Given a lot of images, a large image showing a 7x* grid of those images
(the number of rows * of course depends on the number of images)
can be computed with the following
montage -density 300 -tile 7x0 -geometry +5+50 -border 10 g5*.png out.png
23.03.2022: how to use "latexdiff"
run
latexdiff original_file.tex modified_file.tex > diff.tex
and remove all occurences of "\hspace{0pt}"
(at least for me it did not compile otherwise)