This file contains hidden or 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
cipher_words.sort(key = lambda x: -len(x)) |
This file contains hidden or 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
# python 2.7.3 | |
# reads ciphertext from ./in.txt and a whitespace-delimited | |
# dictionary of english words from ./dictionary/wordlist.txt | |
import string | |
from collections import defaultdict | |
from itertools import izip | |
# english dictionary | |
words = set() |
This file contains hidden or 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
from collections import defaultdict | |
def reverseGraph(Graph): | |
newGraph = defaultdict(lambda: [0]) | |
for left in Graph: | |
leftsNeighbors = Graph[left][1:] | |
for right in leftsNeighbors: | |
newGraph[right].append(left) | |
return newGraph |
This file contains hidden or 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
from collections import defaultdict | |
def Dictionary(Filename): | |
dic = {} | |
dicR = {} | |
i = 0 | |
with open(Filename) as f: | |
for line in f: | |
l, r = line.split() | |
l, r = int(l), int(r) |
This file contains hidden or 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
# python 2.7.3 | |
# reads ciphertext from ./in.txt and a whitespace-delimited | |
# dictionary of english words from ./dictionary/wordlist.txt | |
import string | |
import sys | |
from collections import defaultdict | |
from copy import copy | |
from itertools import izip |
This file contains hidden or 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
/* | |
* Classic example grammar, which recognizes simple arithmetic expressions like | |
* "2*(3+4)". The parser generated from this grammar then computes their value. | |
*/ | |
start | |
= additive | |
additive | |
= left:multiplicative "+" right:additive { return {op: '+', toks: [left, right]}; } |
This file contains hidden or 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
( | |
( | |
lambda | |
(()()) | |
params | |
( | |
fib | |
(() ((()))) | |
) | |
call fib[6] |
This file contains hidden or 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
(((()())((()((()))))((()((())))((()()(()))((())()()()()())((())()()()))(()((())))))((()())((()()())(()()()(())))((()()()())((()()(())())(()()())((())()))(()()())((()(()))((()()()(()))((()(()()))(()()())((())())))((()()()(()))((()(()()))(()()())((())()()))))))) |
This file contains hidden or 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
((()()())(()(()()))((()(()))((())()()()()()()())((()()(()))((())()()()()()()()()()) | |
((())()()()()()()()()()()))))((()()())(()(()()()))((()(())(())())((())()()()()()()( | |
)()()()()()()()()()()()()()()()()()()()()()()()()())))((()(()))((()(())(())())((()( | |
()))(()(()()))((())()()()()()()())))((()(())(())())((()(()))(()(()()))((())()()()() | |
)))((()(())(())())((()(()))(()(()()))((())()()()()()()()()()()())))((()(())(())())( | |
(()(()))(()(()()))((())()()()()()()()()()()())))((()(())(())())((()(()))(()(()()))( | |
(())()()()()()()()()()()()()()())))(()(()()()))((()(())(())())((()(()))(()(()()))(( | |
())()()()()()()()()()()()()()()()()()()()()()())))((()(())(())())((()(()))(()(()()) | |
)((())()()()()()()()()()()()()()())))((()(())(())())((()(()))(()(()()))((())()()()( | |
)()()()()()()()()()()()()())))((()(())(())())((()(()))(()(()()))((())()()()()()()() |
This file contains hidden or 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> | |
/* | |
compiles with 'gcc -Wall' with no errors or warnings. | |
*/ | |
int main() { | |
// vars | |
int a[10]; | |
int i = 0; | |
long long L = 0; |