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
// Interestingly, the compare with undefined below is about ~10x slower than the typeof compare in Firefox. | |
// See this by running myTiming() and myTimingUndefinedCompare() | |
class MyArrayIterator { | |
constructor(source) { | |
this._index = 0; | |
this._source = source; | |
} |
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
#!/bin/sh | |
set -e | |
gh="https://github.com/" | |
repos=" | |
ipython/traitlets | |
ipython/ipython | |
jupyter/jupyter_core |
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
<!-- put this in the header--> | |
<script src='http://sagecell.sagemath.org/static/jquery.min.js'/> | |
<script src='http://sagecell.sagemath.org/static/embedded_sagecell.js'/> | |
<link href='http://sagecell.sagemath.org/static/sagecell_embed.css' rel='stylesheet' type='text/css'/> | |
<!-- put this in the body where you want a cell. adjust your inputs, of course. --> | |
<div class="sage"> | |
<script type="text/x-sage"> | |
1+2 | |
</script></div> |
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
<!-- put this in the header--> | |
<script src='http://sagecell.sagemath.org/static/jquery.min.js'/> | |
<script src='http://sagecell.sagemath.org/static/embedded_sagecell.js'/> | |
<link href='http://sagecell.sagemath.org/static/sagecell_embed.css' rel='stylesheet' type='text/css'/> | |
<script>$(function () { sagecell.makeSagecell({"inputLocation": ".sage"}) });</script> | |
<!-- put this in the body where you want a cell. adjust your inputs, of course. --> | |
<div class="sage"> | |
<script type="text/x-sage"> |
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 serve_figure | |
import numpy as np | |
from numpy import ma | |
from matplotlib import pyplot as plt | |
n = 12 | |
x = np.linspace(-1.5,1.5,n) | |
y = np.linspace(-1.5,1.5,n*2) |
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
This is gist. | |
There are many like it, but this one is mine. | |
It is my life. | |
I must master it as I must master my life. | |
Without me gist is useless. | |
Without gist, I am useless. |
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
# Load a sparse matrix. | |
import numpy as np | |
from scipy import sparse | |
def mymethod(): | |
print 'hi' | |
def load_sparse(filename, dtype=np.float32): | |
with file(filename) as input: |
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
<html> | |
<head> | |
<title>test</title> | |
</head> | |
<body> | |
<h1>testing gist again</h1> | |
<script src="http://gist.github.com/3806.js"></script> | |
</body> | |
</html> |