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
(define (solve grid) | |
(let ([result (fill-allowed grid)]) | |
(if (equal? grid result) | |
result | |
(solve result)))) | |
; Finds the allowed digits for each cell in the grid, | |
; and if there's only one choice, fills it in. | |
(define (fill-allowed grid) | |
(for/list ([r (in-range 1 10)]) |
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
use std::io; | |
fn main() { | |
let mut input = String::new(); | |
io::stdin().read_line(&mut input) | |
.expect("Failed to read line"); | |
println!("{}", piglatinize(&input)); | |
} | |
fn piglatinize(s: &str) -> String { |
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 argparse | |
import subprocess | |
parser = argparse.ArgumentParser() | |
parser.add_argument('file', help='A .doc or .docx file to open') | |
args = parser.parse_args() | |
class DocError(Exception): | |
'''Errors for non-Word type files''' | |
pass |