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
Y = (F) -> | |
((x) -> | |
F((y) -> | |
(x(x))(y)))( | |
(x) -> | |
F((y) -> | |
(x(x))(y)) | |
) | |
FactGen = (fact) -> | |
(n) -> |
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
#!/bin/sh | |
LAN_IP=`/sbin/ifconfig $1 | grep inet | grep -v inet6 | awk '{print $2}'` | |
WAN_IP=`/sbin/ifconfig $1 | grep inet | grep -v inet6 | awk '{print $2}'` | |
#LAN_IP=59.66.0.0 | |
#WAN_IP=59.66.0.0 # replace with your wan ip | |
# just for Tsinghua's ISATAP router | |
echo $LAN_IP | |
route delete -inet6 default | |
/sbin/ifconfig gif0 tunnel $LAN_IP isatap.tsinghua.edu.cn |
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 ruby | |
require 'algorithms' | |
class TrueClass | |
def to_i | |
1 | |
end | |
end |
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/python3.3 | |
import sys | |
import argparse | |
import random | |
import copy | |
parser = argparse.ArgumentParser(description='Sudoku Utility.') | |
parser.add_argument('inStream', metavar='inStream', type=str, nargs='?', help='input stream.') | |
parser.add_argument('outStream', metavar='outStream', type=str, nargs='?', help='output stream.') | |
parser.add_argument('-g', '--generate', action='store_true', help='generate a sudoku other than solve') |
NewerOlder