Dice Stats is my go-to library for calculating dice probabilities, and I this is how I've used it in a real example.
Read full article
Python's standard library has a lot of built-in functionality. Before writing new code, make sure that what you need is not already in there, which is what happened on a blog post I found about checking if an IP belongs to a subnetwork.
Read full article
How I defined a SQLAlchemy relationship that combines five tables.
Read full article
This is how I implement auto-incrementing IDs for MongoDB collections using MongoEngine.
Read full article
Don't rely on TimedRotatingFileHandler when using Gunicorn. You might be missing log records!
Read full article
A recommended approach for importing Python's datetime module, using aliases, to prevent potential bugs and namespace conflicts.
Read full article
You can "intern" strings to improve performance of dictionary lookups, but using them is not as straightforward as one can think.
Read full article
If you install PyCharm using the JetBrains installer, you have to use a shell script to launch it. But there is a way to create a shortcut for your Desktop environment.
Read full article