Skip to content

Instantly share code, notes, and snippets.

View JnBrymn-EB's full-sized avatar
👖
.

John Berryman JnBrymn-EB

👖
.
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JnBrymn-EB
JnBrymn-EB / fractal.js
Last active December 15, 2015 21:52
This is a Pythagorean fractal -- Until you click and drag the control points. Then it's whatever fractal you want it to be! (Built with custom drag-n-drop library called DragonDroppings.)
function DragonDroppings(vis) {
this.registeredNodes = {};
this.selector = null;
this.xStart = -1;
this.yStart = -1;
this.xTrans = 0;
this.yTrans = 0;
this.vis = vis;
vis[0][0].addEventListener('mousemove', DragonDroppings._onmousemoveFactory(this))
<!DOCTYPE html>
<html>
<head>
<title>Pythag</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
<script charset="utf-8">
/**
* four points of a quad and the depth the line from point 0 to point 3 is considered the base, the
* line from 1 to 2 is considered the top. (currently this only works with squares. TODO fix)
*/
class Trie(object):
def __init__(self,_key='',_val=None,_sub_nodes=None,_count=0):
if not _sub_nodes:
_sub_nodes = {}
self._key = _key
self._val = _val
self._sub_nodes = _sub_nodes
self._count = _count
@JnBrymn-EB
JnBrymn-EB / index.html
Last active August 29, 2015 14:24
N-body gravitational simulation with large N (a D3 experiment)
<!DOCTYPE html>
<html>
<head>
<title>Asteroids</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
<style>
svg {
background-color:black;
}