Skip to content

Instantly share code, notes, and snippets.

View MatthewWest's full-sized avatar

Matt West MatthewWest

View GitHub Profile
from collections import defaultdict, deque
def find_coordinate_bounds(list_of_tuples):
max_x = float('-inf')
min_x = float('inf')
max_y = float('-inf')
min_y = float('inf')
for x, y in list_of_tuples:
if x > max_x:
max_x = x
A B M Q B B L F
A F W R K U I B
###################################.###.###.#############.###.###########.#####.###.#########################################
#.#...#...............#.#.#.#.......#.....#.#...#.......#.#.#...#.#...#.#.#.....#.......#...........#...#.#...#.......#.#.#.#
#.#.#######.#.###.#.#.#.#.#.#.#.###.#.###.#.#.#.###.###.#.#.#.###.#.###.#.###.#.###.###.#.#######.#.###.#.#.#####.#####.#.#.#
#.#.#.......#.#.#.#.#.#.......#.#.....#...#...#...#.#.......#.....#.#.#...#...#.#...#.......#...#.#.#...#...#.#.......#.#.#.#
#.#.###########.#####.#.#####.###.#####.#.###.###.#.#########.#####.#.#.###.#####.#.#.#######.#########.#.###.#.###.###.#.#.#
#.#.....#...#...#.#.#.......#.#...#.....#.#.....#.#.#.....#...#.#.......#...#...#.#.#...#.#.#...#...#.#.........
You'd want to have at least one of the axes' cycles have a large prime. My x axis's cycle, when factored, has a 5-digit prime factor.
Then figuring out how to generate coordinates with a cycle for arbitrary length would be tough

Keybase proof

I hereby claim:

  • I am matthewwest on github.
  • I am mwest217 (https://keybase.io/mwest217) on keybase.
  • I have a public key ASBxVv7JUZtYb3lqJkGDc3M0NLHnLOXhB68LqN3G4NvVNQo

To claim this, I am signing this object:

@MatthewWest
MatthewWest / adc_test1.md
Last active August 10, 2016 23:41
Debian 7.11, Linux 3.8.13-bone80 test

Starting investigation of ADC. ADC.setup() is failing:

open("/sys/devices", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
getdents64(3, /* 16 entries */, 32768)  = 536
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
open("/sys/devices/bone_capemgr.9/slots", O_RDWR|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f3c000
@MatthewWest
MatthewWest / .vimrc
Last active September 21, 2016 17:31
filetype plugin indent on
" Vim Shell {{{
" ====================================================================
if &shell =~# 'fish$'
set shell=bash
endif
" }}}
" Make Space the leader
@MatthewWest
MatthewWest / 0_reuse_code.js
Created May 12, 2016 23:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
let mapleader = ','
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" "let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
@MatthewWest
MatthewWest / gist:2faaa2121eb5c1cb1f48
Created March 12, 2015 04:34
Project Bug description
iteration 3230
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |X | . . . . . . . . . . . . . .X |X X X |X|
+ + +-+-+-+ + + +.+ +.+.+.+.+.+.+.+.+.+.+.+.+-+-+ + +.+.+ +-+-+-+ + + +
| |X| |X |X| . . | . . . . . . . . . . . | |X| . . |X|
+ +-+ + +-+ +-+ +.+ +-+-+-+.+.+.+.+.+.+.+.+.+ + + +-+-+ +.+.+.+.+.+ + +
| | | | . . | . . . . . . . . | . |X X|X| . . . . |
+ +-+-+-+ +-+ + +.+.+.+.+ +-+-+.+.+.+.+-+-+.+ + +.+ + + +.+.+ +-+ +.+ +
|X|X X| |X | . . . . . | . . . | | | . | .X X| . . |X| . . |
+ + + + +-+-+ + +.+.+.+.+.+.+ +.+.+.+.+ + +-+ + +-+-+-+ +.+ +-+ + +.+ +