Instantly share code, notes, and snippets.

View xls2csv.groovy
import com.opencsv.*
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
String file = args[0]
def book = new XSSFWorkbook(file)
shawnma /
Created Oct 23, 2018
permutations of words
import copy, sys
words = set()
def load():
for f in open('words.txt').readlines():
# sr - string
# all - output set
View .tmux.conf
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
View soduku
from copy import copy
from operator import itemgetter
def weigh(arr):
wx = [0,0,0,0,0,0,0,0,0]
wy = copy(wx)
wb = copy(wx)
for i in range(0,9):
for j in range(0,9):
wx[i] += 1 if arr[i][j] != '.' else 0
View pbascii.sublime-syntax.yaml
%YAML 1.2
name: pbascii
file_extensions: [pbascii]
scope: source.pbascii
- match: '"'
push: string
View .vimrc
set hls
syntax on
au BufNewFile,BufRead *.gradle setf groovy
au BufRead,BufNewFile *.md set syntax=markdown
autocmd Filetype gitcommit setlocal spell textwidth=72
set ts=4 et
highlight ExtraWhitespace ctermbg=darkyellow guibg=red
set guifont=Inconsolata:h18
match ExtraWhitespace /\t/
se nocompatible