Skip to content

Instantly share code, notes, and snippets.

CFLAGS = g++ -m32 -ldl -Wall -Werror -ansi -pedantic -fno-elide-constructors
all : bin/testa.1.exe bin/testb.2.exe bin/testc.4.exe
bin/testa.1.exe : tests/testa.1.cc
g++ $(CFLAGS) -o bin/testa.1.cc tests/testa.1.cc obj/libvm_app.a
bin/testb.2.exe : tests/testb.2.cc
g++ $(CFLAGS) -o bin/testb.2.cc tests/testb.2.cc obj/libvm_app.a
@gps
gps / listbm.py
Created November 27, 2010 06:47
Benchmark python list functions
#!/usr/bin/env python
"""
listbm.py
Created by Gopal Sharma on 2010-11-26.
Copyright (c) 2010 Gopal Sharma. All rights reserved.
"""
import random
import gc
@gps
gps / nums.txt
Created November 27, 2010 07:33
Sort
1000 0.000330050786336
10000 0.00447765986125
10 7.70886739095e-06
100 2.79744466146e-05
Count
1000 0.348242680232
10000 3.67426331838
10 0.005202293396
100 0.0360999902089
Sort
1000 0.000516104698181
10000 0.00469574928284
20000 0.0102875947952
30000 0.0165929079056
40000 0.0236738443375
50000 0.0325540542603
75000 0.0518421888351
90000 0.0673050880432
100000 0.0782945871353
@gps
gps / Michigan-MichiganState2012.md
Created October 20, 2012 17:53
Michigan - Michigan State 2012

Offense

  • Denard <= 2 INT
  • Denard >= 150 yards passing, with >= 60% completions
  • Rawls on jumbo/short yardage
  • = 150 yards with non Denard rushing

  • Denard makes a few secondary players look stupid with his legs

Defense:

val cursor = db.rawQuery(
"""
SELECT
${TN.PROJECTS}.${CN.PROJECT_ID},
${TN.PROJECTS}.${CN.NAME},
${TN.PROJECTS}.${CN.COLOR_CODE},
${TN.PROJECTS}.${CN.CHANGE_TOKEN},
${TN.PROJECTS}.${CN.DELETED}
FROM ${TN.PROJECTS}, ${TN.TIMERS}
WHERE
SELECT
PROJECTS.PROJECT_ID,
PROJECTS.NAME,
PROJECTS.COLOR_CODE,
PROJECTS.CHANGE_TOKEN,
PROJECTS.DELETED
FROM PROJECTS, TIMERS
WHERE
PROJECTS.DELETED = '0' AND
TIMERS.DELETED = '0' AND
SELECT
PROJECTS.PROJECT_ID,
PROJECTS.NAME,
PROJECTS.COLOR_CODE,
PROJECTS.CHANGE_TOKEN,
PROJECTS.DELETED
FROM PROJECTS, TIMERS
WHERE
PROJECTS.DELETED = '0' AND
TIMERS.DELETED = '0' AND
@gps
gps / setup_macos.sh
Created May 22, 2018 11:43
install_fonts.sh
#!/bin/bash
et -eu
brew install rbenv wget git pbzip2 git-lfs carthage htop libdvdcss node yarn python youtube-dl ffmpeg libsodium python3 subversion jq qpdf watchman
brew cask install 1password dropbox atom iterm2 istat-menus alfred bartender
brew tap caskroom/versions
brew cask install java8