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
gages = range(1001, 1010) + range(1010, 1491, 10) + range(500, 9501, 500) + range(10000, 40001, 10000) | |
gages.sort() | |
assert len(gages) == 81 | |
def get_dists(n): | |
# Return distances using the LARGEST blocks possible. | |
# Track whether a block is used in a combination using a bitset. | |
if n == 0: | |
return {gages[0]: 1 << 0} | |
this = gages[n] |
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
#!/usr/bin/env python | |
# Copyright 2016 The Kubernetes Authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
#!/usr/bin/env python | |
# Problem: Our maternity photos were mixed digital and film, | |
# and the exif dates/times for the film photos were wrong, preventing | |
# "sort by date" working in Google Photos. | |
# | |
# Solution: the filenames are in the right order, simply interpolate | |
# over the gaps to inject "correct" times. | |
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
{ | |
rateLimit { | |
limit | |
cost | |
remaining | |
resetAt | |
} | |
repository(owner: "kubernetes", name: "kubernetes") { | |
pullRequests(last: 5, states: OPEN) { | |
nodes { |
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
#!/usr/bin/env python2 | |
''' | |
A tiny .torrent file creator with no external dependencies. | |
Easy to hack! | |
''' | |
import argparse | |
import hashlib | |
import os |
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
// ==UserScript== | |
// @name Github Helvetica | |
// @namespace http://userstyles.org | |
// @description Github recently changed their default text font. This restores it to the previous settings -- Helvetica is prettier than Ubuntu Sans on Linux. | |
// @author Ryan Hitchman | |
// @homepage https://userstyles.org/styles/130086 | |
// @match https://github.com/* | |
// @match https://*.github.com/* | |
// @run-at document-start | |
// @version 0.20160711225447 |
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 <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef unsigned long long u64; | |
// Evaluate Conway's Game of Life for an 8x8 grid of cells | |
// The universe is closed (no wrapping, cells outside grid are dead) | |
u64 next(u64 cur) { // ~16.5 cycles (Haswell / GCC 5.2 -O3) | |
// General bit layout (MSB top left, LSB bottom right) |
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
path text picolz zlib -9 lz4hc zlib code + ram | |
---------------------------------------------------- ------ -------- --------- ------- ----------------- | |
2267_12639_chode_br.p8.png 0 8 8 20 74 | |
2137_11694_interstellar.p8.png 248 180 152 191 1346 | |
2338_13131_swirlthing.p8.png 314 254 213 269 296 | |
2120_11629_heavy_snare_worm.p8.png 479 336 280 377 591 | |
2109_11533_transdimensional_butterfly.p8.png 712 504 408 578 1090 | |
2178_11993_garter.p8.png 729 503 388 555 524 | |
2129_11647_snake_killer.p8.png 921 473 397 561 1316 | |
2117_11597_workplace.p8.png 940 369 316 434 1058 |
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
{"tickrate":15,"fillColor":"#222","backgroundColor":"#CC8","buzzColor":"#FFAA00","quietColor":"#000000","shiftQuirks":false,"loadStoreQuirks":false} |
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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |