Skip to content

Instantly share code, notes, and snippets.

Avatar

Jason Furtney jkfurtney

View GitHub Profile
View fast_sweeping_method.py
import numpy as np
import pylab as plt
from sys import float_info
from math import sqrt
from skfmm import distance
N=11
phi = np.ones((N,N))
phi[5,5] = -1
@jkfurtney
jkfurtney / b.py
Last active Aug 10, 2016
Exact solution for path finding example.
View b.py
import numpy as np
import pylab as plt
from skfmm import travel_time, distance
from scipy.interpolate import RectBivariateSpline
from scipy.optimize import fminbound
from math import sin
# Brachistochrone curve
# see: http://mathworld.wolfram.com/BrachistochroneProblem.html
b=1/np.pi
View trello-to-org-mode.el
; call trello2org interactively
; or pragmatically like this: (trello2org "c:/Users/jfurtney/blo-up-2-7.json")
(require 'json)
(defun convert-trello-json-file-to-org (trello-json-file)
(let* ((board (json-read-file trello-json-file))
(board-name (cdr (assoc 'name (cdr board))))
(lists (cdr (assoc 'lists (cdr board))))
View limiters.py
import fipy.tools.numerix as np
from fipy.terms import VanLeerConvectionTerm
import fipy as fp
import pylab as plt
# monkey patch VanLeerConvectionTerm so we can override
# __getGradient in the derived class
VanLeerConvectionTerm._getGradient = VanLeerConvectionTerm._VanLeerConvectionTerm__getGradient
VanLeerConvectionTerm._VanLeerConvectionTerm__getGradient = \
lambda self, a, b: self._getGradient(a, b)
@jkfurtney
jkfurtney / up-goer-five.el
Created Jan 18, 2013
Emacs mode for writing with only the thousand most common English words. Inspired by http://xkcd.com/1133/
View up-goer-five.el
(defvar upgoer-five-keywords (split-string "a able about above accept across
act actually add admit afraid after afternoon again against age
ago agree ah ahead air all allow almost alone along already
alright also although always am amaze an and anger angry animal
annoy another answer any anymore anyone anything anyway apartment
apparently appear approach are area aren't arm around arrive as
ask asleep ass at attack attempt attention aunt avoid away baby
back bad bag ball band bar barely bathroom be beat beautiful
became because become bed bedroom been before began begin behind
You can’t perform that action at this time.