Question #1

Question:

Write a standalone script or function that compresses a string based on the count of contiguous letters. For example, given abbcccdddd, the function will return, ab2c3d4.

Solution: PENDING

~rs

more ...

A world without DNS

Have you ever tried remembering an IP address /32? How many (non-sequential) can you remember? For how many days! These questions always torment me everytime I can't get DNS to work on a new host or I am trying to reach a subset of hosts that were just created ...

more ...

Open Source Projects

Last year I joined Code for Boston, a local spin-off of the bigger Code for America (CfA) group, when it was barely starting in Boston trying to get off the ground. After a somewhat rought start, trying to find a place for our meetups every week, the group leader did ...

more ...

Python Finite State Machines

Check this short but sweet non-deterministic Finite State Machine Function that simply accepts a FSM and returns a string if it is not ambiguous!

The idea is as follows:

  • Take an edge if it has not already been visited, otherwise go to the next edge.
  • If current state is final ...
more ...

Quick Intro to regular expressions with Python

I recently had to use quite a lot of parsing in Python for work-related stuff, so I've been looking at what are some of the best ways to be able to parse patterns and the answer is of course, regular expressions! (I use Python because I feel more comfortable ...

more ...