UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!
- liblinear-ruby: Ruby interface to LIBLINEAR using SWIG
<!-- @NOTE: the onclicks are used for touch devices since I'm lazy and didnt use <a> tags --> | |
<div class="Menu"> | |
<ul class="Menu-list" data-offset="10"> | |
<li class="Menu-list-item" data-offset="20" onclick> | |
Home | |
<span class="Mask"><span>Home</span></span> | |
<span class="Mask"><span>Home</span></span> | |
</li> | |
<li class="Menu-list-item" data-offset="16" onclick> | |
About |
A Pen by Bill White on CodePen.
A Pen by Bill White on CodePen.
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |
// original (broken) version is here: http://ivan-ghandhi.livejournal.com/942493.html | |
// My fix: don't treat arguments as if it were an array | |
// (Use Array.prototype.slice.call() to convert it) | |
function stackTrace() { | |
var err = new Error(); | |
console.log(typeof err.stack); | |
return err.stack; | |
} |
function trimSvgWhitespace() { | |
// get all SVG objects in the DOM | |
var svgs = document.getElementsByTagName("svg"); | |
// go through each one and add a viewbox that ensures all children are visible | |
for (var i=0, l=svgs.length; i<l; i++) { | |
var svg = svgs[i], | |
box = svg.getBBox(), // <- get the visual boundary required to view all children |
<svg viewBox="0 0 500 500"> | |
<g class="scene1"> | |
<defs> | |
<clipPath id="circle"> | |
<circle class="mask" cx="250" cy="250" r="100" /> | |
</clipPath> | |
<clipPath id="ground"> | |
<rect x="50" y="50" width="400" height="260" /> | |
</clipPath> | |
</defs> |
<div id="keysleft"> | |
move: WASD | |
<br>Hold/Drop/Fire(hold it): E | |
<br>Pause: F | |
<br>Gravity: R | |
<br>Have fun | |
</div> | |
<div id="keysright"> | |
zoom: + - | |
<br>fire: click |