This can get annoying if you already defined a label or you have several sections named the same thing. For example, I have a document that have several input files each with the same section name and I convert them separately. This creates a lot of confusion and warnings when rendering to a pdf. Fortunatley it can be fixed by writing markdown-auto_identifiers instead of just markdown. The conversion becomes,
I had a long array of numbers that I wanted to write to file such that the numbers would be comma separated and with a line break at 80 chars. I tried with numpy savetxt but there is always a problem with it so I resorted to the textwrap library.
I had this bug somewhere in the code and I couldn’t figure out where it was. After isolating some code I came across this behavior that I didn’t expect.
It turns out that if the default value is a dictionary then each entry in the newly created dictionary will have a reference to that dictionary. This happens for every mutable object we put as default argument. Simply put, change one entry in the base dictionary and all nested dictionaries will update. It seems like a lot of people went into this trap judging from the numerous StackOverflow Questions
Do you use TeX (Latex) on your Mac or Ubuntu? It turns out that updating Latex does not delete older version files. They are all stored in /usr/local/texlive/. By deleting older versions I managed to free up almost 20GB!!! OMG.
Sometimes it is nice to put a colored frame around an image in your Latex document. The ordinary frame command does not support coloring frames but we can use to two packages to achieve xcolor and adjustbox.
The xcolor package allows us to use the HMTL Hex encoding of colors which is very convenient. However, it seems you need to define the color name to use it in for the image, like this,
\definecolor{my_magenta}{HTML}{FF00FF}
To put a frame around an image we just add some parameters to the includegraphics command,
Where the parameters are (color_name, border_width, inner_padding) where the inner_padding parameter is a white colored border inside the box border. There are many more parameters to explore, e.g. background, etc.