I found something difficult in Python, which was a bit of a first, so I wrote a whole blog series about it, and now a whole video:
Slides: Python Async Basics slides
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:
sudo apt install python3-attr at-spi2-core
sudo apt install imagemagick
git clone https://github.com/andybalaam/graft.git cd graft git checkout raspberry-pi
./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.
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:
[Service] ExecStart=/home/graft/apps/graft/bot-mastodon User=graft Group=graft WorkingDirectory=/home/graft/apps/graft/ [Install] WantedBy=multi-user.target
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.
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