Skip to content

Instantly share code, notes, and snippets.

View 1lann's full-sized avatar

Jason Chu 1lann

View GitHub Profile
#include <string>
#include <sstream>
using namespace std;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
return b == 0 ? a : gcd(b, a % b);
}
typedef struct Rat {
@1lann
1lann / honeycomb.go
Created January 22, 2016 07:27
A solution to a honeycomb word search problem.
package main
import (
"fmt"
"io/ioutil"
"os"
"sort"
"strings"
)
package main
import (
"fmt"
"github.com/hybridgroup/gobot"
"github.com/hybridgroup/gobot/platforms/i2c"
"github.com/hybridgroup/gobot/platforms/raspi"
"time"
)
package main
import (
"fmt"
"github.com/hybridgroup/gobot"
"github.com/hybridgroup/gobot/platforms/i2c"
"github.com/hybridgroup/gobot/platforms/raspi"
"time"
)
package main
import (
"database/sql"
"encoding/json"
"fmt"
"os"
_ "github.com/mattn/go-sqlite3"
)
package main
import (
"fmt"
"unsafe"
)
type plank struct {
size int
cuts []int
[{
"period": "2016 4",
"statistics": [{
"tier": "BRONZE",
"values": {
"assists": 1290718,
"deaths": 881788,
"double_kills": 90478,
"kills": 893516,
"losses": 65738,

Keybase proof

I hereby claim:

  • I am 1lann on github.
  • I am 1lann (https://keybase.io/1lann) on keybase.
  • I have a public key whose fingerprint is 5503 BCF2 EC0C DB3C A0A2 8ADA 4B3F 51DB 88EC 5DBD

To claim this, I am signing this object:

-- Goroutines for ComputerCraft!
-- Made by 1lann (Jason Chu)
-- Last updated: 31st July 2015
--[[
Licensed under the MIT License:
The MIT License (MIT)
Copyright (c) 2015 1lann (Jason Chu)
@1lann
1lann / gearing.py
Created November 11, 2016 19:39
gearing_up_for_destruction Google foobar solution. I'm posting this because I'm angry that foobar glitched up and ate my solution, and `submit` didn't actually go through. `verify` however said it passed all tests. Oh well, I'll post it here for science.
from fractions import Fraction
def invert(matrix):
n = len(matrix)
inverse = [[Fraction(0) for col in range(n)] for row in range(n)]
for i in range(n):
inverse[i][i] = Fraction(1)
for i in range(n):