Skip to content

Instantly share code, notes, and snippets.

gorlum0

Block or report user

Report or block gorlum0

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
@gorlum0
gorlum0 / gist:5721558
Created Jun 6, 2013
fbreader old skin
View gist:5721558
font color: black
background color: #F5F2E7
@gorlum0
gorlum0 / str2nums.py
Created Sep 7, 2012
Some convenience funcs for algs4partI-class exercises - easier in numbers for me than in alphabet.
View str2nums.py
#algs4partI-class
def str2nums(s):
return [ord(x)-ord('A') for x in s.split()]
def nums2str(l):
return ' '.join(chr(x + ord('A')) for x in l)
@gorlum0
gorlum0 / quix.txt
Created Mar 26, 2012
quix.txt for quixapp
View quix.txt
> This is a Quix Command File
>
> For the syntax of this file, please refer to http://quixapp.com/syntax/
>
@Basic commands
@These are the most basic commands Quix offers, but possibly also the most powerful ones.
a http://www.amazon.com/s/?field-keywords=%s Amazon Search
d http://www.google.com/search?q=define:%s Google Define a word
dict http://www.google.com/dictionary?langpair=en%7Cen&q=%s&hl=en&aq=f Google Dictionary for a word
@gorlum0
gorlum0 / count-inv-lr.py
Created Mar 16, 2012
Count inversions in an array, not "in-place"
View count-inv-lr.py
#!/usr/bin/env python
"""(c) gorlum0 [at] gmail.com"""
import random
from sys import maxsize as inf
def merge_sort(A):
"""merge-sort which counts inversions"""
def merge(L, R):
m = len(L)-1
B = []
@gorlum0
gorlum0 / ex2_reg.py
Created Jan 28, 2012
ml-class - ex2_reg (python)
View ex2_reg.py
#!/usr/bin/env python
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from scipy import optimize
from numpy import newaxis, r_, c_, mat, e
from numpy.linalg import *
def plotData(X, y):
pos = (y.ravel() == 1).nonzero()
@gorlum0
gorlum0 / ex2.py
Created Jan 28, 2012
ml-class - ex2 (python)
View ex2.py
#!/usr/bin/env python
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from scipy import optimize
from numpy import newaxis, r_, c_, mat, e
from numpy.linalg import *
def plotData(X, y):
#pos = (y.ravel() == 1).nonzero()
@gorlum0
gorlum0 / ex1_multi.py
Created Oct 31, 2011
ml-class - ex1_multi (python)
View ex1_multi.py
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
from numpy import newaxis, r_, c_, mat
from numpy.linalg import *
def featureNormalize(X):
X_norm = X.A
m = X.shape[0]
You can’t perform that action at this time.