HTML Form Submission via Phython (1/X)

Some tasks can be very tedious and then writing a short python script is often a nice way to automate them and save some time. But most people who actually tried doing that can probably tell you, that this script often gets more complicated than anticipated in the beginning. Here is the relevant xkcd comic: Anyway, this story begins with a web form (on a site that shall remained unnamed), which I need to submit about 80 times with similar content. [Read More]

Automatic Semantic Versioning in Git

Most software that goes beyond small scripts has some sort of version number scheme. Very popular seems to be the Semantic Versioning schema as described by Tom Preston-Werner on a dedicated website. Let me quote the summary he gives there: Given a version number MAJOR.MINOR.PATCH, increment the: MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards compatible manner, and PATCH version when you make backwards compatible bug fixes. [Read More]
git  bash 

Mathematical Expressions as Trees 3: Proper Expression Modelling

If you haven’t done so yet, read parts one and two first or watch the video that inspired these posts. You can find a notebook with the state after this blog post here. Last time there was a problem in the expression simplification left, which is apparent when looking at these two expressions: str(Mul(Con(2), Mul(Con(3), Var('x'))).simplify()) # returns '2*3*x' str(Mul(Mul(Con(2), Con(3)), Var('x')).simplify()) # returns '6*x' They model the same expression, so both should return the second (simpler) string. [Read More]

Mathematical Expressions as Trees 2: Derivations and Expression Simplification

If you haven’t done so yet, read part one first or watch the video that inspired these posts. You can find a notebook with the state after this blog post here. More Functionality So far we mainly recreated what was already shown in the YouTube video and to be honest, this is not very useful yet. So I extended this base structure by a few parts. Partial Derivatives The obvious extension, which was triggered by the video, is the addition of partial derivatives. [Read More]

Mathematical Expressions as Trees 1: Modeling, Evaluation and Printing

I recently watched a computerphile video, where Prof. Thorsten Altenkirch talks about the data structures of trees and using them to model mathematical expressions. At the end, it is briefly mentioned, that this can also be used to perform derivations on the expressions, which inspired me to try that out myself. So I opend up a jupyter notebook and started with an implementation analogous to what was done in the video, but a bit extended. [Read More]