1. Rotate arbitrary

    Another way to rotate by arbitrary values.

    You can in python 2.x - just str.encode(“rot13”) - but for other rotations you could use the following (for ascii):

    from string import ascii_uppercase as uc, ascii_lowercase as lc, maketrans
    def rot_func(text, encode=True, rotate=13):
        letters = uc + lc
        rot = "".join …
    read more
  2. Favourite quotes

    A selection of my favourite quotes I’ve come across recently…

      • L1 cache - 3s grabbing a piece of paper
      • L2 cache - 14s picking a book from a shelf
      • System RAM - 4m walk down the hall
      • Hard drive seek - Like leaving the building to roam the earth for one year and …
    read more

« Page 2 / 2