We exploit the Python eco-system to make a GUI for a Prolog program, run with SWI-Prolog, in under 10 minutes
Vim is a cruel learning curve, it’s a long way from modern text editors, and yet it is still a popular choice for programmers. Why?! Because it’s worth it. There are many things Vim does well, many things that I could use to show it off. But for this post, I had to choose only one thing, which is evaluating commands.
Another little known Python feature that deserves more love. This time we’re looking at the send function that lets you input values into your generator as it’s running. It works through yield and is awesome!
In Python we have for loops and list comprehension. In this post we’ll examine the semantic difference between the two in order to determine when it is appropriate to use each one.
It’s tricky to find out how to set up RDFLib Graph to use a RDBS backend, but it can be done using SQLAlchemy and RDFLib-SQLAlchemy. This means it’ll support all the engines SQLAlchemy does, including MySQL and Postgres. I’ll highlight two gotchas to look out for when using RDFLib-SQLAlchemy and walk you through getting setup using a wrapper class to RDFLIB Graph.
Google makes extensive use of Semantic Web technologies, although they prefer the term Knowledge Graph. In this post I’ll show you how to add structured data to a Flask Blog app, with JSON-LD and Jinja2 templates to help Google understand your content, which in turn should improve SEO.
Facebook use the Semantic Web. They have an ontology called “Open Graph” that links your webpage into their social graph. This means when someone shares your webpage on Facebook, it’ll look how you’ve specified. In this post I’ll show you how to include this in a Flask blog application with a Jinja2 template.
An introduction to programming the Semantic Web using Python and Flask. We’ll make an RDF file to describe ourselves, serve it via Flask, use data from it in a template, encode it into our HTML, and link to it from our HTML.
Python has support for lambda functions, Haskell is built upon lambda calculus. The two are not the same and this is the reason why lambda should have been removed in Python3. This post examines the differences, reviews the use in Python, and offers a more pythonic, honest syntax.
Of all the functional programming inspired features in Python, partial application must be the best kept secret that you really need to know. Partial application lets you create highly abstract functions and make them more specific for use, pass a function arguments without calling it yet, and so much more.