Skip to content

Instantly share code, notes, and snippets.

package main
import (
"bufio"
"github.com/nfnt/resize"
"image"
"image/color"
"image/draw"
"image/jpeg"
_ "image/png"
package main
import (
"bufio"
"github.com/nfnt/resize"
"image"
"image/color"
"image/draw"
"image/jpeg"
_ "image/png"

Keybase proof

I hereby claim:

  • I am pwfff on github.
  • I am pwf (https://keybase.io/pwf) on keybase.
  • I have a public key whose fingerprint is A356 4214 30C3 5333 62FD 4E33 A291 ED64 DA2F D1B4

To claim this, I am signing this object:

@pwfff
pwfff / gist:8966300
Last active August 29, 2015 13:56 — forked from sartaj/gist:8966229
// Go To flapmmo.com
// Open Web Inspector
// Go to sources tab
// On the side bar, find main.js
// Pretty Print main.js (in Chrome, its the curly bracket symbol on the bottom)
// Add breakpoint on line 142 by literally clicking where the line number is listed
// Go to the console tab.
// You can have a friend tell you their server and then use this to be on same sever as them.
// To set the server to something you want, run this.
In [1]: import helpers
In [2]: data = helpers.load_dataset('Datasets/dataset1.mat')
In [3]: data
Out[3]:
{'neg_examples_nobias': array([[-0.80857143, 0.8372093 ],
[ 0.35714286, 0.85049834],
[-0.75142857, -0.73089701],
[-0.3 , 0.12624585]]),
@pwfff
pwfff / helpers.py
Created October 10, 2012 16:45
coursera neural networks assignment 1 sample code (ported from octave)
import scipy.io
UNWANTED_KEYS = ('__globals__', '__header__', '__version__')
def load_dataset(path):
data = scipy.io.loadmat(path)
for key in UNWANTED_KEYS:
del data[key]