This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""(c) gorlum0 [at] gmail.com""" | |
import itertools as it | |
from sys import stdin | |
class NetworkXMessageRecovery: | |
def recover(self, messages): | |
res = [] | |
req = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import os | |
import datetime as dt | |
import glob | |
from BeautifulSoup import BeautifulSoup | |
def xml2srt(pathname): | |
root, _ = os.path.splitext(pathname) | |
if os.path.exists('%s.srt' % root): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 plotData(X, y): | |
plt.plot(X, y, 'rx', markersize=7) | |
plt.ylabel('Profit in $10,000s') | |
plt.xlabel('Population of City in 10,000s') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%s |