Validating Subject Terms Against the AGROVOC REST API

AGROVOC is a controlled vocabulary covering all areas of interest of the Food and Agriculture Organization (FAO) of the United Nations, including food, nutrition, agriculture, fisheries, forestry, environment etc. It is published by FAO and edited by a community of experts ¹. At the time of this writing AGROVOC consists of over 36,000 concepts and is […]

Leveraging the Ansible Python API for Infrastructure Reporting

A few days ago I had to get some basic information from a handful of servers for an inventory report—just basic stuff like hostname, IP address, storage capacity, distro version, etc. I already manage all of my servers with Ansible, and there’s a wealth of information available in Ansible’s setup module, so I knew there […]

Publishing static sites with Pelican

There’s a lot of buzz from the hipsters about static site generation using Python and Ruby tools. A few that I just overheard while standing in line at Starbucks: Pelican Octopress – “A blogging framework for hackers” Jekyll Tinkerer – “Blogging for Pythonistas” nanoc Despite being popular almost exclusively with hipsters, I can see the […]

Generate salted shadow hashes using Python crypt()

The other day I was doing some server setups (using ansible for automation) and I needed to create the same user/password on four different machines. It’s easy with ansible’s user module, but you need to provide a pre-hashed password. The key is to use python’s crypt.crypt(), which you can do interactively from a python shell: […]