Skip to content

Instantly share code, notes, and snippets.

View andreis's full-sized avatar

andreis

View GitHub Profile
@andreis
andreis / README.md
Last active July 5, 2019 11:20
"Go with Benthos", Go Sheffield, July 2019

How to use present:

  • go get golang.org/x/tools/cmd/present
  • present -notes
  • hit N while in the browser to open the presenter notes window
data = map(int, open("input.txt").readlines()[0].strip().split(","))
class Computer(object):
def __init__(self, data, stdio=None):
self.ram = list(data)
self.pc = 0
self.halt = False
self.stdio = stdio
# turn until you get three hexagons changed to get here
H1 = ["AC", "AB", "ACD"]
# turn until you get two hexagons changed to get here
H2 = ["BCF", "ACF", "BF"]
# turn until you get three hexagons changed to get here
H3 = ["CD", "BC", "AB", "AF", "EF", "CDE"]
# this is my status, look at the hexagons to determine which ones are open
status = set("ABDE") # 110110

Keybase proof

I hereby claim:

  • I am andreis on github.
  • I am andrei5 (https://keybase.io/andrei5) on keybase.
  • I have a public key ASC1DvuIodIGumUVcCqkLGRyIZ_H1HD-3pa-e58TucrbkAo

To claim this, I am signing this object:

#!/usr/bin/env python3
import argparse, sys, select
from enum import Enum
from random import randint
Mode = Enum("Mode", "white yellow mixed random")
def config():

Keybase proof

I hereby claim:

  • I am andreis on github.
  • I am andrei91 (https://keybase.io/andrei91) on keybase.
  • I have a public key ASBrLotJHYdsq2yh2hM-e8QUs7z9fFcOIPtaPKtr22HMXwo

To claim this, I am signing this object:

print("\n".join("".join("*" if i in (0, 9, j, 9-j) else " " for j in range(10)) for i in range(10)))
print("====")
print("".join(map(lambda i: ("*" if i//10 in (0, 9, i%10, 9-(i%10)) else " ") + ("\n" if (i+1) % 10 == 0 else ""), range(100))))
print("====")
print("".join(map(lambda i: ([""]*9+["\n"])[(i>>1)%10] if i&1 else "*" if (i>>1)//10 in (0, 9, (i>>1)%10, 9-((i>>1)%10)) else " ", range(200))))