Skip to content

Instantly share code, notes, and snippets.

View thomasrussellmurphy's full-sized avatar

Thomas Russell Murphy thomasrussellmurphy

View GitHub Profile
Boot Error
Something went wrong while loading config.ru
NameError: uninitialized constant ActionView
/Users/thomasrussellmurphy/.rvm/gems/ruby-2.2.1/gems/metamagic-2.0.5/lib/metamagic.rb:2:in `<top (required)>'
/Users/thomasrussellmurphy/.rvm/gems/ruby-2.2.1/gems/bundler-1.10.5/lib/bundler/runtime.rb:76:in `require'
/Users/thomasrussellmurphy/.rvm/gems/ruby-2.2.1/gems/bundler-1.10.5/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/Users/thomasrussellmurphy/.rvm/gems/ruby-2.2.1/gems/bundler-1.10.5/lib/bundler/runtime.rb:72:in `each'
/Users/thomasrussellmurphy/.rvm/gems/ruby-2.2.1/gems/bundler-1.10.5/lib/bundler/runtime.rb:72:in `block in require'

do androids dream of cooking?

The following recipes are sampled from a trained neural net. You can find the repo to train your own neural net here: https://github.com/karpathy/char-rnn Thanks to Andrej Karpathy for the great code! It's really easy to setup.

The recipes I used for training the char-rnn are from a recipe collection called ffts.com And here is the actual zipped data (uncompressed ~35 MB) I used for training.

It seems to be in a format intended to be read by a program called Meal-Master, therefore you will see those lines repeated all over:

@thomasrussellmurphy
thomasrussellmurphy / gist:ef3c66fea395142db471
Created October 14, 2014 01:01
Snippit of fixed-value Verilog ROM
[...]
// store address every clock cycle
always @( posedge clk )
addr_reg <= addr;
// 2-bit color 8x16 (wide x high) 64-character ROM
always @(*) begin
case ( addr_reg )
//code 0x00, space
@thomasrussellmurphy
thomasrussellmurphy / gist:0bb9f503f352311c02cd
Created October 3, 2014 03:59
PLY Lex INT or FLOAT Correctly!
# Have to start with a general numeric token to avoid PLY lexing problems
r_NUM_CONST = r'[0-9]*\.?[0-9]+((E|e)(\+|-)?[0-9]+)?'
@Token(r_NUM_CONST)
def t_NUM_CONST(self, token):
try:
token.value = int(token.value)
token.type = 'INT_CONST'
return token
except ValueError:
/* Apple Extended Keyboard US
* ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,---.
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr|
* `---' `---------------' `---------------' `---------------' `-----------' `---'
* ,-----------------------------------------------------------. ,-----------. ,---------------.
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| =| /| *|
* |-----------------------------------------------------------| |-----------| |---------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| -|
* |-----------------------------------------------------------| `-----------' |---------------|
* |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| +|