Get Kona from http://kona.github.io and run with ./k cs
- c.k - Neat version (192 characters)
- cs.k - Tweet sized version (112 characters)
| [package] | |
| authors = ["mgoszcz2"] | |
| name = "reactor" | |
| version = "0.1.0" | |
| [dependencies] | |
| futures = "0.1.10" | |
| tokio-core = "0.1.4" |
| use std::io; | |
| use std::cmp::max; | |
| use std::cmp::{Ordering, PartialOrd}; | |
| use std::cmp::Ordering::*; | |
| use std::collections::HashMap; | |
| use std::collections::BinaryHeap; | |
| #[derive(Debug)] | |
| enum Node { Leaf(char), Branch(Box<Node>, Box<Node>) } |
| import Control.Monad.Trans.State | |
| import Data.List (intercalate) | |
| import Control.Monad.IO.Class (liftIO) | |
| type TodoState a = StateT [Todo] IO a | |
| type Category = String | |
| data Todo = Todo { text :: String | |
| , categories :: [Category] | |
| } deriving (Show) |
| #!/usr/bin/env python3 | |
| # Robots.py - Python clone of BSD Robots | |
| # Copyright (C) 2016 Maciej Goszczycki | |
| # Thanks to Harvey Brezina Conniffe for initial idea | |
| # | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. |
Get Kona from http://kona.github.io and run with ./k cs
| <!doctype html> | |
| <html> | |
| <head> | |
| <style> | |
| .nav { | |
| font-size: %50; | |
| } | |
| .heading { | |
| font-size: 40px; |
| module Main where | |
| fastlog :: Int -> Int -> Int | |
| fastlog b n | |
| | n < 1 = -1 | |
| | otherwise = 1 + fastlog b (n `div` b) | |
| roundt :: Int -> Int | |
| roundt n = m * (n `div` m) | |
| where m = 10 ^ (fastlog 10 n) |
| # Call this file "datetime.py" (or any other stdlib name) | |
| # and import it. It will behave just as if it was the | |
| # library itself, but contain a 'fake' attribute | |
| # $ ls | |
| # datetime.py | |
| # $ python | |
| # >>> import datetime | |
| # >>> datetime.fake | |
| # True |
| Outcomes: Hit, Miss, Sunk | |
| (find) 10D: m | |
| import random | |
| import string | |
| def pboard(): | |
| for i in board: | |
| print(''.join(i)) | |
| def countf(what): | |
| cnt = 0 | |
| for i in board: |