How to Write a DSL (in Python with Lark)

The first time I used Logo, it felt like magic. I could type a short sequence of simple commands, and draw beautifully complex shapes on the screen. In this tutorial, I will show you how to parse and interpret a Logo-like language in just 70 lines of code… Read more

Similar

Making the Python REPL Output Pretty

Recently, there was a tweet by Ned Batchelder that illustrated how to make Python REPL output prettier. I went to implement it, and wanted to put together some instructions for the future.

Read more »

Decision Tree with Python

A decision tree can be visualized. A decision tree is one of the many Machine Learning algorithms. It’s used as classifier: given input data, it is class A or class B? In this lecture we will visualize a decision tree using the Python module pydotplus and... (more…)

Read more »