This file contains 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 | |
''' | |
Pure Python implementation of some numerical optimizers | |
Created on Jan 21, 2011 | |
@author Jiahao Chen | |
''' |
This file contains 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/python | |
# Connects to servers vulnerable to CVE-2014-0160 and looks for cookies, specifically user sessions. | |
# Michael Davis ([email protected]) | |
# Based almost entirely on the quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
# The author disclaims copyright to this source code. | |
import select |
This file contains 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
import numpy as np | |
rng = np.random.RandomState(0) | |
print "Trace" | |
A = rng.rand(3, 3) | |
print np.trace(A) | |
print np.einsum("ii", A) | |
This file contains 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
WITH RECURSIVE | |
x(i) AS ( VALUES (0) | |
UNION ALL SELECT i + 1 | |
FROM x | |
WHERE i < 101), | |
Z(Ix, Iy, Cx, Cy, X, Y, I) AS ( | |
SELECT | |
Ix, | |
Iy, | |
X :: FLOAT, |
This file contains 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
from threading import Timer | |
from multiprocessing import TimeoutError | |
def itimeout(iterable,timeout): | |
"""timeout for loops | |
:param iterable: any iterable | |
:param timeout: float max running time in seconds | |
:yield: items in iterator until timeout occurs | |
:raise: multiprocessing.TimeoutError if timeout occured | |
""" |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>D3Table</title> | |
<link rel="stylesheet" href="https://rawgit.com/goulu/Clusterize.js/master/clusterize.css"></script> | |
<script src="https://rawgit.com/goulu/Clusterize.js/master/clusterize.js"></script> | |
<script src='http://d3js.org/d3.v3.js' type='text/javascript'></script> | |
<script src="./table.js" type='text/javascript'></script> | |
</head> |