Skip to content

Instantly share code, notes, and snippets.

Matthew Conlen mathisonian

Block or report user

Report or block mathisonian

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
View .gitignore
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
View test.js
var Lightning = require('lightning.js');
var lightning = new Lightning();
lightning.lineStreaming([1,1,2,3,5,8,13,21])
.then(function(viz) {
viz.open()
setInterval(function() {
viz.appendData([Math.random()]); // appends to existing data
@mathisonian
mathisonian / index.js
Last active Aug 14, 2016
2 copies of react
View index.js
//
// dependencies looks like
// {
// "react": "X.Y.Z",
// "victory": "X.Y.Z"
// }
//
exports.decorateTerm = (Term, { React, notify }) => {
@mathisonian
mathisonian / index.js
Last active Aug 14, 2016
hyperterm plugin test
View index.js
exports.decorateTerm = (Term, { React, notify }) => {
// this library calls require('react') internally
const Spinner = require('react-spinner');
return class extends React.Component {
render () {
const children = [];
children.push(React.createElement(Term, Object.assign({}, this.props, { key: 'key1' })));
View frag.glsl
precision lowp float;
varying vec3 fragColor;
void main() {
if (length(gl_PointCoord.xy - 0.5) > 0.5) {
discard;
}
gl_FragColor = vec4(fragColor, 1);
}
@mathisonian
mathisonian / index.py
Created Apr 13, 2016
lightning remote
View index.py
from lightning import Lightning, Line
lgn_host = 'http://localhost:3000/'
#### This instantiates everything
lgn = Lightning(host=lgn_host)
lgn.create_session()
session_id = lgn.session.id
print session_id
@mathisonian
mathisonian / index.py
Created Apr 12, 2016
streaming line python
View index.py
from lightning import Lightning
import numpy as np
import time
from random import randint, random
lgn = Lightning()
session = lgn.create_session()
NUM_LINES = 2
NUM_INITIAL_POINTS = 10
View index.js
var _ = require('lodash');
var d3 = require('d3');
function randomVariable(rate) {
rate = rate || 1;
var U = Math.random();
return -Math.log(U)/rate;
};
var start = 0;
View aspect-ratio.js
var aspectRatio= '16:9';
var viewBox = '0 0 ' + aspectRatio.split(':').join(' ');
var svg = d3.select('#example-4')
.append('svg')
.attr('width', '100%')
.attr('viewBox', viewBox);
// draw the background
You can’t perform that action at this time.