There's been heavy discussion of the various options surrounding the pages for the Sponge wiki. At the time of writing, the current contenders for implementation are:
- MediaWiki
- DokuWiki
- GitHub Wiki
- GitHub Pages/Jekyll
- A homebrew option
{-# LANGUAGE GADTs #-} | |
module StateAutoConversion(fromAutomaton, toAutomaton, StateResult(StateResult)) where | |
import Prelude hiding (id, (.)) | |
import Control.Category | |
import Control.Arrow | |
import Control.Arrow.Transformer |
<?php | |
define('PASSWD_SALT_LENGTH', 16); | |
define('PASSWD_HASH_ALGORITHM', 'sha512'); | |
define('SALT_LENGTH', 16); | |
function passwordCrypt($password) { | |
$saltSource = fopen('/dev/random', 'rb'); | |
$saltData = bin2hex(fread($saltSource, PASSWD_SALT_LENGTH)); | |
fclose($saltSource); |
import subprocess | |
import sys | |
try: | |
policy = subprocess.check_output(['apt-cache', 'policy', 'python-dev']) | |
if 'Installed: (none)' in policy: | |
print("ERROR: no python dev package installed") | |
print("Please run: sudo apt-get install python-dev") | |
sys.exit(1) | |
except OSError: |
from __future__ import print_function | |
from flask import Flask | |
from functools import wraps | |
import json | |
import sys | |
app = Flask(__name__) | |
def example_wrapper(f): | |
print(f.func_dict) |
from __future__ import print_function | |
from collections import namedtuple, defaultdict | |
Check = namedtuple('Check', 'description check') | |
Condition = namedtuple('Condition', 'severity format') | |
Failure = namedtuple('Failure', 'type severity message data') | |
class Validator(object): | |
def __init__(self): | |
self.checks = [] |
from collections import namedtuple | |
import cgi | |
import sys | |
import yaml | |
DATA = """ | |
- type: checkbox | |
description: Did the robot move? | |
key: robot_moved | |
- type: natural |
import itertools | |
def tail(seq): | |
return itertools.islice(seq, 1, None) | |
def fibs(): | |
yield 0 | |
yield 1 | |
yield from (x + y for x, y in zip(fibs(), tail(fibs()))) |
There's been heavy discussion of the various options surrounding the pages for the Sponge wiki. At the time of writing, the current contenders for implementation are:
from copy import copy | |
from collections import defaultdict | |
from fractions import Fraction | |
def stv(candidates, ballots, seats=1): | |
if seats > len(candidates): | |
raise ValueError('Not enough candidates for election') | |
rounds = {} |
from itertools import permutations | |
import yaml | |
import sys | |
#votes = {'a': ['cheese', 'hats', 'faces'], | |
# 'b': ['hats', 'cheese', 'faces'], | |
# 'c': ['hats', 'faces', 'cheese']} | |
votes = {'a': 'CHWESK', | |
'b': 'CESWHK', |