-
Google hangouts bot (e.g. "@hangouts call" would post a link for others to join)
-
lunch bot (similar to https://lunchtrain.builtbyslack.com/): user creates lunch event; others subscribe with PMs to the bot; lunch bot updates the original lunch event
-
game bots! chess, merels, four in a row, hangman (hangman was actually a proposal during last GCI)
-
RSS feed bot
-
GMail bot
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
struct Fibonacci{I} | |
first::I | |
second::I | |
end | |
function Base.iterate(iter::Fibonacci, state=nothing) | |
if state == nothing | |
iter.first, (iter.first, nothing) | |
elseif state[2] == nothing | |
iter.second, (iter.first, iter.second) |
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 a strict Y combinator function. | |
Y = (f) -> ((x)->(f((y)->((x(x))(y)))))( | |
(x)->(f((y)->((x(x))(y)))) | |
) | |
# Use the Y combinator the implement a factorial function. | |
factorialbasefunc = (f) -> ((n)->(n==0 ? 1 : n*f(n-1))) | |
factorial = Y(factorialbasefunc) | |
println(factorial(5)) # 120 |
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 sys | |
from typing import Any, List | |
# Parse input string into a list of all parentheses and atoms (int or str), | |
# exclude whitespaces. | |
def normalize_str(string: str) -> List[str]: | |
str_norm = [] | |
last_c = None | |
for c in 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
#include <iostream> | |
#include <stdexcept> | |
#include <vector> | |
enum State { | |
RUNNING, | |
DRAW, | |
VICTORY_P1, | |
VICTORY_P2 | |
}; |
The ideas mentioned here mostly originated from discussions on the Zulip chat Feel free to discuss their implementation there, or add improvements of these ideas, or new ideas in the comments.