Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import numpy as np
src = open("input.txt", "r").readlines()
src = [r.strip() for r in src]
src = [[line[0], int(line[1:])] for line in src]
d2s = {
#!/usr/bin/env python3
import os
import sys
import random
from itertools import combinations_with_replacement, permutations, product
src = open("input.txt", "r").readlines()
src2 = """L.LL.LL.LL
#!/usr/bin/env python3
import os
import sys
import random
from itertools import combinations
src = open("input.txt", "r").readlines()
src2 = """35
#!/usr/bin/env python3
import os
import sys
import random
src = open("input.txt", "r").readlines()
src2 = """nop +0
acc +1
#!/usr/bin/env python3
import os
import sys
import random
src = open("input.txt", "r").readlines()
src = [r.strip() for r in src]
print(len(src))
#!/usr/bin/env python3
import os
import sys
import random
src = open("input.txt", "r").readlines()
src = [r.strip() for r in src]
ids = set()
@kung-foo
kung-foo / day3.py
Last active December 5, 2019 20:08
from common import get_input
def decode(i):
return i[0], int(i[1:])
src = get_input(3).split("\n")
w1 = src[0].split(",")
@kung-foo
kung-foo / walk.go
Last active February 20, 2020 10:02
package supersecret
import (
"github.com/pkg/errors"
"github.com/gopcua/opcua"
"github.com/gopcua/opcua/id"
"github.com/gopcua/opcua/ua"
)
@kung-foo
kung-foo / main.go
Created August 19, 2019 17:25
Badger test harness
package main
import (
"bytes"
"context"
"encoding/csv"
"fmt"
"log"
"math/rand"
"os"
package jotunheim
import (
"context"
"errors"
"fmt"
"sync"
"sync/atomic"
"github.com/gopcua/opcua"