News You Can Bruise

Permalink [No comments] The Art of Python:

For a couple years Sumana has been mixing up the tech conference experience by adding aspects of performance and dramaturgy to her talks (see e.g. Python Grab Bag and Code Review, Forwards and Back). Now she's scaling it up by running an arts festival at this year's PyCon North America: "The Art of Python". You can submit proposals until the end of the month — music, dramatic performance, visual art, and so on.

I would love to see this became a regular feature of technical conferences. Many aspects of programming can't be expressed in traditional talks (xkcd does a lot of this), and it's also just fun to talk about programming in ways other than lectures—I like to do it in fiction, for instance. If you're interested, check out the CFP!

python

Permalink [No comments] Olipy and Botfriend—a Bot Bonanza!:

I'm happy to announce the formal release of two artistic software packages I've been working on for a while. Olipy (PyPI: olipy) is a set of art supplies for manipulating text. It's got sophisticated tools for random selection, a Queneau assembly library, an easy-to-use Python interface to corpora, the *_ebooks algorithm, etc. etc. A lot of my bots are built off the code in here.

Speaking of bots, the second package is Botfriend (PyPI: botfriend). This takes care of all of the boring parts of bot-writing (coding to the Twitter and Mastodon APIs, picking items from a backlog, scheduling posts), allowing you to focus on the fun of creating playful interventions into your friends' depressing social media experiences, bringing joy to all!

I've been using Botfriend to run my personal bots for about a year now. I recently packaged it, improved the docs greatly, and made it really easy to run from within a virtual environment. All you have to do is write the creative bit and put your publishing credentials in a config file. I hope it's useful to you!

Thanks to Allison Parrish for helping me through the realization that I could exploit the pip installation process to install Botfriend's user interface. It feels like an exploit, anyway.

writing python programming

Permalink [No comments] Scrape 'N' Feed:

I came up with a name for my RSS feed helper, and fixed it up, and I hereby release it. I don't know if I'm allowed to put that example on the actual page to illustrate the module, or if it has to be first published in the O'Reilly book.

I probably never would have come up with the idea for this module if it hadn't been for the need to compress the large feed-scraping problem into a small "Hacks" entry. I've never done so much work for a hundred dollars. (However, I have done a whole lot more work for nothing.) You are the privileged recipients; my feed-scraping has never been easier than with this module. Though sometimes I get the feeling that scraping web pages into RSS feeds is just an obscure hobby of me and a few others.

Update: Actually I have done more work for less than a hundred dollars. When I was about 10, I dug up a huge tree stump in the side yard. It took me most of the summer, on and off. I think I got fifty dollars for it.

python

Permalink [No comments] Python Generators:

I'm messing around with Python generators for the first time, because I figured they'd make it easy to write different ways of traversing a Beautiful Soup parse tree, a la Ka-Ping Yee's scraper script. And they do make it easy, but they also slow down recursive tree traversals quite a bit. Is there a fast way to do this, or should I just unroll the recursion so I'm not creating a million generators?

python