This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- You need to install IPPrint and HsColour with cabal to use this config. | |
-- If you find all the loading messages anoying you may want to set an alias: | |
-- alias ghci="ghci -v0" | |
-- Or if you are using stack ghci: | |
-- alias ghci="stack --silent ghci --ghci-options -v0" | |
-- use color Cyan, with imported modules in bold | |
:set prompt "\n\ESC[1;36m%s\n\ESC[0;36m\STXλ> \ESC[m\STX" | |
-- if ghci >= v7.8.1 for multiline support: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Using pickle to unpickle banner.p | |
import pickle | |
from __future__ import print_function | |
from operator import add | |
def draw_segment(t): | |
k, v = t | |
return k * v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
s = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj." | |
def make_rotation(i): | |
def rotate(x): | |
if x.isalpha(): | |
shift = i if ord(x) + i < 123 else i - 26 | |
return chr(ord(x) + shift) | |
else: |