Rubiks cube – two twisted corners

How to solve a cube that only has two (or four) twisted corners?

A rubiks cube with two twisted corners

As the default way of solving a cube with twisted corners is quite strange, wanted to investigate if, be use of some software, we could come up with an alternative way of solving that last step. See readme on github:

https://github.com/MelleKoning/rubikscubelaststep/