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
#include <stdio.h> | |
#define CHAR_TO_BASE(C) (((C) >> 1) & 3) | |
enum base { | |
A = CHAR_TO_BASE('A'), | |
C = CHAR_TO_BASE('C'), | |
G = CHAR_TO_BASE('G'), | |
T = CHAR_TO_BASE('T'), | |
}; |
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
#include <ctype.h> | |
#define BIT(X) (1 << (X)) | |
#define CTRL(X) ((X) - '@') | |
enum { None = -1 }; | |
enum { | |
Bold = CTRL('B'), | |
Colour = CTRL('C'), |
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
import re | |
import sre_compile | |
import sre_parse | |
from sre_constants import * | |
opcodes = dict((v,k) for (k,v) in OPCODES.items()) | |
atcodes = dict((v,k) for (k,v) in ATCODES.items()) | |
chcodes = dict((v,k) for (k,v) in CHCODES.items()) | |
def print_dis(s, indent): |
OlderNewer