Skip to content

Instantly share code, notes, and snippets.

Trevor Bentley mrmekon

Block or report user

Report or block mrmekon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am mrmekon on github.
  • I am mrmekon (https://keybase.io/mrmekon) on keybase.
  • I have a public key whose fingerprint is 2685 83B6 4786 F50F 8074 56DA 8CED 3A80 D41C 0DCB

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am mrmekon on github.
  • I am mrmekon (https://keybase.io/mrmekon) on keybase.
  • I have a public key ASAw0C2WLtDhdmeIAlPwLXyN8KISfCKBhWqala0Dl6UQFwo

To claim this, I am signing this object:

@mrmekon
mrmekon / fp_profiler.mm
Created May 30, 2013
Compares the performance of fixed-point vs floating-point arithmetic on iPhone 5 (Apple A6 processor) by evaluating a contrived 'movement update' algorithm over a large array of 'particle' structs. Intended to identify best practices for developing an efficient particle engine. I recommend testing on the device with 'Release' versions, using -O3…
View fp_profiler.mm
//
// main.m
// fp_profiler
//
// Compares the performance of fixed-point vs floating-point for simple
// "particle engine" movement loops.
//
// Optimized for iPhone 5 (Apple A6 / ARMv7)
//
// Created by Trevor Bentley on 5/29/13.
@mrmekon
mrmekon / analyze.py
Created May 5, 2012
Markov Chain Employee Performance Review Generator
View analyze.py
#!/usr/bin/env python
import string
import random
import sys
import pickle
f = open("employee_review_corpus.txt", "r")
contents = f.read()
f.close()
@mrmekon
mrmekon / whitening.py
Created Feb 16, 2012
Data whitening (scrambling) with 9-bit LFSR
View whitening.py
import sys
import os
import numpy
import random
import string
import matplotlib.pyplot as plt
#data = numpy.random.bytes(10000000)
data = [random.choice(string.printable) for x in xrange(1000000)]
#data = numpy.random.bytes(100)
@mrmekon
mrmekon / depthdev.py
Created Feb 10, 2012
Embedly application puzzle
View depthdev.py
import urllib2
from xml.etree.ElementTree import XMLParser
import numpy
class DepthCounter:
depthdict = {}
def __init__(self):
self.classdepth = 0
self.depth = 0
self.depthdict = {}
@mrmekon
mrmekon / cancelMessages.clj
Created Jan 30, 2012
Cancel all ISS messages in queue
View cancelMessages.clj
(ns com.trevorbentley.cancelMessages
(:require [http.async.client :as client]
[cheshire.core :as cheshire]))
(def host (if (> (count *command-line-args*) 0)
(first *command-line-args*)
"localhost"))
(def cancelUrl (str "http://" host ":9090/cancelMessage"))
(def activeUrl (str "http://" host ":9090/activeMessages"))
@mrmekon
mrmekon / Makefile
Created Jan 17, 2012
Capacitive touch sensor via ADC (no external components)
View Makefile
all: default run
default:
msp430-gcc -I/usr/local/msp430-gcc-4.4.3/msp430/include/ captouch.c -save-temps -mendup-at=main -mmcu=msp430x2111 -Os
run:
mspdebug rf2500 "prog a.out"
dump:
mspdebug rf2500 "md 0x1000 256"
@mrmekon
mrmekon / Makefile
Created Jan 16, 2012
MSP430 circuit to measure and trick 1997 Jetta LD Pump
View Makefile
all: default run
default:
msp430-gcc -I/usr/local/msp430-gcc-4.4.3//msp430/include/ ldpump_tester.c -save-temps -mendup-at=main -mmcu=msp430x2111 -Os
run:
mspdebug rf2500 "prog a.out"
dump:
mspdebug rf2500 "md 0x1000 256"
@mrmekon
mrmekon / Makefile
Created Jan 16, 2012
MSP430 capacitive touch sensor with ADC and capacitor
View Makefile
all: default run
default:
msp430-gcc -I/usr/local/msp430-gcc-4.4.3/msp430/include/ captouch.c -save-temps -mendup-at=main -mmcu=msp430x2111 -Os
run:
mspdebug rf2500 "prog a.out"
dump:
mspdebug rf2500 "md 0x1000 256"
You can’t perform that action at this time.