Tag: open source

  • Single Transferable Vote Election Tabulator

    Single Transferable Vote Election Tabulator

    For the 2016-17 school year election, the University of California, Santa Barbara’s Associated Students adopted single transferable voting¹ to elect their senate seats. Leading the software development, the tabulator is implemented in Python 3 with a wxPython-based front end. The software provides support for custom parsers to convert ballot data from different polling software to a universal JSON data format which is then processed by the tabulator. The software is divided into a backend thread that processes the election tabulation data and a modular front-end to allow for future alternative front-end implementations.

    As of December 2016, the election tabulator using STV has been open sourced and is available on GitHub. It is currently in use by the University of California, Santa Barbara, and North Dakota State University.

    ¹ Single transferable voting is a ranked voting system that redistributes an elector’s vote among unelected candidates based upon the individual’s ranked preference when either a candidate has been elected or eliminated from a race. This system provides a more proportional representation of parties during a multi-seat election.

  • CloudFlare Bulk IP Switcher

    A little while back, I had to move a bunch of web services that were hosted on a VPS to a new datacenter. As part of the move, I wasn’t able to transfer the IPs, so I was assigned a new IP. So, now I had to update all of my DNS records to reflect the change. Owning multiple domains, I realized that CloudFlare doesn’t provide an easy way to make this IP change across multiple zones (domains).

    If I wanted to change the records in each zone, I would need to export the DNS records in BIND format, make the changes, and then reupload the records. To fill this gap, I created a simple bulk IP changer that uses the CloudFlare API to iterate through all the zones and find all instances of the original IP address and replace the value with a new IP. I recently had the time to clean up this code, and I have now released it as open source.

    The source code is available on GitHub under an MIT license.

  • Tic-Tac-Toe Robot

    Tic-Tac-Toe Robot

    As part of ECE 92 (Projects in Electrical and Computer Engineering), I designed and built a robotic arm that plays a pencil-and-paper tic-tac-toe game with either 1 or 2 players. The system consists of an ARM based Arduino MCU board, a light weight 3 servo robot arm modified to hold a pen that floats vertically to handle variations on the board and arm angles, an LCD that displays the score, and two keypads for user input. The C++-based embedded software calibrates the arm servos which then draws the 9-square game grid, scans the keypads, updates the display, and draws the X and O game symbols based on the user input or its internal game algorithm.

    The display poster is available here and the related source code can be found on GitHub.