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
<h1 id="otsake"></h1> | |
<script type="text/javascript" src="coffee-script.js"></script> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.3.js"></script> | |
<script type="text/coffeescript"> | |
otsake = $("#otsake") | |
otsake.text("Hello DOM!") | |
</script> |
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
import numpy as np, matplotlib.pyplot as plt, sys | |
from scipy.ndimage.filters import gaussian_filter | |
def transparent_jet(cutoff=0.2): | |
colormap = plt.cm.get_cmap('jet') | |
colormap._init() | |
alphas = np.linspace(0.0, 1.0, colormap.N) | |
alphas[alphas < cutoff] = 0.0 | |
alphas[alphas > cutoff] = 1.0 | |
colormap._lut[:-3,-1] = alphas |
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
/** | |
Hangs after two frames with gstreamer 1.0: | |
gcc -o v4l2_hang1.0 `pkg-config gstreamer-1.0 --cflags --libs` v4l2_hang.c && ./v4l2_hang1.0 | |
Works fine with 0.10 | |
gcc -o v4l2_hang0.10 `pkg-config gstreamer-0.10 --cflags --libs` v4l2_hang.c && ./v4l2_hang0.10 | |
*/ | |
#include <gst/gst.h> | |
#include <stdio.h> |
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
# PyGST with Gst 0.10 works fine | |
import gst | |
pipe = gst.parse_launch("""v4l2src device=/dev/video0 ! | |
appsink sync=false max-buffers=1 drop=true name=sink emit-signals=true""") | |
sink = pipe.get_by_name('sink') | |
pipe.set_state(gst.STATE_PLAYING) |
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
<html> | |
<head> | |
<script src="http://motherjones.github.io/newsquizjs/jquery.js"></script> | |
<script src="http://motherjones.github.io/newsquizjs/tabletop.js"></script> | |
<script src="http://motherjones.github.io/newsquizjs/newsquiz.min.js"></script> | |
<link href="http://motherjones.github.io/newsquizcss/bootstrap.min.css" rel="stylesheet" media="screen"> | |
<link href="http://motherjones.github.io/newsquizcss/bootstrap-responsive.css" rel="stylesheet" media="screen"> | |
<link href="http://motherjones.github.io/newsquizcss/style.css" rel="stylesheet" media="screen"> | |
</head> | |
<body> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder