Skip to content

Instantly share code, notes, and snippets.

View mjfwest's full-sized avatar

Martin West mjfwest

View GitHub Profile
@mjfwest
mjfwest / ConstraintTest.py
Created February 1, 2018 13:44
A non functional test of configuration constraints with pydy
# coding: utf-8
# In[1]:
from __future__ import print_function, division
from sympy import symbols, simplify
import sympy.physics.mechanics as mech
# import dynamicsymbols, ReferenceFrame, Point, Particle
# from sympy import symbols, atan, Matrix, solve
MacBook-Pro-2:or-tools XXXXX$ ccmake .
MacBook-Pro-2:or-tools XXXXX$ make
[ 2%] Built target gflags_project
[ 4%] Built target glog_project
[ 6%] Built target Protobuf_project
[ 9%] Built target CoinUtils_project
[ 11%] Built target Osi_project
[ 13%] Built target Clp_project
@mjfwest
mjfwest / index.html
Created September 25, 2012 23:24
D3js example, Single Line works. Multi Line works.. But then dies quickly.
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>multilinegraph</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Martin West">
<!-- Date: 2012-09-26 -->
</head>
<style>
@mjfwest
mjfwest / index.html
Created July 1, 2012 23:35 — forked from benjchristensen/index.html
Interactive Line Graph (D3)
<html>
<head>
<title>Interactive Line Graph</title>
<script src="http://d3js.org/d3.v2.js"></script>
<!--
using JQuery for element dimensions
This is a small aspect of this example so it can be removed fairly easily if needed.
-->
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="sample_data.js"></script>
@mjfwest
mjfwest / gauge.js
Created May 27, 2012 23:32 — forked from tomerd/gauge.js
google style gauges using javascript d3.js
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var self = this; // some internal d3 functions do not "like" the "this" keyword, hence setting a local variable
this.configure = function(configuration)
{
this.config = configuration;
@mjfwest
mjfwest / server.js
Created April 14, 2012 19:39 — forked from mixonic/server.js
Node.js + Socket.io + Bash. A collaborative terminal for your browser.
//
// This server will start a bash shell and expose it
// over socket.io to a browser. See ./term.html for the
// client side.
//
// You should probably:
//
// npm install socket.io
// curl -O https://github.com/LearnBoost/Socket.IO/raw/master/socket.io.min.js
//
@mjfwest
mjfwest / demo.html
Created April 8, 2012 09:36 — forked from anoras/demo.html
Code for my screencast at http://vimeo.com/13043828
<!doctype html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="client/socket.io.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
var socket = new io.Socket(null, {rememberTransport: false, port: 8080});
socket.connect();
socket.addEvent('message', function(data) {
$('body').append('<p>' + $.map(data, function(e,i) {