Skip to content

Instantly share code, notes, and snippets.

View Teino1978-Corp's full-sized avatar

Teino Boswell Teino1978-Corp

  • Ocho Rios, Jamaica
View GitHub Profile
@Teino1978-Corp
Teino1978-Corp / README.md
Created October 30, 2015 08:15 — forked from nitaku/README.md
Hilbert treemap (full hierarchy)
@Teino1978-Corp
Teino1978-Corp / hilbert_curve.py
Created October 30, 2015 08:38 — forked from mdickinson/hilbert_curve.py
Code to create the third-order approximation to a 3d space-filling Hilbert curve
import numpy
def hilbert():
"""
Return NumPy array of shape (512, 3) containing successive coordinates
for a third-order three-dimensional Hilbert curve.
"""
a,b,c=numpy.indices((8,)*3).reshape(3,-1)
d=c[:8];r=abs(d-3>>1);g=(d^d>>1)*73;f=g[abs(d-1)&6]
@Teino1978-Corp
Teino1978-Corp / Space-filling curve layout (Hilbert)
Last active October 30, 2015 08:54 — forked from nitaku/README.md
Space-filling curve layout (Hilbert)
An example of [a space-filling curve layout](http://bl.ocks.org/nitaku/8772179) using [the Hilbert curve](http://bl.ocks.org/nitaku/6514960) to represent the *flare* software package classes.
![](http://i.imgur.com/2iI8b9a.gif)
@Teino1978-Corp
Teino1978-Corp / jsGettersAndSetters.js
Created October 30, 2015 18:12 — forked from dnasca/jsGettersAndSetters.js
Getters and Setters in JS, the easy way.
//getters and settings done easy
var Circle = function(radius) {
this._radius = radius;
};
Circle.prototype = {
set radius(radius) {this._radius = radius;},
get radius() { return this._radius;},
get area() { return Math.PI * (this._radius * this._radius);}
};
@Teino1978-Corp
Teino1978-Corp / gist:2912c417f9a8cd9a4549
Created October 30, 2015 18:41 — forked from samaaron/gist:3607725
Random circles with Raphael.js & ClojureScript
(ns hello-world.hello)
(defn- clj-map->js-map
"makes a javascript map from a clojure one"
[cljmap]
(let [out (js-obj)]
(doall (map #(aset out (name (first %)) (second %)) cljmap))
out))
(defn- attr [object attributes]
//: Playground - noun: a place where people can play
import Foundation
func tablesOfTwo(x: Int) -> Int {
return 2 * x;
}
func tablesOfThree(x: Int) -> Int {
return 3 * x;
public final static class CircBuf {
private ArrayList<String> circArray;
private int size = 6;
public CircBuf(final int size) {
this.size = size;
circArray = new ArrayList<String>(this.size);
}
my %circ = (
'(' => ')',
'[' => ']'
);
token circumfix_operation { (<circumfix_open>) <expression> (<circumfix_close>) <?{ %circ{$0} eq $1 }> }
token circumfix_open { @(%circ.keys) }
token circumfix_close { @(%circ.values) }
<div class="pull-left">...</div>
<div class="pull-right">...</div>
<!-- Classes -->
<style type='text/css'>
.pull-left {
float: left !important;
}
.pull-right {