It was a pleasure to go to the London Python Meetup organised by @python_london. There were plenty of friendly people and interesting conversations.
I gave a talk “Making 100 million requests with Python aiohttp” (slides, Blog post) explaining the basics of writing async code in Python 3 and how I used that to make a very large number of HTTP requests.
(Photo by CB Bailey.)
Hopefully it was helpful – there were several good questions, so I am optimistic that people were engaged with it.
After that, there was an excellent talk by Gareth Lloyd called “GeoPandas, the geospatial extension for Pandas” in which he explained how to use the very well-developed geo-spatial data tools available in the Python ecosphere to transform, combine, plot and analyse data which includes location information. I was really impressed with how easy the libraries looked to use, and also with the cool Jupyter notebook Gareth used to explain the ideas using live demos.
London Python Meetups seem like a cool place to meet Pythonistas of all levels of experience in a nice, low-pressure environment!
Meetup link: aiohttp / GeoPandas
Because the Rapsberry Pi uses a slightly older Python version, there is a special version of Graft for it.
Here’s how to get it:
- Open a terminal window by clicking the black icon with a “>” symbol on it at the top near the left.
- First we need to install a couple of things Graft needs, so type this, then press Enter:
sudo apt install python3-attr at-spi2-core
- If you want to be able to make animated GIFs, install one more thing:
sudo apt install imagemagick
- To download Graft and switch to the Raspberry Pi version, type in these commands, pressing Enter after each line.
git clone https://github.com/andybalaam/graft.git
git checkout raspberry-pi
- Now, you should be able to run Graft just like on another computer, for example, like this:
./graft 'd+=10 S()'
If you’re looking for a fun way to start, why not try the worksheet “Tell a story by making animations with code”?
For more info, see Graft Raspberry Pi Setup.
Here is an almost-minimal example of a systemd service file, that I use to run the Mastodon bot of my generative art playground Graft.
I made a dedicated user just to run this service, and installed Graft into /home/graft/apps/graft under that username. Now, as root, I edited a file called /etc/systemd/system/graft.service and made it look like this:
Now I can start the graft service like any other service like this:
sudo systemctl start graft
and find out its status with:
sudo systemctl status graft
If I want it to run on startup I can do:
sudo systemctl enable graft
and it will. Easy!
If I want to look at its output, it’s:
sudo journalctl -u graft
As a reward for reading this far, here’s a little animation you can make with Graft:
Recent Overload journal issues contain my new articles on How to Write a Programming Language.
Part 1: How to Write a Programming Language: Part 1, The Lexer
Part 2: How to Write a Programming Language: Part 2, The Parser
PDF of the latest issue: Overload 146 containing part 2.
This is all creative-commons licensed and developed in public at github.com/andybalaam/articles-how-to-write-a-programming-language
My OpenMarket colleagues and I ran a workshop at TECH(K)NOW Day on how to write your own programming language:
A big thank you to my colleagues from OpenMarket who volunteered to help: Rowan, Jenny, Zach, James and Elliot.
An extra thank you to Zach and Elliott for their impromptu help on the information desk for attendees:
Hopefully the attendees enjoyed it and learned a bit:
You can find the workshop slides, the full code, info about another simple language called Cell, and lots more links here: github.com/andybalaam/videos-write-your-own-language, my blog at artificialworlds.net/blog, and follow me on twitter @andybalaam.
Thanks to OpenMarket for supporting us in running this workshop!